
(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 23 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 -7.5e+35)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6800.0)
(- (/ F (* (sin B) (sqrt (+ 2.0 (pow F 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.5e+35) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6800.0) {
tmp = (F / (sin(B) * sqrt((2.0 + pow(F, 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 <= (-7.5d+35)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6800.0d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (f ** 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 <= -7.5e+35) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6800.0) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + Math.pow(F, 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 <= -7.5e+35: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6800.0: tmp = (F / (math.sin(B) * math.sqrt((2.0 + math.pow(F, 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 <= -7.5e+35) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6800.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + (F ^ 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 <= -7.5e+35) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6800.0) tmp = (F / (sin(B) * sqrt((2.0 + (F ^ 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, -7.5e+35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6800.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[Power[F, 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 -7.5 \cdot 10^{+35}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6800:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + {F}^{2}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.4999999999999999e35Initial program 59.9%
Simplified74.3%
Taylor expanded in F around -inf 99.8%
if -7.4999999999999999e35 < F < 6800Initial program 99.4%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 99.6%
if 6800 < F Initial program 52.6%
Simplified67.9%
Taylor expanded in F around inf 99.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.5e+31)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6800.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.5e+31) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6800.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.5d+31)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6800.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.5e+31) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6800.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.5e+31: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6800.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.5e+31) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6800.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.5e+31) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6800.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6800.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6800:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.50000000000000013e31Initial program 59.9%
Simplified74.3%
Taylor expanded in F around -inf 99.8%
if -2.50000000000000013e31 < F < 6800Initial program 99.4%
div-inv99.5%
neg-mul-199.5%
clear-num99.5%
un-div-inv99.5%
Applied egg-rr99.5%
if 6800 < F Initial program 52.6%
Simplified67.9%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -86000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6800.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -86000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6800.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-86000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6800.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -86000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6800.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -86000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6800.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -86000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6800.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / 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 <= -86000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6800.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -86000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6800.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -86000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6800:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -8.6e7Initial program 63.4%
Simplified76.6%
Taylor expanded in F around -inf 99.8%
if -8.6e7 < F < 6800Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 6800 < F Initial program 52.6%
Simplified67.9%
Taylor expanded in F around inf 99.9%
Final simplification99.6%
(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.45)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 64.9%
Simplified77.5%
Taylor expanded in F around -inf 98.6%
if -1.3999999999999999 < F < 1.44999999999999996Initial program 99.4%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in F around 0 98.0%
if 1.44999999999999996 < F Initial program 53.2%
Simplified68.4%
Taylor expanded in F around inf 99.3%
(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 -2e+14)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.05e-150)
t_0
(if (<= F 8e-205)
(* (cos B) (/ x (- (sin B))))
(if (<= F 6800.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 <= -2e+14) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.05e-150) {
tmp = t_0;
} else if (F <= 8e-205) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 6800.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 <= (-2d+14)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.05d-150)) then
tmp = t_0
else if (f <= 8d-205) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 6800.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 <= -2e+14) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.05e-150) {
tmp = t_0;
} else if (F <= 8e-205) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 6800.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 <= -2e+14: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.05e-150: tmp = t_0 elif F <= 8e-205: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 6800.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 <= -2e+14) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.05e-150) tmp = t_0; elseif (F <= 8e-205) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 6800.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 <= -2e+14) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.05e-150) tmp = t_0; elseif (F <= 8e-205) tmp = cos(B) * (x / -sin(B)); elseif (F <= 6800.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, -2e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.05e-150], t$95$0, If[LessEqual[F, 8e-205], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6800.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 -2 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-205}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 6800:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -2e14Initial program 62.3%
Simplified75.9%
Taylor expanded in F around -inf 99.8%
if -2e14 < F < -2.0499999999999999e-150 or 8e-205 < F < 6800Initial program 99.5%
Taylor expanded in B around 0 86.3%
associate-*r/86.3%
neg-mul-186.3%
Simplified86.3%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr86.3%
if -2.0499999999999999e-150 < F < 8e-205Initial program 99.3%
Simplified99.4%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 88.3%
mul-1-neg88.3%
*-commutative88.3%
associate-*r/88.4%
distribute-rgt-neg-in88.4%
distribute-neg-frac288.4%
Simplified88.4%
if 6800 < F Initial program 52.6%
Simplified67.9%
Taylor expanded in F around inf 99.9%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -1e-17)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.25e-150)
t_0
(if (<= F 1.02e-207)
(* (cos B) (/ x (- (sin B))))
(if (<= F 0.44) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1e-17) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.25e-150) {
tmp = t_0;
} else if (F <= 1.02e-207) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 0.44) {
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)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = x / tan(b)
if (f <= (-1d-17)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.25d-150)) then
tmp = t_0
else if (f <= 1.02d-207) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 0.44d0) 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.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1e-17) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.25e-150) {
tmp = t_0;
} else if (F <= 1.02e-207) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 0.44) {
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.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -1e-17: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.25e-150: tmp = t_0 elif F <= 1.02e-207: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 0.44: 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)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e-17) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.25e-150) tmp = t_0; elseif (F <= 1.02e-207) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 0.44) 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)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1e-17) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.25e-150) tmp = t_0; elseif (F <= 1.02e-207) tmp = cos(B) * (x / -sin(B)); elseif (F <= 0.44) 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[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.25e-150], t$95$0, If[LessEqual[F, 1.02e-207], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.44], 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 \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{-207}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 0.44:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.00000000000000007e-17Initial program 67.2%
Simplified79.0%
Taylor expanded in F around -inf 96.4%
if -1.00000000000000007e-17 < F < -2.2500000000000001e-150 or 1.02e-207 < F < 0.440000000000000002Initial program 99.5%
Taylor expanded in B around 0 86.9%
associate-*r/86.9%
neg-mul-186.9%
Simplified86.9%
clear-num86.8%
inv-pow86.8%
Applied egg-rr86.8%
unpow-186.8%
Simplified86.8%
Taylor expanded in F around 0 85.9%
*-commutative85.9%
Simplified85.9%
if -2.2500000000000001e-150 < F < 1.02e-207Initial program 99.3%
Simplified99.4%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 88.3%
mul-1-neg88.3%
*-commutative88.3%
associate-*r/88.4%
distribute-rgt-neg-in88.4%
distribute-neg-frac288.4%
Simplified88.4%
if 0.440000000000000002 < F Initial program 53.2%
Simplified68.4%
Taylor expanded in F around inf 99.3%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e-24)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.6e-180)
(* (cos B) (/ x (- (sin B))))
(if (<= F 8.2e-70)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.05e-14)
(* 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 <= -1e-24) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.6e-180) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 8.2e-70) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.05e-14) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1d-24)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.6d-180) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 8.2d-70) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.05d-14) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1e-24) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.6e-180) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 8.2e-70) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.05e-14) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1e-24: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.6e-180: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 8.2e-70: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.05e-14: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e-24) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.6e-180) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 8.2e-70) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.05e-14) tmp = Float64(F * Float64(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 <= -1e-24) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.6e-180) tmp = cos(B) * (x / -sin(B)); elseif (F <= 8.2e-70) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.05e-14) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e-24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.6e-180], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-70], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.05e-14], N[(F * N[(N[Sqrt[0.5], $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 \cdot 10^{-24}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-180}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-14}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.99999999999999924e-25Initial program 67.7%
Simplified79.3%
Taylor expanded in F around -inf 95.2%
if -9.99999999999999924e-25 < F < 4.59999999999999992e-180Initial program 99.4%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 71.4%
mul-1-neg71.4%
*-commutative71.4%
associate-*r/71.5%
distribute-rgt-neg-in71.5%
distribute-neg-frac271.5%
Simplified71.5%
if 4.59999999999999992e-180 < F < 8.19999999999999955e-70Initial program 99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 89.4%
if 8.19999999999999955e-70 < F < 1.0499999999999999e-14Initial program 99.2%
Simplified99.9%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
associate-*l/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 91.2%
associate-/l*91.6%
Simplified91.6%
if 1.0499999999999999e-14 < F Initial program 55.6%
Simplified70.0%
Taylor expanded in F around inf 97.1%
Final simplification88.4%
(FPCore (F B x)
:precision binary64
(if (<= F -6e-25)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.05e-170)
(* (cos B) (/ x (- (sin B))))
(if (<= F 1.3e-68)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 5.8e-9)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-25) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.05e-170) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 1.3e-68) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 5.8e-9) {
tmp = F * (sqrt(0.5) / sin(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 <= (-6d-25)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.05d-170) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 1.3d-68) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 5.8d-9) then
tmp = f * (sqrt(0.5d0) / sin(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 <= -6e-25) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.05e-170) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 1.3e-68) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 5.8e-9) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-25: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.05e-170: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 1.3e-68: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 5.8e-9: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-25) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.05e-170) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 1.3e-68) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 5.8e-9) tmp = Float64(F * Float64(sqrt(0.5) / sin(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 <= -6e-25) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.05e-170) tmp = cos(B) * (x / -sin(B)); elseif (F <= 1.3e-68) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 5.8e-9) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-170], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-68], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.8e-9], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $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 -6 \cdot 10^{-25}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-170}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-9}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.9999999999999995e-25Initial program 67.7%
Simplified79.3%
Taylor expanded in F around -inf 95.2%
if -5.9999999999999995e-25 < F < 1.05e-170Initial program 99.4%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 71.4%
mul-1-neg71.4%
*-commutative71.4%
associate-*r/71.5%
distribute-rgt-neg-in71.5%
distribute-neg-frac271.5%
Simplified71.5%
if 1.05e-170 < F < 1.2999999999999999e-68Initial program 99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 89.4%
if 1.2999999999999999e-68 < F < 5.79999999999999982e-9Initial program 99.3%
Simplified99.9%
Taylor expanded in F around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 85.7%
associate-/l*86.0%
Simplified86.0%
if 5.79999999999999982e-9 < F Initial program 54.4%
Taylor expanded in B around 0 34.1%
associate-*r/34.1%
neg-mul-134.1%
Simplified34.1%
Taylor expanded in F around inf 76.9%
neg-mul-176.9%
distribute-frac-neg76.9%
+-commutative76.9%
distribute-frac-neg76.9%
unsub-neg76.9%
Simplified76.9%
Final simplification82.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3e-159)
(* (cos B) (/ x (- (sin B))))
(if (<= F 8e-69)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 5.8e-9)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3e-159) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 8e-69) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 5.8e-9) {
tmp = F * (sqrt(0.5) / sin(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 <= (-1.35d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3d-159) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 8d-69) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 5.8d-9) then
tmp = f * (sqrt(0.5d0) / sin(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 <= -1.35e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3e-159) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 8e-69) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 5.8e-9) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3e-159: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 8e-69: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 5.8e-9: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3e-159) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 8e-69) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 5.8e-9) tmp = Float64(F * Float64(sqrt(0.5) / sin(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 <= -1.35e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3e-159) tmp = cos(B) * (x / -sin(B)); elseif (F <= 8e-69) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 5.8e-9) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-159], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e-69], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.8e-9], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $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 -1.35 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-159}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-69}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-9}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.3499999999999999e-5Initial program 65.9%
Simplified78.2%
Taylor expanded in F around -inf 96.2%
Taylor expanded in B around 0 68.3%
if -1.3499999999999999e-5 < F < 3.00000000000000009e-159Initial program 99.4%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 71.6%
mul-1-neg71.6%
*-commutative71.6%
associate-*r/71.7%
distribute-rgt-neg-in71.7%
distribute-neg-frac271.7%
Simplified71.7%
if 3.00000000000000009e-159 < F < 7.9999999999999997e-69Initial program 99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 89.4%
if 7.9999999999999997e-69 < F < 5.79999999999999982e-9Initial program 99.3%
Simplified99.9%
Taylor expanded in F around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 85.7%
associate-/l*86.0%
Simplified86.0%
if 5.79999999999999982e-9 < F Initial program 54.4%
Taylor expanded in B around 0 34.1%
associate-*r/34.1%
neg-mul-134.1%
Simplified34.1%
Taylor expanded in F around inf 76.9%
neg-mul-176.9%
distribute-frac-neg76.9%
+-commutative76.9%
distribute-frac-neg76.9%
unsub-neg76.9%
Simplified76.9%
Final simplification74.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3e-159)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 5.3e-70)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 5.8e-9)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3e-159) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 5.3e-70) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 5.8e-9) {
tmp = F * (sqrt(0.5) / sin(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 <= (-2d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3d-159) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 5.3d-70) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 5.8d-9) then
tmp = f * (sqrt(0.5d0) / sin(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 <= -2e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3e-159) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 5.3e-70) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 5.8e-9) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3e-159: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 5.3e-70: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 5.8e-9: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3e-159) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 5.3e-70) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 5.8e-9) tmp = Float64(F * Float64(sqrt(0.5) / sin(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 <= -2e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3e-159) tmp = (x * cos(B)) / -sin(B); elseif (F <= 5.3e-70) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 5.8e-9) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-159], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 5.3e-70], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.8e-9], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $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 -2 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-159}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-70}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-9}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.00000000000000016e-5Initial program 65.9%
Simplified78.2%
Taylor expanded in F around -inf 96.2%
Taylor expanded in B around 0 68.3%
if -2.00000000000000016e-5 < F < 3.00000000000000009e-159Initial program 99.4%
Simplified99.5%
Taylor expanded in F around inf 43.6%
Taylor expanded in x around inf 71.6%
mul-1-neg71.6%
Simplified71.6%
if 3.00000000000000009e-159 < F < 5.29999999999999983e-70Initial program 99.6%
Simplified99.7%
Taylor expanded in F around 0 99.8%
*-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 89.4%
if 5.29999999999999983e-70 < F < 5.79999999999999982e-9Initial program 99.3%
Simplified99.9%
Taylor expanded in F around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 85.7%
associate-/l*86.0%
Simplified86.0%
if 5.79999999999999982e-9 < F Initial program 54.4%
Taylor expanded in B around 0 34.1%
associate-*r/34.1%
neg-mul-134.1%
Simplified34.1%
Taylor expanded in F around inf 76.9%
neg-mul-176.9%
distribute-frac-neg76.9%
+-commutative76.9%
distribute-frac-neg76.9%
unsub-neg76.9%
Simplified76.9%
Final simplification74.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-285)
(- (/ -1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) (/ x (tan B)))
(if (<= F 5.2e-70)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 4.6e-9)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-285) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B));
} else if (F <= 5.2e-70) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 4.6e-9) {
tmp = F * (sqrt(0.5) / sin(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 <= (-1.35d-285)) then
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - (x / tan(b))
else if (f <= 5.2d-70) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 4.6d-9) then
tmp = f * (sqrt(0.5d0) / sin(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 <= -1.35e-285) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / Math.tan(B));
} else if (F <= 5.2e-70) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 4.6e-9) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-285: tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / math.tan(B)) elif F <= 5.2e-70: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 4.6e-9: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-285) tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - Float64(x / tan(B))); elseif (F <= 5.2e-70) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 4.6e-9) tmp = Float64(F * Float64(sqrt(0.5) / sin(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 <= -1.35e-285) tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B)); elseif (F <= 5.2e-70) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 4.6e-9) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-285], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e-70], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.6e-9], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $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 -1.35 \cdot 10^{-285}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-9}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.3499999999999999e-285Initial program 81.0%
Simplified87.8%
Taylor expanded in F around -inf 76.0%
Taylor expanded in B around 0 64.4%
*-commutative64.4%
Simplified64.4%
unpow264.4%
Applied egg-rr64.4%
if -1.3499999999999999e-285 < F < 5.20000000000000004e-70Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 70.5%
if 5.20000000000000004e-70 < F < 4.5999999999999998e-9Initial program 99.3%
Simplified99.9%
Taylor expanded in F around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 85.7%
associate-/l*86.0%
Simplified86.0%
if 4.5999999999999998e-9 < F Initial program 54.4%
Taylor expanded in B around 0 34.1%
associate-*r/34.1%
neg-mul-134.1%
Simplified34.1%
Taylor expanded in F around inf 76.9%
neg-mul-176.9%
distribute-frac-neg76.9%
+-commutative76.9%
distribute-frac-neg76.9%
unsub-neg76.9%
Simplified76.9%
Final simplification70.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -2.35e-27)
t_0
(if (<= x -1.5e-181)
(/ 1.0 (sin B))
(if (<= x -2.5e-246)
(/ (* F (sqrt 0.5)) B)
(if (<= x 3.4e-7) (- (/ -1.0 (sin B)) (/ x B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -2.35e-27) {
tmp = t_0;
} else if (x <= -1.5e-181) {
tmp = 1.0 / sin(B);
} else if (x <= -2.5e-246) {
tmp = (F * sqrt(0.5)) / B;
} else if (x <= 3.4e-7) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-2.35d-27)) then
tmp = t_0
else if (x <= (-1.5d-181)) then
tmp = 1.0d0 / sin(b)
else if (x <= (-2.5d-246)) then
tmp = (f * sqrt(0.5d0)) / b
else if (x <= 3.4d-7) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -2.35e-27) {
tmp = t_0;
} else if (x <= -1.5e-181) {
tmp = 1.0 / Math.sin(B);
} else if (x <= -2.5e-246) {
tmp = (F * Math.sqrt(0.5)) / B;
} else if (x <= 3.4e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -2.35e-27: tmp = t_0 elif x <= -1.5e-181: tmp = 1.0 / math.sin(B) elif x <= -2.5e-246: tmp = (F * math.sqrt(0.5)) / B elif x <= 3.4e-7: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -2.35e-27) tmp = t_0; elseif (x <= -1.5e-181) tmp = Float64(1.0 / sin(B)); elseif (x <= -2.5e-246) tmp = Float64(Float64(F * sqrt(0.5)) / B); elseif (x <= 3.4e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -2.35e-27) tmp = t_0; elseif (x <= -1.5e-181) tmp = 1.0 / sin(B); elseif (x <= -2.5e-246) tmp = (F * sqrt(0.5)) / B; elseif (x <= 3.4e-7) tmp = (-1.0 / sin(B)) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.35e-27], t$95$0, If[LessEqual[x, -1.5e-181], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.5e-246], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[x, 3.4e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2.35 \cdot 10^{-27}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-181}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-246}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.35000000000000016e-27 or 3.39999999999999974e-7 < x Initial program 84.4%
Simplified96.6%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 95.8%
if -2.35000000000000016e-27 < x < -1.49999999999999987e-181Initial program 69.3%
Simplified78.0%
Taylor expanded in F around inf 43.2%
Taylor expanded in x around 0 43.2%
if -1.49999999999999987e-181 < x < -2.4999999999999998e-246Initial program 89.0%
Simplified89.1%
Taylor expanded in F around 0 80.4%
*-commutative80.4%
associate-*l/80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around 0 61.4%
Taylor expanded in B around 0 40.2%
if -2.4999999999999998e-246 < x < 3.39999999999999974e-7Initial program 66.7%
Simplified69.3%
Taylor expanded in F around -inf 34.2%
Taylor expanded in B around 0 33.8%
(FPCore (F B x)
:precision binary64
(if (<= F -2.2e-116)
(/ (- -1.0 x) B)
(if (<= F 4.8e-36)
(/ x (- B))
(if (<= F 5e-15)
(* F (/ (sqrt 0.5) B))
(if (<= F 5.9e+81) (/ (- 1.0 x) B) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.8e-36) {
tmp = x / -B;
} else if (F <= 5e-15) {
tmp = F * (sqrt(0.5) / B);
} else if (F <= 5.9e+81) {
tmp = (1.0 - x) / B;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.2d-116)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.8d-36) then
tmp = x / -b
else if (f <= 5d-15) then
tmp = f * (sqrt(0.5d0) / b)
else if (f <= 5.9d+81) then
tmp = (1.0d0 - x) / b
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.2e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.8e-36) {
tmp = x / -B;
} else if (F <= 5e-15) {
tmp = F * (Math.sqrt(0.5) / B);
} else if (F <= 5.9e+81) {
tmp = (1.0 - x) / B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.2e-116: tmp = (-1.0 - x) / B elif F <= 4.8e-36: tmp = x / -B elif F <= 5e-15: tmp = F * (math.sqrt(0.5) / B) elif F <= 5.9e+81: tmp = (1.0 - x) / B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.2e-116) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.8e-36) tmp = Float64(x / Float64(-B)); elseif (F <= 5e-15) tmp = Float64(F * Float64(sqrt(0.5) / B)); elseif (F <= 5.9e+81) tmp = Float64(Float64(1.0 - x) / B); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.2e-116) tmp = (-1.0 - x) / B; elseif (F <= 4.8e-36) tmp = x / -B; elseif (F <= 5e-15) tmp = F * (sqrt(0.5) / B); elseif (F <= 5.9e+81) tmp = (1.0 - x) / B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.2e-116], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.8e-36], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 5e-15], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.9e+81], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.2 \cdot 10^{-116}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-15}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 5.9 \cdot 10^{+81}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.2000000000000001e-116Initial program 75.6%
Simplified84.3%
Taylor expanded in F around -inf 83.7%
Taylor expanded in B around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
+-commutative36.5%
Simplified36.5%
Taylor expanded in x around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
div-sub36.5%
sub-neg36.5%
distribute-neg-in36.5%
distribute-neg-in36.5%
metadata-eval36.5%
+-commutative36.5%
unsub-neg36.5%
Simplified36.5%
if -2.2000000000000001e-116 < F < 4.8e-36Initial program 99.4%
Simplified99.5%
Taylor expanded in F around -inf 42.4%
Taylor expanded in B around 0 29.3%
associate-*r/29.3%
neg-mul-129.3%
+-commutative29.3%
Simplified29.3%
Taylor expanded in x around inf 44.3%
associate-*r/44.3%
neg-mul-144.3%
Simplified44.3%
if 4.8e-36 < F < 4.99999999999999999e-15Initial program 99.4%
Simplified100.0%
Taylor expanded in F around 0 99.4%
*-commutative99.4%
associate-*l/99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 99.6%
Taylor expanded in B around 0 63.7%
associate-/l*64.1%
Simplified64.1%
if 4.99999999999999999e-15 < F < 5.9000000000000004e81Initial program 94.9%
Simplified99.8%
Taylor expanded in F around inf 89.7%
Taylor expanded in B around 0 63.3%
if 5.9000000000000004e81 < F Initial program 40.9%
Simplified58.9%
Taylor expanded in F around inf 99.8%
Taylor expanded in x around 0 56.8%
Final simplification46.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.85e-281)
(- (/ -1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) (/ x (tan B)))
(if (<= F 1.25e-14)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-281) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B));
} else if (F <= 1.25e-14) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - 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 <= (-1.85d-281)) then
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - (x / tan(b))
else if (f <= 1.25d-14) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - 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 <= -1.85e-281) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / Math.tan(B));
} else if (F <= 1.25e-14) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.85e-281: tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / math.tan(B)) elif F <= 1.25e-14: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.85e-281) tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - Float64(x / tan(B))); elseif (F <= 1.25e-14) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - 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 <= -1.85e-281) tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B)); elseif (F <= 1.25e-14) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.85e-281], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-14], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{-281}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-14}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.84999999999999996e-281Initial program 81.0%
Simplified87.8%
Taylor expanded in F around -inf 76.0%
Taylor expanded in B around 0 64.4%
*-commutative64.4%
Simplified64.4%
unpow264.4%
Applied egg-rr64.4%
if -1.84999999999999996e-281 < F < 1.25e-14Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 65.9%
if 1.25e-14 < F Initial program 55.6%
Taylor expanded in B around 0 34.6%
associate-*r/34.6%
neg-mul-134.6%
Simplified34.6%
Taylor expanded in F around inf 75.1%
neg-mul-175.1%
distribute-frac-neg75.1%
+-commutative75.1%
distribute-frac-neg75.1%
unsub-neg75.1%
Simplified75.1%
Final simplification67.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1e-284)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 1.25e-14)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e-284) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 1.25e-14) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - 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 <= (-1d-284)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 1.25d-14) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - 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 <= -1e-284) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 1.25e-14) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e-284: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 1.25e-14: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e-284) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 1.25e-14) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - 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 <= -1e-284) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 1.25e-14) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e-284], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-14], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-284}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-14}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.00000000000000004e-284Initial program 81.0%
Simplified87.8%
Taylor expanded in F around -inf 76.0%
Taylor expanded in B around 0 62.1%
if -1.00000000000000004e-284 < F < 1.25e-14Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 65.9%
if 1.25e-14 < F Initial program 55.6%
Taylor expanded in B around 0 34.6%
associate-*r/34.6%
neg-mul-134.6%
Simplified34.6%
Taylor expanded in F around inf 75.1%
neg-mul-175.1%
distribute-frac-neg75.1%
+-commutative75.1%
distribute-frac-neg75.1%
unsub-neg75.1%
Simplified75.1%
Final simplification66.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -2.05e-27)
t_0
(if (<= x -3.5e-181)
(/ 1.0 (sin B))
(if (<= x 9.5e-68) (/ (* F (sqrt 0.5)) B) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -2.05e-27) {
tmp = t_0;
} else if (x <= -3.5e-181) {
tmp = 1.0 / sin(B);
} else if (x <= 9.5e-68) {
tmp = (F * sqrt(0.5)) / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-2.05d-27)) then
tmp = t_0
else if (x <= (-3.5d-181)) then
tmp = 1.0d0 / sin(b)
else if (x <= 9.5d-68) then
tmp = (f * sqrt(0.5d0)) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -2.05e-27) {
tmp = t_0;
} else if (x <= -3.5e-181) {
tmp = 1.0 / Math.sin(B);
} else if (x <= 9.5e-68) {
tmp = (F * Math.sqrt(0.5)) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -2.05e-27: tmp = t_0 elif x <= -3.5e-181: tmp = 1.0 / math.sin(B) elif x <= 9.5e-68: tmp = (F * math.sqrt(0.5)) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -2.05e-27) tmp = t_0; elseif (x <= -3.5e-181) tmp = Float64(1.0 / sin(B)); elseif (x <= 9.5e-68) tmp = Float64(Float64(F * sqrt(0.5)) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -2.05e-27) tmp = t_0; elseif (x <= -3.5e-181) tmp = 1.0 / sin(B); elseif (x <= 9.5e-68) tmp = (F * sqrt(0.5)) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.05e-27], t$95$0, If[LessEqual[x, -3.5e-181], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.5e-68], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2.05 \cdot 10^{-27}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-181}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-68}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.0499999999999999e-27 or 9.4999999999999997e-68 < x Initial program 82.9%
Simplified94.0%
Taylor expanded in F around -inf 90.2%
Taylor expanded in B around 0 89.7%
if -2.0499999999999999e-27 < x < -3.49999999999999996e-181Initial program 69.3%
Simplified78.0%
Taylor expanded in F around inf 43.2%
Taylor expanded in x around 0 43.2%
if -3.49999999999999996e-181 < x < 9.4999999999999997e-68Initial program 71.3%
Simplified73.6%
Taylor expanded in F around 0 56.3%
*-commutative56.3%
associate-*l/56.3%
*-commutative56.3%
Simplified56.3%
Taylor expanded in x around 0 43.7%
Taylor expanded in B around 0 28.2%
(FPCore (F B x)
:precision binary64
(if (<= F -3.8e-116)
(/ (- -1.0 x) B)
(if (<= F 2.5e-78)
(/ x (- B))
(if (<= F 1.8e+81) (/ (- 1.0 x) B) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.5e-78) {
tmp = x / -B;
} else if (F <= 1.8e+81) {
tmp = (1.0 - x) / B;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.8d-116)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.5d-78) then
tmp = x / -b
else if (f <= 1.8d+81) then
tmp = (1.0d0 - x) / b
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.5e-78) {
tmp = x / -B;
} else if (F <= 1.8e+81) {
tmp = (1.0 - x) / B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-116: tmp = (-1.0 - x) / B elif F <= 2.5e-78: tmp = x / -B elif F <= 1.8e+81: tmp = (1.0 - x) / B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-116) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.5e-78) tmp = Float64(x / Float64(-B)); elseif (F <= 1.8e+81) tmp = Float64(Float64(1.0 - x) / B); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.8e-116) tmp = (-1.0 - x) / B; elseif (F <= 2.5e-78) tmp = x / -B; elseif (F <= 1.8e+81) tmp = (1.0 - x) / B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-116], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.5e-78], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 1.8e+81], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-116}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{+81}:\\
\;\;\;\;\frac{1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.8000000000000001e-116Initial program 75.6%
Simplified84.3%
Taylor expanded in F around -inf 83.7%
Taylor expanded in B around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
+-commutative36.5%
Simplified36.5%
Taylor expanded in x around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
div-sub36.5%
sub-neg36.5%
distribute-neg-in36.5%
distribute-neg-in36.5%
metadata-eval36.5%
+-commutative36.5%
unsub-neg36.5%
Simplified36.5%
if -3.8000000000000001e-116 < F < 2.4999999999999998e-78Initial program 99.4%
Simplified99.5%
Taylor expanded in F around -inf 43.1%
Taylor expanded in B around 0 28.8%
associate-*r/28.8%
neg-mul-128.8%
+-commutative28.8%
Simplified28.8%
Taylor expanded in x around inf 45.1%
associate-*r/45.1%
neg-mul-145.1%
Simplified45.1%
if 2.4999999999999998e-78 < F < 1.80000000000000003e81Initial program 96.6%
Simplified99.8%
Taylor expanded in F around inf 62.4%
Taylor expanded in B around 0 46.1%
if 1.80000000000000003e81 < F Initial program 40.9%
Simplified58.9%
Taylor expanded in F around inf 99.8%
Taylor expanded in x around 0 56.8%
Final simplification44.4%
(FPCore (F B x) :precision binary64 (if (<= F 4.3e+23) (- (/ -1.0 B) (/ x (tan B))) (- (/ 1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= 4.3e+23) {
tmp = (-1.0 / B) - (x / 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 <= 4.3d+23) then
tmp = ((-1.0d0) / b) - (x / 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 <= 4.3e+23) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 4.3e+23: tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= 4.3e+23) tmp = Float64(Float64(-1.0 / B) - Float64(x / 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 <= 4.3e+23) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 4.3e+23], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $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 4.3 \cdot 10^{+23}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < 4.2999999999999999e23Initial program 86.7%
Simplified91.4%
Taylor expanded in F around -inf 63.7%
Taylor expanded in B around 0 55.2%
if 4.2999999999999999e23 < F Initial program 49.0%
Taylor expanded in B around 0 29.1%
associate-*r/29.1%
neg-mul-129.1%
Simplified29.1%
Taylor expanded in F around inf 78.9%
neg-mul-178.9%
distribute-frac-neg78.9%
+-commutative78.9%
distribute-frac-neg78.9%
unsub-neg78.9%
Simplified78.9%
(FPCore (F B x) :precision binary64 (if (<= F -2.1e-116) (/ (- -1.0 x) B) (if (<= F 1.65e-78) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.65e-78) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.1d-116)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.65d-78) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.65e-78) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-116: tmp = (-1.0 - x) / B elif F <= 1.65e-78: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-116) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.65e-78) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-116) tmp = (-1.0 - x) / B; elseif (F <= 1.65e-78) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-116], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.65e-78], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-116}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.0999999999999999e-116Initial program 75.6%
Simplified84.3%
Taylor expanded in F around -inf 83.7%
Taylor expanded in B around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
+-commutative36.5%
Simplified36.5%
Taylor expanded in x around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
div-sub36.5%
sub-neg36.5%
distribute-neg-in36.5%
distribute-neg-in36.5%
metadata-eval36.5%
+-commutative36.5%
unsub-neg36.5%
Simplified36.5%
if -2.0999999999999999e-116 < F < 1.64999999999999991e-78Initial program 99.4%
Simplified99.5%
Taylor expanded in F around -inf 43.1%
Taylor expanded in B around 0 28.8%
associate-*r/28.8%
neg-mul-128.8%
+-commutative28.8%
Simplified28.8%
Taylor expanded in x around inf 45.1%
associate-*r/45.1%
neg-mul-145.1%
Simplified45.1%
if 1.64999999999999991e-78 < F Initial program 62.3%
Simplified74.6%
Taylor expanded in F around inf 85.4%
Taylor expanded in B around 0 43.5%
Final simplification41.1%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-116) (/ (- -1.0 x) B) (if (<= F 1.8e+227) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.8e+227) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.8d-116)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.8d+227) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-116) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.8e+227) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-116: tmp = (-1.0 - x) / B elif F <= 1.8e+227: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-116) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.8e+227) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.8e-116) tmp = (-1.0 - x) / B; elseif (F <= 1.8e+227) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-116], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.8e+227], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-116}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{+227}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -3.8000000000000001e-116Initial program 75.6%
Simplified84.3%
Taylor expanded in F around -inf 83.7%
Taylor expanded in B around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
+-commutative36.5%
Simplified36.5%
Taylor expanded in x around 0 36.5%
associate-*r/36.5%
neg-mul-136.5%
div-sub36.5%
sub-neg36.5%
distribute-neg-in36.5%
distribute-neg-in36.5%
metadata-eval36.5%
+-commutative36.5%
unsub-neg36.5%
Simplified36.5%
if -3.8000000000000001e-116 < F < 1.79999999999999996e227Initial program 86.9%
Simplified93.8%
Taylor expanded in F around -inf 42.2%
Taylor expanded in B around 0 28.3%
associate-*r/28.3%
neg-mul-128.3%
+-commutative28.3%
Simplified28.3%
Taylor expanded in x around inf 36.7%
associate-*r/36.7%
neg-mul-136.7%
Simplified36.7%
if 1.79999999999999996e227 < F Initial program 26.9%
Simplified36.1%
Taylor expanded in F around -inf 34.9%
Taylor expanded in B around 0 10.0%
associate-*r/10.0%
neg-mul-110.0%
+-commutative10.0%
Simplified10.0%
*-un-lft-identity10.0%
add-sqr-sqrt4.8%
sqrt-unprod36.5%
sqr-neg36.5%
sqrt-unprod31.8%
add-sqr-sqrt32.8%
Applied egg-rr32.8%
*-lft-identity32.8%
Simplified32.8%
Final simplification36.2%
(FPCore (F B x) :precision binary64 (if (<= F 4e+227) (/ x (- B)) (/ (+ x 1.0) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 4e+227) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 4d+227) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 4e+227) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 4e+227: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 4e+227) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 4e+227) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 4e+227], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 4 \cdot 10^{+227}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < 4.0000000000000004e227Initial program 82.0%
Simplified89.7%
Taylor expanded in F around -inf 60.3%
Taylor expanded in B around 0 31.8%
associate-*r/31.8%
neg-mul-131.8%
+-commutative31.8%
Simplified31.8%
Taylor expanded in x around inf 30.2%
associate-*r/30.2%
neg-mul-130.2%
Simplified30.2%
if 4.0000000000000004e227 < F Initial program 26.9%
Simplified36.1%
Taylor expanded in F around -inf 34.9%
Taylor expanded in B around 0 10.0%
associate-*r/10.0%
neg-mul-110.0%
+-commutative10.0%
Simplified10.0%
*-un-lft-identity10.0%
add-sqr-sqrt4.8%
sqrt-unprod36.5%
sqr-neg36.5%
sqrt-unprod31.8%
add-sqr-sqrt32.8%
Applied egg-rr32.8%
*-lft-identity32.8%
Simplified32.8%
Final simplification30.4%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 76.8%
Simplified84.7%
Taylor expanded in F around -inf 57.9%
Taylor expanded in B around 0 29.8%
associate-*r/29.8%
neg-mul-129.8%
+-commutative29.8%
Simplified29.8%
Taylor expanded in x around inf 28.4%
associate-*r/28.4%
neg-mul-128.4%
Simplified28.4%
Final simplification28.4%
(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 76.8%
Simplified84.7%
Taylor expanded in F around -inf 57.9%
Taylor expanded in B around 0 29.8%
associate-*r/29.8%
neg-mul-129.8%
+-commutative29.8%
Simplified29.8%
Taylor expanded in x around 0 9.2%
herbie shell --seed 2024149
(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))))))