
(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 20 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 -1e+154)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 5000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+154) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 5000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+154) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 5000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+154], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+154}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 5000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.00000000000000004e154Initial program 31.2%
Taylor expanded in F around -inf 99.7%
if -1.00000000000000004e154 < F < 5e3Initial program 96.7%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 5e3 < F Initial program 50.9%
Simplified61.4%
Taylor expanded in x around 0 61.4%
associate-*l/61.4%
*-lft-identity61.4%
+-commutative61.4%
unpow261.4%
fma-undefine61.4%
Simplified61.4%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2e9Initial program 56.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
div-inv99.7%
unsub-neg99.7%
Applied egg-rr99.7%
if -2e9 < F < 1e8Initial program 99.4%
if 1e8 < F Initial program 50.9%
Simplified61.4%
Taylor expanded in x around 0 61.4%
associate-*l/61.4%
*-lft-identity61.4%
+-commutative61.4%
unpow261.4%
fma-undefine61.4%
Simplified61.4%
Taylor expanded in F around inf 99.7%
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.4)
(- (* 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.4) {
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.4d0) 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.4) {
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.4: 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.4) tmp = Float64(Float64(F * Float64(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.4) 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.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 58.5%
Taylor expanded in F around -inf 98.8%
+-commutative98.8%
div-inv98.9%
unsub-neg98.9%
Applied egg-rr98.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.2%
if 1.3999999999999999 < F Initial program 51.6%
Simplified61.9%
Taylor expanded in x around 0 61.9%
associate-*l/61.9%
*-lft-identity61.9%
+-commutative61.9%
unpow261.9%
fma-undefine61.9%
Simplified61.9%
Taylor expanded in F around inf 99.1%
Final simplification99.1%
(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.4)
(- (/ (* 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.4) {
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.4d0) 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.4) {
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.4: 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.4) 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.4) 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.4], 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.4:\\
\;\;\;\;\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 58.5%
Taylor expanded in F around -inf 98.8%
+-commutative98.8%
div-inv98.9%
unsub-neg98.9%
Applied egg-rr98.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
if 1.3999999999999999 < F Initial program 51.6%
Simplified61.9%
Taylor expanded in x around 0 61.9%
associate-*l/61.9%
*-lft-identity61.9%
+-commutative61.9%
unpow261.9%
fma-undefine61.9%
Simplified61.9%
Taylor expanded in F around inf 99.1%
Final simplification99.1%
(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.4)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F / sqrt(2.0)) / 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.4d0) then
tmp = ((f / sqrt(2.0d0)) / 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.4) {
tmp = ((F / Math.sqrt(2.0)) / 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.4: tmp = ((F / math.sqrt(2.0)) / 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.4) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / 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.4) tmp = ((F / sqrt(2.0)) / 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.4], N[(N[(N[(F / N[Sqrt[2.0], $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.4:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 58.5%
Taylor expanded in F around -inf 98.8%
+-commutative98.8%
div-inv98.9%
unsub-neg98.9%
Applied egg-rr98.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 99.3%
if 1.3999999999999999 < F Initial program 51.6%
Simplified61.9%
Taylor expanded in x around 0 61.9%
associate-*l/61.9%
*-lft-identity61.9%
+-commutative61.9%
unpow261.9%
fma-undefine61.9%
Simplified61.9%
Taylor expanded in F around inf 99.1%
Final simplification99.1%
(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 -40000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.6e-127)
t_0
(if (<= F 3.2e-185)
(/ (- x) (tan B))
(if (<= F 1350000.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 <= -40000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.6e-127) {
tmp = t_0;
} else if (F <= 3.2e-185) {
tmp = -x / tan(B);
} else if (F <= 1350000.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 <= (-40000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.6d-127)) then
tmp = t_0
else if (f <= 3.2d-185) then
tmp = -x / tan(b)
else if (f <= 1350000.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 <= -40000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.6e-127) {
tmp = t_0;
} else if (F <= 3.2e-185) {
tmp = -x / Math.tan(B);
} else if (F <= 1350000.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 <= -40000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.6e-127: tmp = t_0 elif F <= 3.2e-185: tmp = -x / math.tan(B) elif F <= 1350000.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 <= -40000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.6e-127) tmp = t_0; elseif (F <= 3.2e-185) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1350000.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 <= -40000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.6e-127) tmp = t_0; elseif (F <= 3.2e-185) tmp = -x / tan(B); elseif (F <= 1350000.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, -40000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.6e-127], t$95$0, If[LessEqual[F, 3.2e-185], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1350000.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 -40000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-185}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1350000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -4e7Initial program 56.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
div-inv99.7%
unsub-neg99.7%
Applied egg-rr99.7%
if -4e7 < F < -1.60000000000000009e-127 or 3.1999999999999997e-185 < F < 1.35e6Initial program 99.4%
Taylor expanded in B around 0 84.4%
if -1.60000000000000009e-127 < F < 3.1999999999999997e-185Initial program 99.5%
Taylor expanded in F around -inf 34.1%
Taylor expanded in x around inf 82.1%
mul-1-neg82.1%
associate-/l*82.0%
distribute-rgt-neg-in82.0%
Simplified82.0%
distribute-rgt-neg-out82.0%
neg-sub082.0%
clear-num81.9%
un-div-inv82.0%
quot-tan82.1%
Applied egg-rr82.1%
neg-sub082.1%
distribute-neg-frac82.1%
Simplified82.1%
if 1.35e6 < F Initial program 50.9%
Simplified61.4%
Taylor expanded in x around 0 61.4%
associate-*l/61.4%
*-lft-identity61.4%
+-commutative61.4%
unpow261.4%
fma-undefine61.4%
Simplified61.4%
Taylor expanded in F around inf 99.7%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (/ x (tan B)))
(t_2 (/ 1.0 (sin B))))
(if (<= F -40000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.7e-127)
(- (* t_0 (* F t_2)) (/ x B))
(if (<= F 2.9e-186)
(/ (- x) (tan B))
(if (<= F 3000000.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(- t_2 t_1)))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double t_2 = 1.0 / sin(B);
double tmp;
if (F <= -40000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.7e-127) {
tmp = (t_0 * (F * t_2)) - (x / B);
} else if (F <= 2.9e-186) {
tmp = -x / tan(B);
} else if (F <= 3000000.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = t_2 - 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) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
t_2 = 1.0d0 / sin(b)
if (f <= (-40000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.7d-127)) then
tmp = (t_0 * (f * t_2)) - (x / b)
else if (f <= 2.9d-186) then
tmp = -x / tan(b)
else if (f <= 3000000.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = t_2 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double t_2 = 1.0 / Math.sin(B);
double tmp;
if (F <= -40000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.7e-127) {
tmp = (t_0 * (F * t_2)) - (x / B);
} else if (F <= 2.9e-186) {
tmp = -x / Math.tan(B);
} else if (F <= 3000000.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = t_2 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) t_2 = 1.0 / math.sin(B) tmp = 0 if F <= -40000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.7e-127: tmp = (t_0 * (F * t_2)) - (x / B) elif F <= 2.9e-186: tmp = -x / math.tan(B) elif F <= 3000000.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = t_2 - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) t_2 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -40000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.7e-127) tmp = Float64(Float64(t_0 * Float64(F * t_2)) - Float64(x / B)); elseif (F <= 2.9e-186) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 3000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(t_2 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); t_2 = 1.0 / sin(B); tmp = 0.0; if (F <= -40000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.7e-127) tmp = (t_0 * (F * t_2)) - (x / B); elseif (F <= 2.9e-186) tmp = -x / tan(B); elseif (F <= 3000000.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = t_2 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -40000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.7e-127], N[(N[(t$95$0 * N[(F * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-186], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$2 - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -40000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-127}:\\
\;\;\;\;t\_0 \cdot \left(F \cdot t\_2\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-186}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 3000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_2 - t\_1\\
\end{array}
\end{array}
if F < -4e7Initial program 56.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
div-inv99.7%
unsub-neg99.7%
Applied egg-rr99.7%
if -4e7 < F < -1.6999999999999999e-127Initial program 99.3%
Taylor expanded in B around 0 86.0%
div-inv86.0%
Applied egg-rr86.0%
if -1.6999999999999999e-127 < F < 2.90000000000000019e-186Initial program 99.5%
Taylor expanded in F around -inf 34.1%
Taylor expanded in x around inf 82.1%
mul-1-neg82.1%
associate-/l*82.0%
distribute-rgt-neg-in82.0%
Simplified82.0%
distribute-rgt-neg-out82.0%
neg-sub082.0%
clear-num81.9%
un-div-inv82.0%
quot-tan82.1%
Applied egg-rr82.1%
neg-sub082.1%
distribute-neg-frac82.1%
Simplified82.1%
if 2.90000000000000019e-186 < F < 3e6Initial program 99.5%
Taylor expanded in B around 0 82.7%
if 3e6 < F Initial program 50.9%
Simplified61.4%
Taylor expanded in x around 0 61.4%
associate-*l/61.4%
*-lft-identity61.4%
+-commutative61.4%
unpow261.4%
fma-undefine61.4%
Simplified61.4%
Taylor expanded in F around inf 99.7%
Final simplification92.9%
(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 -1.8)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.6e-127)
t_0
(if (<= F 6.8e-185)
(/ (- x) (tan 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 <= -1.8) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.6e-127) {
tmp = t_0;
} else if (F <= 6.8e-185) {
tmp = -x / tan(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 <= (-1.8d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.6d-127)) then
tmp = t_0
else if (f <= 6.8d-185) then
tmp = -x / tan(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 <= -1.8) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.6e-127) {
tmp = t_0;
} else if (F <= 6.8e-185) {
tmp = -x / Math.tan(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 <= -1.8: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.6e-127: tmp = t_0 elif F <= 6.8e-185: tmp = -x / math.tan(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 <= -1.8) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.6e-127) tmp = t_0; elseif (F <= 6.8e-185) tmp = Float64(Float64(-x) / tan(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 <= -1.8) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.6e-127) tmp = t_0; elseif (F <= 6.8e-185) tmp = -x / tan(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, -1.8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.6e-127], t$95$0, If[LessEqual[F, 6.8e-185], N[((-x) / N[Tan[B], $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.8:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-185}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.44:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.80000000000000004Initial program 58.5%
Taylor expanded in F around -inf 98.8%
+-commutative98.8%
div-inv98.9%
unsub-neg98.9%
Applied egg-rr98.9%
if -1.80000000000000004 < F < -1.60000000000000009e-127 or 6.7999999999999996e-185 < F < 0.440000000000000002Initial program 99.4%
Taylor expanded in B around 0 83.3%
Taylor expanded in F around 0 82.6%
if -1.60000000000000009e-127 < F < 6.7999999999999996e-185Initial program 99.5%
Taylor expanded in F around -inf 34.1%
Taylor expanded in x around inf 82.1%
mul-1-neg82.1%
associate-/l*82.0%
distribute-rgt-neg-in82.0%
Simplified82.0%
distribute-rgt-neg-out82.0%
neg-sub082.0%
clear-num81.9%
un-div-inv82.0%
quot-tan82.1%
Applied egg-rr82.1%
neg-sub082.1%
distribute-neg-frac82.1%
Simplified82.1%
if 0.440000000000000002 < F Initial program 51.6%
Simplified61.9%
Taylor expanded in x around 0 61.9%
associate-*l/61.9%
*-lft-identity61.9%
+-commutative61.9%
unpow261.9%
fma-undefine61.9%
Simplified61.9%
Taylor expanded in F around inf 99.1%
Final simplification92.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -4.8e-52)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -6.4e-127)
t_0
(if (<= F -1.05e-175)
(/ (- x) (tan B))
(if (<= F -3.5e-194)
t_0
(if (<= F 4.1e-10)
(/ (* (- x) (cos B)) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -4.8e-52) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -6.4e-127) {
tmp = t_0;
} else if (F <= -1.05e-175) {
tmp = -x / tan(B);
} else if (F <= -3.5e-194) {
tmp = t_0;
} else if (F <= 4.1e-10) {
tmp = (-x * cos(B)) / 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) :: t_0
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-4.8d-52)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-6.4d-127)) then
tmp = t_0
else if (f <= (-1.05d-175)) then
tmp = -x / tan(b)
else if (f <= (-3.5d-194)) then
tmp = t_0
else if (f <= 4.1d-10) then
tmp = (-x * cos(b)) / 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 t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -4.8e-52) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -6.4e-127) {
tmp = t_0;
} else if (F <= -1.05e-175) {
tmp = -x / Math.tan(B);
} else if (F <= -3.5e-194) {
tmp = t_0;
} else if (F <= 4.1e-10) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -4.8e-52: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -6.4e-127: tmp = t_0 elif F <= -1.05e-175: tmp = -x / math.tan(B) elif F <= -3.5e-194: tmp = t_0 elif F <= 4.1e-10: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -4.8e-52) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -6.4e-127) tmp = t_0; elseif (F <= -1.05e-175) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= -3.5e-194) tmp = t_0; elseif (F <= 4.1e-10) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -4.8e-52) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -6.4e-127) tmp = t_0; elseif (F <= -1.05e-175) tmp = -x / tan(B); elseif (F <= -3.5e-194) tmp = t_0; elseif (F <= 4.1e-10) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = 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.8e-52], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.4e-127], t$95$0, If[LessEqual[F, -1.05e-175], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.5e-194], t$95$0, If[LessEqual[F, 4.1e-10], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-175}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-194}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{-10}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.8000000000000003e-52Initial program 62.0%
Taylor expanded in F around -inf 95.7%
Taylor expanded in B around 0 78.7%
if -4.8000000000000003e-52 < F < -6.40000000000000035e-127 or -1.05e-175 < F < -3.5000000000000003e-194Initial program 99.0%
Taylor expanded in B around 0 85.8%
Taylor expanded in B around 0 53.8%
Taylor expanded in F around 0 53.8%
if -6.40000000000000035e-127 < F < -1.05e-175Initial program 99.3%
Taylor expanded in F around -inf 48.3%
Taylor expanded in x around inf 76.0%
mul-1-neg76.0%
associate-/l*76.0%
distribute-rgt-neg-in76.0%
Simplified76.0%
distribute-rgt-neg-out76.0%
neg-sub076.0%
clear-num75.9%
un-div-inv76.1%
quot-tan76.3%
Applied egg-rr76.3%
neg-sub076.3%
distribute-neg-frac76.3%
Simplified76.3%
if -3.5000000000000003e-194 < F < 4.0999999999999998e-10Initial program 99.6%
Taylor expanded in F around -inf 25.6%
Taylor expanded in x around inf 67.7%
associate-*r/67.7%
neg-mul-167.7%
distribute-lft-neg-in67.7%
Simplified67.7%
if 4.0999999999999998e-10 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in F around inf 83.1%
Final simplification75.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e-9)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.06e-11)
(/ (* (- x) (cos B)) (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 <= -2.4e-9) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.06e-11) {
tmp = (-x * cos(B)) / 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 <= (-2.4d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.06d-11) then
tmp = (-x * cos(b)) / 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 <= -2.4e-9) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.06e-11) {
tmp = (-x * Math.cos(B)) / 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 <= -2.4e-9: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.06e-11: tmp = (-x * math.cos(B)) / 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 <= -2.4e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.06e-11) tmp = Float64(Float64(Float64(-x) * cos(B)) / 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 <= -2.4e-9) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.06e-11) tmp = (-x * cos(B)) / 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, -2.4e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.06e-11], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.06 \cdot 10^{-11}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.4e-9Initial program 59.0%
Taylor expanded in F around -inf 97.7%
+-commutative97.7%
div-inv97.8%
unsub-neg97.8%
Applied egg-rr97.8%
if -2.4e-9 < F < 1.05999999999999993e-11Initial program 99.4%
Taylor expanded in F around -inf 32.3%
Taylor expanded in x around inf 62.1%
associate-*r/62.1%
neg-mul-162.1%
distribute-lft-neg-in62.1%
Simplified62.1%
if 1.05999999999999993e-11 < F Initial program 51.6%
Simplified61.9%
Taylor expanded in x around 0 61.9%
associate-*l/61.9%
*-lft-identity61.9%
+-commutative61.9%
unpow261.9%
fma-undefine61.9%
Simplified61.9%
Taylor expanded in F around inf 99.1%
Final simplification84.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.2e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.0037)
(/ (* (- x) (cos B)) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.0037) {
tmp = (-x * cos(B)) / 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.2d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.0037d0) then
tmp = (-x * cos(b)) / 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.2e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.0037) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.0037: tmp = (-x * math.cos(B)) / 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.2e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.0037) tmp = Float64(Float64(Float64(-x) * cos(B)) / 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.2e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.0037) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0037], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $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.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.0037:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.2e-9Initial program 59.0%
Taylor expanded in F around -inf 97.7%
+-commutative97.7%
div-inv97.8%
unsub-neg97.8%
Applied egg-rr97.8%
if -1.2e-9 < F < 0.0037000000000000002Initial program 99.4%
Taylor expanded in F around -inf 32.3%
Taylor expanded in x around inf 62.1%
associate-*r/62.1%
neg-mul-162.1%
distribute-lft-neg-in62.1%
Simplified62.1%
if 0.0037000000000000002 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in F around inf 83.1%
Final simplification79.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ (- x) (tan B))))
(if (<= F -4.8e-52)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -4.7e-127)
t_0
(if (<= F -1.05e-175)
t_1
(if (<= F -3.5e-194)
t_0
(if (<= F 3.05) t_1 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = -x / tan(B);
double tmp;
if (F <= -4.8e-52) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -4.7e-127) {
tmp = t_0;
} else if (F <= -1.05e-175) {
tmp = t_1;
} else if (F <= -3.5e-194) {
tmp = t_0;
} else if (F <= 3.05) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = -x / tan(b)
if (f <= (-4.8d-52)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-4.7d-127)) then
tmp = t_0
else if (f <= (-1.05d-175)) then
tmp = t_1
else if (f <= (-3.5d-194)) then
tmp = t_0
else if (f <= 3.05d0) then
tmp = t_1
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 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = -x / Math.tan(B);
double tmp;
if (F <= -4.8e-52) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -4.7e-127) {
tmp = t_0;
} else if (F <= -1.05e-175) {
tmp = t_1;
} else if (F <= -3.5e-194) {
tmp = t_0;
} else if (F <= 3.05) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = -x / math.tan(B) tmp = 0 if F <= -4.8e-52: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -4.7e-127: tmp = t_0 elif F <= -1.05e-175: tmp = t_1 elif F <= -3.5e-194: tmp = t_0 elif F <= 3.05: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -4.8e-52) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -4.7e-127) tmp = t_0; elseif (F <= -1.05e-175) tmp = t_1; elseif (F <= -3.5e-194) tmp = t_0; elseif (F <= 3.05) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = -x / tan(B); tmp = 0.0; if (F <= -4.8e-52) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -4.7e-127) tmp = t_0; elseif (F <= -1.05e-175) tmp = t_1; elseif (F <= -3.5e-194) tmp = t_0; elseif (F <= 3.05) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.8e-52], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.7e-127], t$95$0, If[LessEqual[F, -1.05e-175], t$95$1, If[LessEqual[F, -3.5e-194], t$95$0, If[LessEqual[F, 3.05], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -4.8 \cdot 10^{-52}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.7 \cdot 10^{-127}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-175}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-194}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.05:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.8000000000000003e-52Initial program 62.0%
Taylor expanded in F around -inf 95.7%
Taylor expanded in B around 0 78.7%
if -4.8000000000000003e-52 < F < -4.70000000000000001e-127 or -1.05e-175 < F < -3.5000000000000003e-194Initial program 99.0%
Taylor expanded in B around 0 85.8%
Taylor expanded in B around 0 53.8%
Taylor expanded in F around 0 53.8%
if -4.70000000000000001e-127 < F < -1.05e-175 or -3.5000000000000003e-194 < F < 3.0499999999999998Initial program 99.6%
Taylor expanded in F around -inf 30.7%
Taylor expanded in x around inf 69.6%
mul-1-neg69.6%
associate-/l*69.5%
distribute-rgt-neg-in69.5%
Simplified69.5%
distribute-rgt-neg-out69.5%
neg-sub069.5%
clear-num69.4%
un-div-inv69.6%
quot-tan69.6%
Applied egg-rr69.6%
neg-sub069.6%
distribute-neg-frac69.6%
Simplified69.6%
if 3.0499999999999998 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in F around inf 83.1%
Final simplification75.1%
(FPCore (F B x) :precision binary64 (if (<= F -2.15e-5) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 0.0076) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.15e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.0076) {
tmp = -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 <= (-2.15d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.0076d0) then
tmp = -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 <= -2.15e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.0076) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.15e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.0076: tmp = -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 <= -2.15e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.0076) tmp = Float64(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 <= -2.15e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.0076) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.15e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0076], N[((-x) / N[Tan[B], $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.15 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.0076:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.1500000000000001e-5Initial program 59.0%
Taylor expanded in B around 0 39.5%
Taylor expanded in F around -inf 78.2%
mul-1-neg78.2%
distribute-neg-in78.2%
distribute-neg-frac78.2%
metadata-eval78.2%
unsub-neg78.2%
Simplified78.2%
if -2.1500000000000001e-5 < F < 0.00759999999999999998Initial program 99.4%
Taylor expanded in F around -inf 32.3%
Taylor expanded in x around inf 62.1%
mul-1-neg62.1%
associate-/l*62.0%
distribute-rgt-neg-in62.0%
Simplified62.0%
distribute-rgt-neg-out62.0%
neg-sub062.0%
clear-num62.0%
un-div-inv62.1%
quot-tan62.1%
Applied egg-rr62.1%
neg-sub062.1%
distribute-neg-frac62.1%
Simplified62.1%
if 0.00759999999999999998 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in F around inf 83.1%
Final simplification73.3%
(FPCore (F B x) :precision binary64 (if (<= F -9e-69) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (if (<= F 0.34) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-69) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 0.34) {
tmp = -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 <= (-9d-69)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 0.34d0) then
tmp = -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 <= -9e-69) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 0.34) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-69: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 0.34: tmp = -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 <= -9e-69) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 0.34) tmp = Float64(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 <= -9e-69) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 0.34) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-69], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.34], N[((-x) / N[Tan[B], $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 -9 \cdot 10^{-69}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 0.34:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.00000000000000019e-69Initial program 64.8%
Taylor expanded in F around -inf 89.8%
Taylor expanded in B around 0 74.1%
if -9.00000000000000019e-69 < F < 0.340000000000000024Initial program 99.4%
Taylor expanded in F around -inf 30.7%
Taylor expanded in x around inf 64.2%
mul-1-neg64.2%
associate-/l*64.1%
distribute-rgt-neg-in64.1%
Simplified64.1%
distribute-rgt-neg-out64.1%
neg-sub064.1%
clear-num64.0%
un-div-inv64.2%
quot-tan64.2%
Applied egg-rr64.2%
neg-sub064.2%
distribute-neg-frac64.2%
Simplified64.2%
if 0.340000000000000024 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in F around inf 83.1%
Final simplification73.4%
(FPCore (F B x) :precision binary64 (if (<= F -0.00018) (/ (- -1.0 x) B) (if (<= F 920.0) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00018) {
tmp = (-1.0 - x) / B;
} else if (F <= 920.0) {
tmp = -x / tan(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 <= (-0.00018d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 920.0d0) then
tmp = -x / tan(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 <= -0.00018) {
tmp = (-1.0 - x) / B;
} else if (F <= 920.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00018: tmp = (-1.0 - x) / B elif F <= 920.0: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00018) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 920.0) tmp = Float64(Float64(-x) / tan(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 <= -0.00018) tmp = (-1.0 - x) / B; elseif (F <= 920.0) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00018], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 920.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00018:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 920:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.80000000000000011e-4Initial program 59.0%
Taylor expanded in B around 0 39.5%
Taylor expanded in B around 0 46.4%
Taylor expanded in F around -inf 58.8%
if -1.80000000000000011e-4 < F < 920Initial program 99.4%
Taylor expanded in F around -inf 32.3%
Taylor expanded in x around inf 62.1%
mul-1-neg62.1%
associate-/l*62.0%
distribute-rgt-neg-in62.0%
Simplified62.0%
distribute-rgt-neg-out62.0%
neg-sub062.0%
clear-num62.0%
un-div-inv62.1%
quot-tan62.1%
Applied egg-rr62.1%
neg-sub062.1%
distribute-neg-frac62.1%
Simplified62.1%
if 920 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in B around 0 37.2%
Taylor expanded in F around inf 50.6%
Final simplification57.6%
(FPCore (F B x) :precision binary64 (if (<= F -9.6e-5) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 70.0) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.6e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 70.0) {
tmp = -x / tan(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.6d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 70.0d0) then
tmp = -x / tan(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.6e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 70.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.6e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 70.0: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 70.0) tmp = Float64(Float64(-x) / tan(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.6e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 70.0) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 70.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 70:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.6000000000000002e-5Initial program 59.0%
Taylor expanded in B around 0 39.5%
Taylor expanded in F around -inf 78.2%
mul-1-neg78.2%
distribute-neg-in78.2%
distribute-neg-frac78.2%
metadata-eval78.2%
unsub-neg78.2%
Simplified78.2%
if -9.6000000000000002e-5 < F < 70Initial program 99.4%
Taylor expanded in F around -inf 32.3%
Taylor expanded in x around inf 62.1%
mul-1-neg62.1%
associate-/l*62.0%
distribute-rgt-neg-in62.0%
Simplified62.0%
distribute-rgt-neg-out62.0%
neg-sub062.0%
clear-num62.0%
un-div-inv62.1%
quot-tan62.1%
Applied egg-rr62.1%
neg-sub062.1%
distribute-neg-frac62.1%
Simplified62.1%
if 70 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in B around 0 37.2%
Taylor expanded in F around inf 50.6%
Final simplification63.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.4e-70) (/ (- -1.0 x) B) (if (<= F 3.5e-15) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-70) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.5e-15) {
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 <= (-1.4d-70)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.5d-15) 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 <= -1.4e-70) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.5e-15) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-70: tmp = (-1.0 - x) / B elif F <= 3.5e-15: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-70) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.5e-15) 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 <= -1.4e-70) tmp = (-1.0 - x) / B; elseif (F <= 3.5e-15) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-70], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.5e-15], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-70}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.4e-70Initial program 64.8%
Taylor expanded in B around 0 46.0%
Taylor expanded in B around 0 46.7%
Taylor expanded in F around -inf 55.3%
if -1.4e-70 < F < 3.5000000000000001e-15Initial program 99.4%
Taylor expanded in B around 0 70.5%
Taylor expanded in x around inf 36.6%
associate-*r/36.6%
neg-mul-136.6%
Simplified36.6%
if 3.5000000000000001e-15 < F Initial program 51.6%
Taylor expanded in B around 0 36.7%
Taylor expanded in B around 0 37.2%
Taylor expanded in F around inf 50.6%
Final simplification47.4%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.1e-91) (not (<= x 1.66e-43))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.1e-91) || !(x <= 1.66e-43)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.1d-91)) .or. (.not. (x <= 1.66d-43))) then
tmp = x / -b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.1e-91) || !(x <= 1.66e-43)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.1e-91) or not (x <= 1.66e-43): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.1e-91) || !(x <= 1.66e-43)) tmp = Float64(x / Float64(-B)); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.1e-91) || ~((x <= 1.66e-43))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.1e-91], N[Not[LessEqual[x, 1.66e-43]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-91} \lor \neg \left(x \leq 1.66 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -1.1e-91 or 1.66e-43 < x Initial program 76.5%
Taylor expanded in B around 0 42.5%
Taylor expanded in x around inf 50.3%
associate-*r/50.3%
neg-mul-150.3%
Simplified50.3%
if -1.1e-91 < x < 1.66e-43Initial program 69.0%
Taylor expanded in B around 0 61.5%
Taylor expanded in B around 0 33.2%
Taylor expanded in F around -inf 19.3%
Taylor expanded in x around 0 19.3%
Final simplification35.3%
(FPCore (F B x) :precision binary64 (if (<= F -9e-69) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e-69) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9d-69)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e-69) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e-69: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e-69) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e-69) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e-69], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{-69}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -9.00000000000000019e-69Initial program 64.8%
Taylor expanded in B around 0 46.0%
Taylor expanded in B around 0 46.7%
Taylor expanded in F around -inf 55.3%
if -9.00000000000000019e-69 < F Initial program 77.2%
Taylor expanded in B around 0 54.8%
Taylor expanded in x around inf 31.0%
associate-*r/31.0%
neg-mul-131.0%
Simplified31.0%
Final simplification39.5%
(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 72.9%
Taylor expanded in B around 0 51.7%
Taylor expanded in B around 0 45.1%
Taylor expanded in F around -inf 32.8%
Taylor expanded in x around 0 11.7%
Final simplification11.7%
herbie shell --seed 2024078
(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))))))