
(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))) (t_1 (/ 1.0 (sin B))))
(if (<= F -1.82e+155)
(- (/ -1.0 (sin B)) (* x (* t_1 (cos B))))
(if (<= F 200000000.0)
(- (/ (* F (pow (fma F F 2.0) -0.5)) (sin B)) t_0)
(- t_1 t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 1.0 / sin(B);
double tmp;
if (F <= -1.82e+155) {
tmp = (-1.0 / sin(B)) - (x * (t_1 * cos(B)));
} else if (F <= 200000000.0) {
tmp = ((F * pow(fma(F, F, 2.0), -0.5)) / sin(B)) - t_0;
} else {
tmp = t_1 - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -1.82e+155) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(t_1 * cos(B)))); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F * (fma(F, F, 2.0) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(t_1 - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.82e+155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(t$95$1 * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F * N[Power[N[(F * F + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(t$95$1 - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -1.82 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \left(t\_1 \cdot \cos B\right)\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1 - t\_0\\
\end{array}
\end{array}
if F < -1.81999999999999989e155Initial program 32.6%
Taylor expanded in F around -inf 99.5%
tan-quot99.5%
associate-/r/99.6%
Applied egg-rr99.6%
if -1.81999999999999989e155 < F < 2e8Initial program 95.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.7%
fma-define99.7%
inv-pow99.7%
sqrt-pow199.7%
fma-define99.7%
metadata-eval99.7%
Applied egg-rr99.7%
if 2e8 < F Initial program 57.2%
Simplified71.1%
Taylor expanded in x around 0 71.2%
associate-*l/71.1%
*-lft-identity71.1%
+-commutative71.1%
unpow271.1%
fma-undefine71.1%
Simplified71.1%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.2e+40)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 31000000.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 <= -2.2e+40) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 31000000.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 <= (-2.2d+40)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 31000000.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 <= -2.2e+40) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 31000000.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 <= -2.2e+40: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 31000000.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 <= -2.2e+40) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 31000000.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 <= -2.2e+40) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 31000000.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, -2.2e+40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 31000000.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 -2.2 \cdot 10^{+40}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 31000000:\\
\;\;\;\;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 < -2.1999999999999999e40Initial program 54.1%
Simplified69.0%
Taylor expanded in x around 0 69.0%
associate-*l/69.0%
*-lft-identity69.0%
+-commutative69.0%
unpow269.0%
fma-undefine69.0%
Simplified69.0%
Taylor expanded in F around -inf 99.6%
if -2.1999999999999999e40 < F < 3.1e7Initial program 99.4%
if 3.1e7 < F Initial program 57.2%
Simplified71.1%
Taylor expanded in x around 0 71.2%
associate-*l/71.1%
*-lft-identity71.1%
+-commutative71.1%
unpow271.1%
fma-undefine71.1%
Simplified71.1%
Taylor expanded in F around inf 99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.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 57.3%
Simplified71.2%
Taylor expanded in x around 0 71.1%
associate-*l/71.2%
*-lft-identity71.2%
+-commutative71.2%
unpow271.2%
fma-undefine71.2%
Simplified71.2%
Taylor expanded in F around -inf 98.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.5%
if 1.3999999999999999 < F Initial program 57.9%
Simplified71.6%
Taylor expanded in x around 0 71.6%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
Taylor expanded in F around inf 98.8%
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 (/ (sin B) (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -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[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $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:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 57.3%
Simplified71.2%
Taylor expanded in x around 0 71.1%
associate-*l/71.2%
*-lft-identity71.2%
+-commutative71.2%
unpow271.2%
fma-undefine71.2%
Simplified71.2%
Taylor expanded in F around -inf 98.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.5%
clear-num98.5%
un-div-inv98.5%
Applied egg-rr98.5%
if 1.3999999999999999 < F Initial program 57.9%
Simplified71.6%
Taylor expanded in x around 0 71.6%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
Taylor expanded in F around inf 98.8%
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(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 57.3%
Simplified71.2%
Taylor expanded in x around 0 71.1%
associate-*l/71.2%
*-lft-identity71.2%
+-commutative71.2%
unpow271.2%
fma-undefine71.2%
Simplified71.2%
Taylor expanded in F around -inf 98.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.6%
if 1.3999999999999999 < F Initial program 57.9%
Simplified71.6%
Taylor expanded in x around 0 71.6%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
Taylor expanded in F around inf 98.8%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.4e-12)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.9e-68)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 26000.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 <= -3.4e-12) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.9e-68) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 26000.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 <= (-3.4d-12)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.9d-68) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 26000.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 <= -3.4e-12) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.9e-68) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 26000.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 <= -3.4e-12: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.9e-68: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 26000.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 <= -3.4e-12) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.9e-68) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 26000.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 <= -3.4e-12) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.9e-68) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 26000.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, -3.4e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.9e-68], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 26000.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 -3.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-68}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 26000:\\
\;\;\;\;\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 < -3.4000000000000001e-12Initial program 58.5%
Simplified71.9%
Taylor expanded in x around 0 71.9%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around -inf 96.6%
if -3.4000000000000001e-12 < F < 1.90000000000000019e-68Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.5%
if 1.90000000000000019e-68 < F < 26000Initial program 99.5%
Taylor expanded in B around 0 92.5%
if 26000 < F Initial program 57.2%
Simplified71.1%
Taylor expanded in x around 0 71.2%
associate-*l/71.1%
*-lft-identity71.1%
+-commutative71.1%
unpow271.1%
fma-undefine71.1%
Simplified71.1%
Taylor expanded in F around inf 99.9%
Final simplification93.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.4e-12)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.9e-68)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 1.3)
(- (* (/ 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 <= -3.4e-12) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.9e-68) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 1.3) {
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 <= (-3.4d-12)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.9d-68) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 1.3d0) 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 <= -3.4e-12) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.9e-68) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 1.3) {
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 <= -3.4e-12: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.9e-68: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 1.3: 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 <= -3.4e-12) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.9e-68) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 1.3) 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 <= -3.4e-12) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.9e-68) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 1.3) 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, -3.4e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.9e-68], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.3], 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 -3.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-68}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.3:\\
\;\;\;\;\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 < -3.4000000000000001e-12Initial program 58.5%
Simplified71.9%
Taylor expanded in x around 0 71.9%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around -inf 96.6%
if -3.4000000000000001e-12 < F < 1.90000000000000019e-68Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.5%
if 1.90000000000000019e-68 < F < 1.30000000000000004Initial program 99.5%
Taylor expanded in B around 0 91.9%
Taylor expanded in F around 0 87.0%
if 1.30000000000000004 < F Initial program 57.9%
Simplified71.6%
Taylor expanded in x around 0 71.6%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
Taylor expanded in F around inf 98.8%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -7e-77)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 8.2e-54)
(/ (* 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 <= -6e-16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -7e-77) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 8.2e-54) {
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 <= (-6d-16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-7d-77)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 8.2d-54) 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 <= -6e-16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -7e-77) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 8.2e-54) {
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 <= -6e-16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -7e-77: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 8.2e-54: 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 <= -6e-16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -7e-77) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 8.2e-54) tmp = Float64(Float64(x * cos(B)) / Float64(-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 <= -6e-16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -7e-77) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 8.2e-54) 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, -6e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7e-77], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-54], 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 -6 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -7 \cdot 10^{-77}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.99999999999999987e-16Initial program 59.0%
Simplified72.3%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around -inf 96.6%
if -5.99999999999999987e-16 < F < -7.00000000000000026e-77Initial program 99.1%
Taylor expanded in B around 0 88.3%
Taylor expanded in B around 0 72.5%
if -7.00000000000000026e-77 < F < 8.2000000000000001e-54Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around -inf 34.4%
Taylor expanded in x around inf 78.7%
mul-1-neg78.7%
Simplified78.7%
if 8.2000000000000001e-54 < F Initial program 62.3%
Simplified74.5%
Taylor expanded in x around 0 74.6%
associate-*l/74.5%
*-lft-identity74.5%
+-commutative74.5%
unpow274.5%
fma-undefine74.5%
Simplified74.5%
Taylor expanded in F around inf 90.7%
Final simplification86.6%
(FPCore (F B x)
:precision binary64
(if (<= F -3.6e-16)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -6.8e-77)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 9.5e-53)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-16) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -6.8e-77) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 9.5e-53) {
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 <= (-3.6d-16)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-6.8d-77)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 9.5d-53) 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 <= -3.6e-16) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -6.8e-77) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 9.5e-53) {
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 <= -3.6e-16: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -6.8e-77: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 9.5e-53: 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 <= -3.6e-16) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -6.8e-77) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 9.5e-53) tmp = Float64(Float64(x * cos(B)) / Float64(-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 <= -3.6e-16) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -6.8e-77) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 9.5e-53) 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, -3.6e-16], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.8e-77], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-53], 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 -3.6 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -6.8 \cdot 10^{-77}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999983e-16Initial program 59.0%
Simplified72.3%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around -inf 96.6%
Taylor expanded in B around 0 71.0%
if -3.59999999999999983e-16 < F < -6.79999999999999966e-77Initial program 99.1%
Taylor expanded in B around 0 88.3%
Taylor expanded in B around 0 72.5%
if -6.79999999999999966e-77 < F < 9.5000000000000008e-53Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around -inf 34.4%
Taylor expanded in x around inf 78.7%
mul-1-neg78.7%
Simplified78.7%
if 9.5000000000000008e-53 < F Initial program 62.3%
Taylor expanded in B around 0 38.2%
Taylor expanded in F around inf 66.4%
Final simplification73.0%
(FPCore (F B x)
:precision binary64
(if (<= F -4.4e-16)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.02e-76)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 9.5e-53)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.4e-16) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.02e-76) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 9.5e-53) {
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 <= (-4.4d-16)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.02d-76)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 9.5d-53) 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 <= -4.4e-16) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.02e-76) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 9.5e-53) {
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 <= -4.4e-16: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.02e-76: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 9.5e-53: 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 <= -4.4e-16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.02e-76) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 9.5e-53) tmp = Float64(Float64(x * cos(B)) / Float64(-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 <= -4.4e-16) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.02e-76) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 9.5e-53) 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, -4.4e-16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-76], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-53], 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 -4.4 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-76}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.40000000000000001e-16Initial program 59.0%
Simplified72.3%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around -inf 96.6%
if -4.40000000000000001e-16 < F < -1.02000000000000006e-76Initial program 99.1%
Taylor expanded in B around 0 88.3%
Taylor expanded in B around 0 72.5%
if -1.02000000000000006e-76 < F < 9.5000000000000008e-53Initial program 99.5%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around -inf 34.4%
Taylor expanded in x around inf 78.7%
mul-1-neg78.7%
Simplified78.7%
if 9.5000000000000008e-53 < F Initial program 62.3%
Taylor expanded in B around 0 38.2%
Taylor expanded in F around inf 66.4%
Final simplification80.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.4e-12)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 9.5e-53)
(- (* 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 <= -3.4e-12) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 9.5e-53) {
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 <= (-3.4d-12)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 9.5d-53) 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 <= -3.4e-12) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 9.5e-53) {
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 <= -3.4e-12: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 9.5e-53: 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 <= -3.4e-12) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 9.5e-53) tmp = Float64(Float64(F * Float64(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 <= -3.4e-12) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 9.5e-53) 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, -3.4e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.5e-53], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / 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 -3.4 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-53}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.4000000000000001e-12Initial program 58.5%
Simplified71.9%
Taylor expanded in x around 0 71.9%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around -inf 96.6%
if -3.4000000000000001e-12 < F < 9.5000000000000008e-53Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 88.2%
if 9.5000000000000008e-53 < F Initial program 62.3%
Simplified74.5%
Taylor expanded in x around 0 74.6%
associate-*l/74.5%
*-lft-identity74.5%
+-commutative74.5%
unpow274.5%
fma-undefine74.5%
Simplified74.5%
Taylor expanded in F around inf 90.7%
Final simplification91.2%
(FPCore (F B x)
:precision binary64
(if (<= B 4.8e-293)
(/ (- -1.0 x) B)
(if (<= B 0.0025)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ -1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (B <= 4.8e-293) {
tmp = (-1.0 - x) / B;
} else if (B <= 0.0025) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / 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 (b <= 4.8d-293) then
tmp = ((-1.0d0) - x) / b
else if (b <= 0.0025d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / 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 (B <= 4.8e-293) {
tmp = (-1.0 - x) / B;
} else if (B <= 0.0025) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 4.8e-293: tmp = (-1.0 - x) / B elif B <= 0.0025: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 4.8e-293) tmp = Float64(Float64(-1.0 - x) / B); elseif (B <= 0.0025) 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 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 4.8e-293) tmp = (-1.0 - x) / B; elseif (B <= 0.0025) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 4.8e-293], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, 0.0025], 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 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 4.8 \cdot 10^{-293}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;B \leq 0.0025:\\
\;\;\;\;{\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} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 4.7999999999999998e-293Initial program 74.7%
Taylor expanded in F around -inf 54.9%
Taylor expanded in B around 0 31.7%
associate-*r/31.7%
neg-mul-131.7%
distribute-neg-in31.7%
metadata-eval31.7%
Simplified31.7%
if 4.7999999999999998e-293 < B < 0.00250000000000000005Initial program 78.2%
Taylor expanded in B around 0 77.3%
Taylor expanded in B around 0 77.3%
if 0.00250000000000000005 < B Initial program 84.7%
Simplified84.7%
Taylor expanded in x around 0 84.7%
associate-*l/84.7%
*-lft-identity84.7%
+-commutative84.7%
unpow284.7%
fma-undefine84.7%
Simplified84.7%
Taylor expanded in F around -inf 57.1%
Taylor expanded in B around 0 49.1%
Final simplification45.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -1.65e-176)
t_0
(if (<= x 2.2e-148)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= x 2.1e-9) (/ 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.65e-176) {
tmp = t_0;
} else if (x <= 2.2e-148) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (x <= 2.1e-9) {
tmp = 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.65d-176)) then
tmp = t_0
else if (x <= 2.2d-148) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (x <= 2.1d-9) then
tmp = 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.65e-176) {
tmp = t_0;
} else if (x <= 2.2e-148) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (x <= 2.1e-9) {
tmp = 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.65e-176: tmp = t_0 elif x <= 2.2e-148: tmp = (-1.0 / math.sin(B)) - (x / B) elif x <= 2.1e-9: tmp = 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.65e-176) tmp = t_0; elseif (x <= 2.2e-148) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (x <= 2.1e-9) tmp = Float64(x / Float64(-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.65e-176) tmp = t_0; elseif (x <= 2.2e-148) tmp = (-1.0 / sin(B)) - (x / B); elseif (x <= 2.1e-9) tmp = 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.65e-176], t$95$0, If[LessEqual[x, 2.2e-148], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.1e-9], N[(x / (-B)), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{-176}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-9}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.65000000000000006e-176 or 2.10000000000000019e-9 < x Initial program 79.9%
Simplified90.9%
Taylor expanded in x around 0 90.9%
associate-*l/90.9%
*-lft-identity90.9%
+-commutative90.9%
unpow290.9%
fma-undefine90.9%
Simplified90.9%
Taylor expanded in F around -inf 71.8%
Taylor expanded in B around 0 78.9%
if -1.65000000000000006e-176 < x < 2.20000000000000017e-148Initial program 77.8%
Taylor expanded in B around 0 71.3%
Taylor expanded in F around -inf 32.8%
distribute-lft-in32.8%
associate-*r/32.8%
metadata-eval32.8%
mul-1-neg32.8%
unsub-neg32.8%
Simplified32.8%
if 2.20000000000000017e-148 < x < 2.10000000000000019e-9Initial program 68.5%
Taylor expanded in B around 0 61.0%
Taylor expanded in x around inf 40.5%
associate-*r/40.5%
neg-mul-140.5%
Simplified40.5%
Final simplification61.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -2.5e-275)
t_0
(if (<= F 1.65e-219)
(/ x (- B))
(if (<= F 4.2e-47) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -2.5e-275) {
tmp = t_0;
} else if (F <= 1.65e-219) {
tmp = x / -B;
} else if (F <= 4.2e-47) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-2.5d-275)) then
tmp = t_0
else if (f <= 1.65d-219) then
tmp = x / -b
else if (f <= 4.2d-47) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -2.5e-275) {
tmp = t_0;
} else if (F <= 1.65e-219) {
tmp = x / -B;
} else if (F <= 4.2e-47) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -2.5e-275: tmp = t_0 elif F <= 1.65e-219: tmp = x / -B elif F <= 4.2e-47: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -2.5e-275) tmp = t_0; elseif (F <= 1.65e-219) tmp = Float64(x / Float64(-B)); elseif (F <= 4.2e-47) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -2.5e-275) tmp = t_0; elseif (F <= 1.65e-219) tmp = x / -B; elseif (F <= 4.2e-47) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e-275], t$95$0, If[LessEqual[F, 1.65e-219], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 4.2e-47], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-275}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-219}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-47}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.49999999999999992e-275 or 1.6500000000000001e-219 < F < 4.2000000000000001e-47Initial program 80.6%
Simplified86.9%
Taylor expanded in x around 0 86.9%
associate-*l/86.9%
*-lft-identity86.9%
+-commutative86.9%
unpow286.9%
fma-undefine86.9%
Simplified86.9%
Taylor expanded in F around -inf 64.5%
Taylor expanded in B around 0 61.1%
if -2.49999999999999992e-275 < F < 1.6500000000000001e-219Initial program 99.5%
Taylor expanded in B around 0 71.9%
Taylor expanded in x around inf 52.8%
associate-*r/52.8%
neg-mul-152.8%
Simplified52.8%
if 4.2000000000000001e-47 < F Initial program 61.8%
Taylor expanded in B around 0 37.2%
Taylor expanded in F around inf 67.3%
Final simplification61.6%
(FPCore (F B x) :precision binary64 (if (or (<= x 3.8e-184) (not (<= x 3.3e-9))) (- (/ -1.0 B) (/ x (tan B))) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= 3.8e-184) || !(x <= 3.3e-9)) {
tmp = (-1.0 / B) - (x / tan(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 ((x <= 3.8d-184) .or. (.not. (x <= 3.3d-9))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= 3.8e-184) || !(x <= 3.3e-9)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= 3.8e-184) or not (x <= 3.3e-9): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= 3.8e-184) || !(x <= 3.3e-9)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= 3.8e-184) || ~((x <= 3.3e-9))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, 3.8e-184], N[Not[LessEqual[x, 3.3e-9]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.8 \cdot 10^{-184} \lor \neg \left(x \leq 3.3 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if x < 3.80000000000000017e-184 or 3.30000000000000018e-9 < x Initial program 80.5%
Simplified88.7%
Taylor expanded in x around 0 88.6%
associate-*l/88.7%
*-lft-identity88.7%
+-commutative88.7%
unpow288.7%
fma-undefine88.7%
Simplified88.7%
Taylor expanded in F around -inf 60.0%
Taylor expanded in B around 0 60.9%
if 3.80000000000000017e-184 < x < 3.30000000000000018e-9Initial program 63.5%
Taylor expanded in B around 0 52.6%
Taylor expanded in x around inf 35.5%
associate-*r/35.5%
neg-mul-135.5%
Simplified35.5%
Final simplification57.5%
(FPCore (F B x)
:precision binary64
(if (<= B 4.15e-293)
(/ (- -1.0 x) B)
(if (<= B 1.52e-44)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ -1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (B <= 4.15e-293) {
tmp = (-1.0 - x) / B;
} else if (B <= 1.52e-44) {
tmp = ((F * sqrt(0.5)) - 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 (b <= 4.15d-293) then
tmp = ((-1.0d0) - x) / b
else if (b <= 1.52d-44) then
tmp = ((f * sqrt(0.5d0)) - 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 (B <= 4.15e-293) {
tmp = (-1.0 - x) / B;
} else if (B <= 1.52e-44) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 4.15e-293: tmp = (-1.0 - x) / B elif B <= 1.52e-44: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 4.15e-293) tmp = Float64(Float64(-1.0 - x) / B); elseif (B <= 1.52e-44) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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 (B <= 4.15e-293) tmp = (-1.0 - x) / B; elseif (B <= 1.52e-44) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 4.15e-293], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[B, 1.52e-44], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 4.15 \cdot 10^{-293}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;B \leq 1.52 \cdot 10^{-44}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 4.14999999999999999e-293Initial program 74.7%
Taylor expanded in F around -inf 54.9%
Taylor expanded in B around 0 31.7%
associate-*r/31.7%
neg-mul-131.7%
distribute-neg-in31.7%
metadata-eval31.7%
Simplified31.7%
if 4.14999999999999999e-293 < B < 1.51999999999999999e-44Initial program 77.6%
Simplified86.5%
Taylor expanded in x around 0 86.5%
associate-*l/86.5%
*-lft-identity86.5%
+-commutative86.5%
unpow286.5%
fma-undefine86.5%
Simplified86.5%
Taylor expanded in F around 0 66.8%
Taylor expanded in B around 0 66.8%
*-commutative66.8%
Simplified66.8%
if 1.51999999999999999e-44 < B Initial program 84.6%
Simplified84.6%
Taylor expanded in x around 0 84.6%
associate-*l/84.7%
*-lft-identity84.7%
+-commutative84.7%
unpow284.7%
fma-undefine84.7%
Simplified84.7%
Taylor expanded in F around -inf 55.6%
Taylor expanded in B around 0 48.2%
Final simplification42.8%
(FPCore (F B x) :precision binary64 (if (<= F -6e-16) (/ -1.0 B) (if (<= F 6.5e-26) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-16) {
tmp = -1.0 / B;
} else if (F <= 6.5e-26) {
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 <= (-6d-16)) then
tmp = (-1.0d0) / b
else if (f <= 6.5d-26) 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 <= -6e-16) {
tmp = -1.0 / B;
} else if (F <= 6.5e-26) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-16: tmp = -1.0 / B elif F <= 6.5e-26: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-16) tmp = Float64(-1.0 / B); elseif (F <= 6.5e-26) 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 <= -6e-16) tmp = -1.0 / B; elseif (F <= 6.5e-26) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-16], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 6.5e-26], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.99999999999999987e-16Initial program 59.0%
Taylor expanded in F around -inf 96.5%
log1p-expm1-u37.6%
+-commutative37.6%
add-sqr-sqrt20.5%
sqrt-unprod32.1%
div-inv32.1%
div-inv32.1%
sqr-neg32.1%
sqrt-unprod11.7%
add-sqr-sqrt27.5%
Applied egg-rr27.5%
Taylor expanded in B around 0 29.9%
Taylor expanded in x around 0 29.9%
if -5.99999999999999987e-16 < F < 6.5e-26Initial program 99.4%
Taylor expanded in B around 0 64.6%
Taylor expanded in x around inf 38.4%
associate-*r/38.4%
neg-mul-138.4%
Simplified38.4%
if 6.5e-26 < F Initial program 59.3%
Taylor expanded in B around 0 33.1%
Taylor expanded in B around 0 33.2%
Taylor expanded in F around inf 48.5%
Final simplification38.4%
(FPCore (F B x) :precision binary64 (if (<= F -1.18e-66) (/ (- -1.0 x) B) (if (<= F 4.1e-29) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.18e-66) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.1e-29) {
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.18d-66)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.1d-29) 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.18e-66) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.1e-29) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.18e-66: tmp = (-1.0 - x) / B elif F <= 4.1e-29: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.18e-66) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.1e-29) 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.18e-66) tmp = (-1.0 - x) / B; elseif (F <= 4.1e-29) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.18e-66], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.1e-29], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.18 \cdot 10^{-66}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.18e-66Initial program 64.6%
Taylor expanded in F around -inf 87.2%
Taylor expanded in B around 0 42.6%
associate-*r/42.6%
neg-mul-142.6%
distribute-neg-in42.6%
metadata-eval42.6%
Simplified42.6%
if -1.18e-66 < F < 4.0999999999999998e-29Initial program 99.5%
Taylor expanded in B around 0 62.2%
Taylor expanded in x around inf 39.6%
associate-*r/39.6%
neg-mul-139.6%
Simplified39.6%
if 4.0999999999999998e-29 < F Initial program 59.3%
Taylor expanded in B around 0 33.1%
Taylor expanded in B around 0 33.2%
Taylor expanded in F around inf 48.5%
Final simplification42.7%
(FPCore (F B x) :precision binary64 (if (<= F -6e-16) (/ -1.0 B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-16) {
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 <= (-6d-16)) 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 <= -6e-16) {
tmp = -1.0 / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-16: tmp = -1.0 / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-16) 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 <= -6e-16) tmp = -1.0 / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-16], N[(-1.0 / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -5.99999999999999987e-16Initial program 59.0%
Taylor expanded in F around -inf 96.5%
log1p-expm1-u37.6%
+-commutative37.6%
add-sqr-sqrt20.5%
sqrt-unprod32.1%
div-inv32.1%
div-inv32.1%
sqr-neg32.1%
sqrt-unprod11.7%
add-sqr-sqrt27.5%
Applied egg-rr27.5%
Taylor expanded in B around 0 29.9%
Taylor expanded in x around 0 29.9%
if -5.99999999999999987e-16 < F Initial program 86.0%
Taylor expanded in B around 0 54.1%
Taylor expanded in x around inf 34.0%
associate-*r/34.0%
neg-mul-134.0%
Simplified34.0%
Final simplification32.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 78.2%
Taylor expanded in F around -inf 54.9%
log1p-expm1-u20.3%
+-commutative20.3%
add-sqr-sqrt10.3%
sqrt-unprod14.5%
div-inv14.5%
div-inv14.5%
sqr-neg14.5%
sqrt-unprod4.1%
add-sqr-sqrt9.2%
Applied egg-rr9.2%
Taylor expanded in B around 0 10.8%
Taylor expanded in x around 0 11.4%
Final simplification11.4%
herbie shell --seed 2024096
(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))))))