
(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 25 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 -54000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 150000000.0)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -54000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 150000000.0) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -54000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 150000000.0) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / 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, -54000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 150000000.0], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -54000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 150000000:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.4e10Initial program 60.6%
Simplified69.9%
Taylor expanded in F around -inf 99.8%
if -5.4e10 < F < 1.5e8Initial program 99.5%
Simplified99.6%
if 1.5e8 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.5e+56)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 800000000.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 <= -3.5e+56) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 800000000.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 <= (-3.5d+56)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 800000000.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 <= -3.5e+56) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 800000000.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 <= -3.5e+56: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 800000000.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 <= -3.5e+56) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 800000000.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 <= -3.5e+56) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 800000000.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, -3.5e+56], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 800000000.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 -3.5 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 800000000:\\
\;\;\;\;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 < -3.49999999999999999e56Initial program 58.5%
Simplified68.3%
Taylor expanded in F around -inf 99.8%
if -3.49999999999999999e56 < F < 8e8Initial program 99.5%
if 8e8 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.4) (- (* t_0 (* F (sqrt 0.5))) t_1) (- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.4) {
tmp = (t_0 * (F * sqrt(0.5))) - t_1;
} else {
tmp = t_0 - 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 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.4d0) then
tmp = (t_0 * (f * sqrt(0.5d0))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.4) {
tmp = (t_0 * (F * Math.sqrt(0.5))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.4: tmp = (t_0 * (F * math.sqrt(0.5))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.4) tmp = Float64(Float64(t_0 * Float64(F * sqrt(0.5))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.4) tmp = (t_0 * (F * sqrt(0.5))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(t$95$0 * N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;t\_0 \cdot \left(F \cdot \sqrt{0.5}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in x around 0 97.3%
div-inv97.4%
Applied egg-rr97.4%
if 1.3999999999999999 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Final simplification98.7%
(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 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in x around 0 97.3%
associate-/l*97.4%
Simplified97.4%
if 1.3999999999999999 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.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))))
(if (<= F -400.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 4.2e-92)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 8500000.0)
(- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
(- (/ 1.0 (sin B)) 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 tmp;
if (F <= -400.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 4.2e-92) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 8500000.0) {
tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-400.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 4.2d-92) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 8500000.0d0) then
tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -400.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 4.2e-92) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 8500000.0) {
tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - 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) tmp = 0 if F <= -400.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 4.2e-92: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 8500000.0: tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B) else: tmp = (1.0 / math.sin(B)) - 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)) tmp = 0.0 if (F <= -400.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 4.2e-92) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 8500000.0) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -400.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 4.2e-92) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 8500000.0) tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B); else tmp = (1.0 / sin(B)) - 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]}, If[LessEqual[F, -400.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 4.2e-92], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8500000.0], N[(N[(t$95$0 * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -400:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-92}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 8500000:\\
\;\;\;\;t\_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -400Initial program 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -400 < F < 4.2e-92Initial program 99.5%
Taylor expanded in B around 0 85.6%
if 4.2e-92 < F < 8.5e6Initial program 99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in B around 0 94.8%
associate-*r/94.8%
neg-mul-194.8%
Simplified94.8%
if 8.5e6 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -380.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.6e-91)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(if (<= F 480000.0)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) 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 tmp;
if (F <= -380.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.6e-91) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} else if (F <= 480000.0) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-380.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.6d-91) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
else if (f <= 480000.0d0) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -380.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.6e-91) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else if (F <= 480000.0) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - 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) tmp = 0 if F <= -380.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.6e-91: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) elif F <= 480000.0: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - 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)) tmp = 0.0 if (F <= -380.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.6e-91) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); elseif (F <= 480000.0) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -380.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.6e-91) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); elseif (F <= 480000.0) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - 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]}, If[LessEqual[F, -380.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.6e-91], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 480000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -380:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-91}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 480000:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -380Initial program 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -380 < F < 1.59999999999999998e-91Initial program 99.5%
Taylor expanded in B around 0 85.6%
if 1.59999999999999998e-91 < F < 4.8e5Initial program 99.7%
Taylor expanded in B around 0 94.8%
associate-*r/94.8%
neg-mul-194.8%
Simplified94.8%
metadata-eval94.8%
metadata-eval94.8%
Applied egg-rr94.8%
if 4.8e5 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.14)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-92)
(- (/ (* F (sqrt 0.5)) B) t_0)
(if (<= F 235000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x 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 <= -0.14) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-92) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else if (F <= 235000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= (-0.14d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-92) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else if (f <= 235000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / 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 <= -0.14) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-92) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else if (F <= 235000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= -0.14: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-92: tmp = ((F * math.sqrt(0.5)) / B) - t_0 elif F <= 235000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= -0.14) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-92) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); elseif (F <= 235000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / 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 <= -0.14) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-92) tmp = ((F * sqrt(0.5)) / B) - t_0; elseif (F <= 235000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / 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, -0.14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-92], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 235000.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], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.14:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-92}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 235000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.14000000000000001Initial program 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -0.14000000000000001 < F < 9.99999999999999988e-93Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 99.2%
Taylor expanded in B around 0 85.3%
if 9.99999999999999988e-93 < F < 235000Initial program 99.7%
Taylor expanded in B around 0 94.8%
associate-*r/94.8%
neg-mul-194.8%
Simplified94.8%
metadata-eval94.8%
metadata-eval94.8%
Applied egg-rr94.8%
if 235000 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.22)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.35e-92)
(- (/ (* F (sqrt 0.5)) B) t_0)
(if (<= F 1.05)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x 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 <= -0.22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.35e-92) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else if (F <= 1.05) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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 <= (-0.22d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.35d-92) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else if (f <= 1.05d0) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / 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 <= -0.22) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.35e-92) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else if (F <= 1.05) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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 <= -0.22: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.35e-92: tmp = ((F * math.sqrt(0.5)) / B) - t_0 elif F <= 1.05: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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 <= -0.22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.35e-92) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); elseif (F <= 1.05) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / 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 <= -0.22) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.35e-92) tmp = ((F * sqrt(0.5)) / B) - t_0; elseif (F <= 1.05) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / 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, -0.22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35e-92], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.05], 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], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.22:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-92}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.05:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.220000000000000001Initial program 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -0.220000000000000001 < F < 1.34999999999999998e-92Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 99.2%
Taylor expanded in B around 0 85.3%
if 1.34999999999999998e-92 < F < 1.05000000000000004Initial program 99.7%
Simplified99.5%
Taylor expanded in F around 0 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in B around 0 83.6%
if 1.05000000000000004 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0039)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.09)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0039) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.0039d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.09d0) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.0039) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0039: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.09: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0039) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.09) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0039) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.09) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0039], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.09], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0039:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.09:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.0038999999999999998Initial program 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -0.0038999999999999998 < F < 0.089999999999999997Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in B around 0 81.9%
if 0.089999999999999997 < F Initial program 53.1%
Simplified71.0%
Taylor expanded in F around inf 97.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.2e-29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.75e-74)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.05)
(* 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 <= -6.2e-29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.75e-74) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.05) {
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 <= (-6.2d-29)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.75d-74) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.05d0) 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 <= -6.2e-29) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.75e-74) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.05) {
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 <= -6.2e-29: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.75e-74: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.05: 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 <= -6.2e-29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.75e-74) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.05) 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 <= -6.2e-29) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.75e-74) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.05) 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, -6.2e-29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.75e-74], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.05], 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 -6.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-74}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.05:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.20000000000000052e-29Initial program 63.9%
Simplified72.4%
Taylor expanded in F around -inf 96.5%
if -6.20000000000000052e-29 < F < 1.75000000000000007e-74Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 43.0%
Taylor expanded in x around inf 75.2%
mul-1-neg75.2%
Simplified75.2%
if 1.75000000000000007e-74 < F < 1.05000000000000004Initial program 99.7%
Simplified99.4%
Taylor expanded in F around 0 84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in x around 0 84.1%
Taylor expanded in F around inf 62.8%
associate-*r/62.9%
Simplified62.9%
if 1.05000000000000004 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Final simplification87.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.4e-29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.85e-74)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.05)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.4e-29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.85e-74) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.05) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - 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 <= (-5.4d-29)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.85d-74) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.05d0) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - 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 <= -5.4e-29) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.85e-74) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.05) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.4e-29: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.85e-74: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.05: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.4e-29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.85e-74) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.05) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.4e-29) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.85e-74) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.05) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - 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, -5.4e-29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.85e-74], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.05], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.4 \cdot 10^{-29}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.85 \cdot 10^{-74}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.05:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - t\_0\\
\end{array}
\end{array}
if F < -5.40000000000000045e-29Initial program 63.9%
Simplified72.4%
Taylor expanded in F around -inf 96.5%
if -5.40000000000000045e-29 < F < 2.85000000000000012e-74Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 43.0%
Taylor expanded in x around inf 75.2%
mul-1-neg75.2%
Simplified75.2%
if 2.85000000000000012e-74 < F < 1.05000000000000004Initial program 99.7%
Simplified99.4%
Taylor expanded in F around 0 84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in x around 0 84.1%
Taylor expanded in F around inf 62.8%
associate-*r/62.9%
Simplified62.9%
if 1.05000000000000004 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 70.1%
*-commutative70.1%
Simplified70.1%
unpow270.1%
Applied egg-rr70.1%
Final simplification80.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.65e-28)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.1e-77)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1.05)
(* F (/ (sqrt 0.5) (sin B)))
(-
(/ 1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666))))
(/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.1e-77) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1.05) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.65d-28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.1d-77) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1.05d0) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.1e-77) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1.05) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.65e-28: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.1e-77: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1.05: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.65e-28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.1e-77) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1.05) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.65e-28) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.1e-77) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1.05) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.65e-28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-77], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.05], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-77}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.05:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.6500000000000001e-28Initial program 63.9%
Simplified72.4%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 79.1%
if -1.6500000000000001e-28 < F < 1.10000000000000003e-77Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 43.0%
Taylor expanded in x around inf 75.2%
mul-1-neg75.2%
Simplified75.2%
if 1.10000000000000003e-77 < F < 1.05000000000000004Initial program 99.7%
Simplified99.4%
Taylor expanded in F around 0 84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in x around 0 84.1%
Taylor expanded in F around inf 62.8%
associate-*r/62.9%
Simplified62.9%
if 1.05000000000000004 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 70.1%
*-commutative70.1%
Simplified70.1%
unpow270.1%
Applied egg-rr70.1%
Final simplification74.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.09) (- (/ (* F (sqrt 0.5)) B) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.21d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.09d0) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.09: tmp = ((F * math.sqrt(0.5)) / B) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.09) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / 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 <= -0.21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.09) tmp = ((F * sqrt(0.5)) / B) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.09], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.21:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.09:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 62.1%
Simplified71.0%
Taylor expanded in F around -inf 99.7%
if -0.209999999999999992 < F < 0.089999999999999997Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x around 0 98.7%
Taylor expanded in B around 0 81.8%
if 0.089999999999999997 < F Initial program 53.1%
Simplified71.0%
Taylor expanded in F around inf 97.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4e-22)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.1e-230)
(- (/ -1.0 B) t_0)
(if (<= F 108000.0)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4e-22) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.1e-230) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 108000.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - 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.4d-22)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.1d-230)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 108000.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (1.0d0 / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - 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.4e-22) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.1e-230) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 108000.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4e-22: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.1e-230: tmp = (-1.0 / B) - t_0 elif F <= 108000.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4e-22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.1e-230) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 108000.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4e-22) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.1e-230) tmp = (-1.0 / B) - t_0; elseif (F <= 108000.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - 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.4e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.1e-230], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 108000.0], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-230}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 108000:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - t\_0\\
\end{array}
\end{array}
if F < -1.39999999999999997e-22Initial program 63.4%
Simplified72.0%
Taylor expanded in F around -inf 97.5%
Taylor expanded in B around 0 79.9%
if -1.39999999999999997e-22 < F < -1.0999999999999999e-230Initial program 99.4%
Simplified99.5%
Taylor expanded in F around -inf 44.8%
Taylor expanded in B around 0 56.2%
if -1.0999999999999999e-230 < F < 108000Initial program 99.6%
Taylor expanded in B around 0 87.5%
Taylor expanded in B around 0 65.6%
associate-*r/77.4%
neg-mul-177.4%
Simplified65.6%
if 108000 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 70.1%
*-commutative70.1%
Simplified70.1%
unpow270.1%
Applied egg-rr70.1%
Final simplification70.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.6e-24)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.25e-232)
(- (/ -1.0 B) t_0)
(if (<= F 0.016)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.6e-24) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.25e-232) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 0.016) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - 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 <= (-9.6d-24)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.25d-232)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 0.016d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - 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 <= -9.6e-24) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.25e-232) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 0.016) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.6e-24: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.25e-232: tmp = (-1.0 / B) - t_0 elif F <= 0.016: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.6e-24) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.25e-232) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 0.016) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.6e-24) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.25e-232) tmp = (-1.0 / B) - t_0; elseif (F <= 0.016) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - 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, -9.6e-24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.25e-232], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.016], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9.6 \cdot 10^{-24}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{-232}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 0.016:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - t\_0\\
\end{array}
\end{array}
if F < -9.5999999999999993e-24Initial program 63.4%
Simplified72.0%
Taylor expanded in F around -inf 97.5%
Taylor expanded in B around 0 79.9%
if -9.5999999999999993e-24 < F < -2.24999999999999983e-232Initial program 99.4%
Simplified99.5%
Taylor expanded in F around -inf 44.8%
Taylor expanded in B around 0 56.2%
if -2.24999999999999983e-232 < F < 0.016Initial program 99.6%
Simplified99.7%
Taylor expanded in F around 0 98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in x around 0 98.8%
Taylor expanded in B around 0 65.2%
if 0.016 < F Initial program 53.1%
Simplified71.0%
Taylor expanded in F around inf 97.4%
Taylor expanded in B around 0 68.4%
*-commutative68.4%
Simplified68.4%
unpow268.4%
Applied egg-rr68.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.8e-19)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.15e-230)
(- (/ -1.0 B) t_0)
(if (<= F 1.25) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.8e-19) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.15e-230) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.25) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.8d-19)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.15d-230)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.25d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.8e-19) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.15e-230) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.25) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.8e-19: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.15e-230: tmp = (-1.0 / B) - t_0 elif F <= 1.25: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.8e-19) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.15e-230) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.25) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.8e-19) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.15e-230) tmp = (-1.0 / B) - t_0; elseif (F <= 1.25) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e-19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.15e-230], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.25], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-230}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.25:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -5.8e-19Initial program 63.4%
Simplified72.0%
Taylor expanded in F around -inf 97.5%
Taylor expanded in B around 0 79.9%
if -5.8e-19 < F < -2.15e-230Initial program 99.4%
Simplified99.5%
Taylor expanded in F around -inf 44.8%
Taylor expanded in B around 0 56.2%
if -2.15e-230 < F < 1.25Initial program 99.6%
Simplified99.7%
Taylor expanded in F around 0 96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in x around 0 96.6%
Taylor expanded in B around 0 63.6%
if 1.25 < F Initial program 51.7%
Simplified70.1%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 69.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -1.45e-118)
t_0
(if (<= x -5.9e-285)
(/ 1.0 (sin B))
(if (<= x 7.5e-37) (- (/ -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 <= -1.45e-118) {
tmp = t_0;
} else if (x <= -5.9e-285) {
tmp = 1.0 / sin(B);
} else if (x <= 7.5e-37) {
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 <= (-1.45d-118)) then
tmp = t_0
else if (x <= (-5.9d-285)) then
tmp = 1.0d0 / sin(b)
else if (x <= 7.5d-37) 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 <= -1.45e-118) {
tmp = t_0;
} else if (x <= -5.9e-285) {
tmp = 1.0 / Math.sin(B);
} else if (x <= 7.5e-37) {
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 <= -1.45e-118: tmp = t_0 elif x <= -5.9e-285: tmp = 1.0 / math.sin(B) elif x <= 7.5e-37: 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 <= -1.45e-118) tmp = t_0; elseif (x <= -5.9e-285) tmp = Float64(1.0 / sin(B)); elseif (x <= 7.5e-37) 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 <= -1.45e-118) tmp = t_0; elseif (x <= -5.9e-285) tmp = 1.0 / sin(B); elseif (x <= 7.5e-37) 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, -1.45e-118], t$95$0, If[LessEqual[x, -5.9e-285], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-37], 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 -1.45 \cdot 10^{-118}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -5.9 \cdot 10^{-285}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.4499999999999999e-118 or 7.5000000000000004e-37 < x Initial program 79.8%
Simplified92.1%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 85.1%
if -1.4499999999999999e-118 < x < -5.89999999999999963e-285Initial program 69.9%
Simplified70.3%
Taylor expanded in F around inf 32.8%
Taylor expanded in x around 0 32.8%
if -5.89999999999999963e-285 < x < 7.5000000000000004e-37Initial program 71.4%
Simplified74.3%
Taylor expanded in F around -inf 41.8%
Taylor expanded in B around 0 41.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -6.5e-119)
t_0
(if (<= x -3.1e-285)
(/ 1.0 (sin B))
(if (<= x 7.8e-38) (/ -1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -6.5e-119) {
tmp = t_0;
} else if (x <= -3.1e-285) {
tmp = 1.0 / sin(B);
} else if (x <= 7.8e-38) {
tmp = -1.0 / sin(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 <= (-6.5d-119)) then
tmp = t_0
else if (x <= (-3.1d-285)) then
tmp = 1.0d0 / sin(b)
else if (x <= 7.8d-38) then
tmp = (-1.0d0) / sin(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 <= -6.5e-119) {
tmp = t_0;
} else if (x <= -3.1e-285) {
tmp = 1.0 / Math.sin(B);
} else if (x <= 7.8e-38) {
tmp = -1.0 / Math.sin(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 <= -6.5e-119: tmp = t_0 elif x <= -3.1e-285: tmp = 1.0 / math.sin(B) elif x <= 7.8e-38: tmp = -1.0 / math.sin(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 <= -6.5e-119) tmp = t_0; elseif (x <= -3.1e-285) tmp = Float64(1.0 / sin(B)); elseif (x <= 7.8e-38) tmp = Float64(-1.0 / sin(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 <= -6.5e-119) tmp = t_0; elseif (x <= -3.1e-285) tmp = 1.0 / sin(B); elseif (x <= 7.8e-38) tmp = -1.0 / sin(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, -6.5e-119], t$95$0, If[LessEqual[x, -3.1e-285], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-38], N[(-1.0 / N[Sin[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 -6.5 \cdot 10^{-119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-285}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.5e-119 or 7.7999999999999998e-38 < x Initial program 79.8%
Simplified92.1%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 85.1%
if -6.5e-119 < x < -3.1000000000000001e-285Initial program 69.9%
Simplified70.3%
Taylor expanded in F around inf 32.8%
Taylor expanded in x around 0 32.8%
if -3.1000000000000001e-285 < x < 7.7999999999999998e-38Initial program 71.4%
Simplified74.3%
Taylor expanded in F around -inf 41.5%
Taylor expanded in B around 0 41.5%
Taylor expanded in B around inf 41.8%
(FPCore (F B x)
:precision binary64
(if (<= F -0.000175)
(/ -1.0 (sin B))
(if (<= F 3.2e-19)
(/ x (- B))
(if (<= F 3.7e+209) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.000175) {
tmp = -1.0 / sin(B);
} else if (F <= 3.2e-19) {
tmp = x / -B;
} else if (F <= 3.7e+209) {
tmp = 1.0 / sin(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.000175d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 3.2d-19) then
tmp = x / -b
else if (f <= 3.7d+209) then
tmp = 1.0d0 / sin(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.000175) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 3.2e-19) {
tmp = x / -B;
} else if (F <= 3.7e+209) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.000175: tmp = -1.0 / math.sin(B) elif F <= 3.2e-19: tmp = x / -B elif F <= 3.7e+209: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.000175) tmp = Float64(-1.0 / sin(B)); elseif (F <= 3.2e-19) tmp = Float64(x / Float64(-B)); elseif (F <= 3.7e+209) tmp = Float64(1.0 / sin(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.000175) tmp = -1.0 / sin(B); elseif (F <= 3.2e-19) tmp = x / -B; elseif (F <= 3.7e+209) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.000175], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-19], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 3.7e+209], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.000175:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{+209}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.74999999999999998e-4Initial program 62.5%
Simplified71.4%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 80.3%
Taylor expanded in B around inf 62.0%
if -1.74999999999999998e-4 < F < 3.19999999999999982e-19Initial program 99.5%
Simplified99.6%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 25.5%
mul-1-neg25.5%
distribute-neg-frac225.5%
+-commutative25.5%
Simplified25.5%
Taylor expanded in x around inf 40.0%
neg-mul-140.0%
distribute-neg-frac240.0%
Simplified40.0%
if 3.19999999999999982e-19 < F < 3.7e209Initial program 69.6%
Simplified78.1%
Taylor expanded in F around inf 90.4%
Taylor expanded in x around 0 59.6%
if 3.7e209 < F Initial program 29.0%
Simplified61.6%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 57.6%
(FPCore (F B x) :precision binary64 (if (<= F -1.22e-28) (- (/ -1.0 (sin B)) (/ x B)) (- (/ 1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.22e-28) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.22d-28)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.22e-28) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.22e-28: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.22e-28) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.22e-28) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.22e-28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.22 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.22e-28Initial program 63.9%
Simplified72.4%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 79.1%
if -1.22e-28 < F Initial program 81.5%
Simplified88.5%
Taylor expanded in F around inf 63.3%
Taylor expanded in B around 0 57.5%
(FPCore (F B x) :precision binary64 (if (<= F -0.00019) (/ -1.0 (sin B)) (if (<= F 2.5e-50) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00019) {
tmp = -1.0 / sin(B);
} else if (F <= 2.5e-50) {
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 <= (-0.00019d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 2.5d-50) 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 <= -0.00019) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 2.5e-50) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00019: tmp = -1.0 / math.sin(B) elif F <= 2.5e-50: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00019) tmp = Float64(-1.0 / sin(B)); elseif (F <= 2.5e-50) 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 <= -0.00019) tmp = -1.0 / sin(B); elseif (F <= 2.5e-50) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00019], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-50], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00019:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.9000000000000001e-4Initial program 62.5%
Simplified71.4%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 80.3%
Taylor expanded in B around inf 62.0%
if -1.9000000000000001e-4 < F < 2.49999999999999984e-50Initial program 99.5%
Simplified99.6%
Taylor expanded in F around -inf 42.0%
Taylor expanded in B around 0 24.7%
mul-1-neg24.7%
distribute-neg-frac224.7%
+-commutative24.7%
Simplified24.7%
Taylor expanded in x around inf 39.9%
neg-mul-139.9%
distribute-neg-frac239.9%
Simplified39.9%
if 2.49999999999999984e-50 < F Initial program 58.1%
Simplified74.1%
Taylor expanded in F around inf 90.5%
Taylor expanded in B around 0 48.3%
(FPCore (F B x) :precision binary64 (if (<= F -2.8e-173) (/ (- -1.0 x) B) (if (<= F 2.4e-50) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e-173) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.4e-50) {
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.8d-173)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.4d-50) 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.8e-173) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.4e-50) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.8e-173: tmp = (-1.0 - x) / B elif F <= 2.4e-50: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.8e-173) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.4e-50) 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.8e-173) tmp = (-1.0 - x) / B; elseif (F <= 2.4e-50) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.8e-173], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.4e-50], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.8 \cdot 10^{-173}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.7999999999999999e-173Initial program 72.5%
Simplified79.0%
Taylor expanded in F around -inf 83.6%
Taylor expanded in B around 0 39.4%
mul-1-neg39.4%
distribute-neg-frac239.4%
+-commutative39.4%
Simplified39.4%
if -2.7999999999999999e-173 < F < 2.40000000000000002e-50Initial program 99.5%
Simplified99.7%
Taylor expanded in F around -inf 41.5%
Taylor expanded in B around 0 28.0%
mul-1-neg28.0%
distribute-neg-frac228.0%
+-commutative28.0%
Simplified28.0%
Taylor expanded in x around inf 50.1%
neg-mul-150.1%
distribute-neg-frac250.1%
Simplified50.1%
if 2.40000000000000002e-50 < F Initial program 58.1%
Simplified74.1%
Taylor expanded in F around inf 90.5%
Taylor expanded in B around 0 48.3%
Final simplification45.0%
(FPCore (F B x) :precision binary64 (if (<= F -46000000.0) (/ -1.0 B) (if (<= F 4.2e-50) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -46000000.0) {
tmp = -1.0 / B;
} else if (F <= 4.2e-50) {
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 <= (-46000000.0d0)) then
tmp = (-1.0d0) / b
else if (f <= 4.2d-50) 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 <= -46000000.0) {
tmp = -1.0 / B;
} else if (F <= 4.2e-50) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -46000000.0: tmp = -1.0 / B elif F <= 4.2e-50: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -46000000.0) tmp = Float64(-1.0 / B); elseif (F <= 4.2e-50) 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 <= -46000000.0) tmp = -1.0 / B; elseif (F <= 4.2e-50) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -46000000.0], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 4.2e-50], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -46000000:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.6e7Initial program 61.1%
Simplified70.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 48.1%
mul-1-neg48.1%
distribute-neg-frac248.1%
+-commutative48.1%
Simplified48.1%
Taylor expanded in x around 0 30.1%
if -4.6e7 < F < 4.2000000000000002e-50Initial program 99.5%
Simplified99.6%
Taylor expanded in F around -inf 42.8%
Taylor expanded in B around 0 25.1%
mul-1-neg25.1%
distribute-neg-frac225.1%
+-commutative25.1%
Simplified25.1%
Taylor expanded in x around inf 39.8%
neg-mul-139.8%
distribute-neg-frac239.8%
Simplified39.8%
if 4.2000000000000002e-50 < F Initial program 58.1%
Simplified74.1%
Taylor expanded in F around inf 90.5%
Taylor expanded in B around 0 48.3%
(FPCore (F B x) :precision binary64 (if (<= F -25500000.0) (/ -1.0 B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -25500000.0) {
tmp = -1.0 / B;
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-25500000.0d0)) then
tmp = (-1.0d0) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -25500000.0) {
tmp = -1.0 / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -25500000.0: tmp = -1.0 / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -25500000.0) tmp = Float64(-1.0 / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -25500000.0) tmp = -1.0 / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -25500000.0], N[(-1.0 / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -25500000:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -2.55e7Initial program 61.1%
Simplified70.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 48.1%
mul-1-neg48.1%
distribute-neg-frac248.1%
+-commutative48.1%
Simplified48.1%
Taylor expanded in x around 0 30.1%
if -2.55e7 < F Initial program 82.1%
Simplified88.9%
Taylor expanded in F around -inf 42.4%
Taylor expanded in B around 0 26.2%
mul-1-neg26.2%
distribute-neg-frac226.2%
+-commutative26.2%
Simplified26.2%
Taylor expanded in x around inf 34.8%
neg-mul-134.8%
distribute-neg-frac234.8%
Simplified34.8%
(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 75.7%
Simplified83.2%
Taylor expanded in F around -inf 59.9%
Taylor expanded in B around 0 32.9%
mul-1-neg32.9%
distribute-neg-frac232.9%
+-commutative32.9%
Simplified32.9%
Taylor expanded in x around 0 11.9%
herbie shell --seed 2024148
(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))))))