
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.02e+214)
(- (* F (/ -1.0 (* F (sin B)))) t_0)
(if (<= F 2.4e-22)
(- (/ F (/ (sin B) (pow (fma F F 2.0) -0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.02e+214) {
tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
} else if (F <= 2.4e-22) {
tmp = (F / (sin(B) / pow(fma(F, F, 2.0), -0.5))) - 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 <= -1.02e+214) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0); elseif (F <= 2.4e-22) tmp = Float64(Float64(F / Float64(sin(B) / (fma(F, F, 2.0) ^ -0.5))) - 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, -1.02e+214], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.4e-22], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(F * F + 2.0), $MachinePrecision], -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.02 \cdot 10^{+214}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.02e214Initial program 32.6%
Simplified42.3%
Taylor expanded in F around -inf 99.9%
if -1.02e214 < F < 2.40000000000000002e-22Initial program 96.3%
Simplified99.0%
Taylor expanded in x around 0 99.0%
associate-*l/99.0%
*-lft-identity99.0%
+-commutative99.0%
unpow299.0%
fma-undefine99.0%
Simplified99.0%
clear-num99.0%
un-div-inv99.0%
inv-pow99.0%
sqrt-pow199.0%
metadata-eval99.0%
Applied egg-rr99.0%
if 2.40000000000000002e-22 < F Initial program 60.5%
Simplified68.4%
Taylor expanded in x around 0 68.5%
associate-*l/68.5%
*-lft-identity68.5%
+-commutative68.5%
unpow268.5%
fma-undefine68.5%
Simplified68.5%
Taylor expanded in F around inf 97.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.02e+214)
(- (* F (/ -1.0 (* F (sin B)))) t_0)
(if (<= F 2.4e-22)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.02e+214) {
tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
} else if (F <= 2.4e-22) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - 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 <= -1.02e+214) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0); elseif (F <= 2.4e-22) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - 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, -1.02e+214], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.4e-22], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.02 \cdot 10^{+214}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-22}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.02e214Initial program 32.6%
Simplified42.3%
Taylor expanded in F around -inf 99.9%
if -1.02e214 < F < 2.40000000000000002e-22Initial program 96.3%
Simplified99.0%
Taylor expanded in x around 0 99.0%
associate-*l/99.0%
*-lft-identity99.0%
+-commutative99.0%
unpow299.0%
fma-undefine99.0%
Simplified99.0%
associate-*r/99.0%
clear-num99.0%
sqrt-div99.0%
metadata-eval99.0%
un-div-inv99.0%
Applied egg-rr99.0%
associate-/r/99.0%
times-frac99.0%
*-lft-identity99.0%
Simplified99.0%
if 2.40000000000000002e-22 < F Initial program 60.5%
Simplified68.4%
Taylor expanded in x around 0 68.5%
associate-*l/68.5%
*-lft-identity68.5%
+-commutative68.5%
unpow268.5%
fma-undefine68.5%
Simplified68.5%
Taylor expanded in F around inf 97.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.7e+142)
(- (* F (/ -1.0 (* F (sin B)))) t_0)
(if (<= F 1.33e-46)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.7e+142) {
tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
} else if (F <= 1.33e-46) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.7d+142)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - t_0
else if (f <= 1.33d-46) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.7e+142) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - t_0;
} else if (F <= 1.33e-46) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.7e+142: tmp = (F * (-1.0 / (F * math.sin(B)))) - t_0 elif F <= 1.33e-46: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.7e+142) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0); elseif (F <= 1.33e-46) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.7e+142) tmp = (F * (-1.0 / (F * sin(B)))) - t_0; elseif (F <= 1.33e-46) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7e+142], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+142}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.6999999999999999e142Initial program 48.9%
Simplified60.4%
Taylor expanded in F around -inf 99.9%
if -1.6999999999999999e142 < F < 1.33000000000000008e-46Initial program 98.1%
div-inv98.3%
clear-num98.2%
Applied egg-rr98.2%
if 1.33000000000000008e-46 < F Initial program 61.0%
Simplified68.8%
Taylor expanded in x around 0 68.9%
associate-*l/68.9%
*-lft-identity68.9%
+-commutative68.9%
unpow268.9%
fma-undefine68.9%
Simplified68.9%
Taylor expanded in F around inf 96.5%
Final simplification97.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.52e+142)
(- (* F (/ -1.0 (* F (sin B)))) t_0)
(if (<= F 1.33e-46)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.52e+142) {
tmp = (F * (-1.0 / (F * sin(B)))) - t_0;
} else if (F <= 1.33e-46) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.52d+142)) then
tmp = (f * ((-1.0d0) / (f * sin(b)))) - t_0
else if (f <= 1.33d-46) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.52e+142) {
tmp = (F * (-1.0 / (F * Math.sin(B)))) - t_0;
} else if (F <= 1.33e-46) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.52e+142: tmp = (F * (-1.0 / (F * math.sin(B)))) - t_0 elif F <= 1.33e-46: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.52e+142) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * sin(B)))) - t_0); elseif (F <= 1.33e-46) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.52e+142) tmp = (F * (-1.0 / (F * sin(B)))) - t_0; elseif (F <= 1.33e-46) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.52e+142], N[(N[(F * N[(-1.0 / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.52 \cdot 10^{+142}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot \sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.5199999999999999e142Initial program 48.9%
Simplified60.4%
Taylor expanded in F around -inf 99.9%
if -1.5199999999999999e142 < F < 1.33000000000000008e-46Initial program 98.1%
if 1.33000000000000008e-46 < F Initial program 61.0%
Simplified68.8%
Taylor expanded in x around 0 68.9%
associate-*l/68.9%
*-lft-identity68.9%
+-commutative68.9%
unpow268.9%
fma-undefine68.9%
Simplified68.9%
Taylor expanded in F around inf 96.5%
Final simplification97.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -260000000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 7.8e-53)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) 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 <= -260000000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 7.8e-53) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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 <= (-260000000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 7.8d-53) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - 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 <= -260000000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 7.8e-53) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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 <= -260000000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 7.8e-53: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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 <= -260000000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 7.8e-53) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - 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 <= -260000000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 7.8e-53) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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, -260000000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-53], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 -260000000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -2.6e11Initial program 68.7%
Taylor expanded in F around -inf 99.7%
div-inv68.9%
clear-num68.8%
Applied egg-rr99.8%
if -2.6e11 < F < 7.8000000000000004e-53Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 7.8000000000000004e-53 < F Initial program 61.9%
Simplified69.5%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 94.3%
Final simplification97.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -260000000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 7.8e-53)
(- (* 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 <= -260000000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 7.8e-53) {
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 <= (-260000000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 7.8d-53) 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 <= -260000000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 7.8e-53) {
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 <= -260000000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 7.8e-53: 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 <= -260000000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 7.8e-53) 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 <= -260000000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 7.8e-53) 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, -260000000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-53], 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 -260000000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-53}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.6e11Initial program 68.7%
Taylor expanded in F around -inf 99.7%
div-inv68.9%
clear-num68.8%
Applied egg-rr99.8%
if -2.6e11 < F < 7.8000000000000004e-53Initial 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.8%
if 7.8000000000000004e-53 < F Initial program 61.9%
Simplified69.5%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 94.3%
Final simplification97.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.37)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 2.1e-92)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 1e+16)
(- (* (/ 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.37) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 2.1e-92) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 1e+16) {
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.37d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 2.1d-92) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 1d+16) 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.37) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 2.1e-92) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 1e+16) {
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.37: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 2.1e-92: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 1e+16: 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.37) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 2.1e-92) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 1e+16) 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.37) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 2.1e-92) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 1e+16) 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.37], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-92], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e+16], 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.37:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-92}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 10^{+16}:\\
\;\;\;\;\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.37Initial program 69.2%
Taylor expanded in F around -inf 99.7%
div-inv69.3%
clear-num69.2%
Applied egg-rr99.8%
if -0.37 < F < 2.1e-92Initial program 99.4%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 89.2%
Taylor expanded in x around 0 89.2%
associate-/l*89.2%
Simplified89.2%
if 2.1e-92 < F < 1e16Initial program 99.3%
Taylor expanded in B around 0 80.2%
if 1e16 < F Initial program 58.9%
Simplified67.1%
Taylor expanded in x around 0 67.2%
associate-*l/67.2%
*-lft-identity67.2%
+-commutative67.2%
unpow267.2%
fma-undefine67.2%
Simplified67.2%
Taylor expanded in F around inf 99.9%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (tan B))))
(if (<= F -7.4e-149)
(- (/ F (* B (- F))) t_1)
(if (<= F -2.8e-195)
t_0
(if (<= F 9.2e-200)
(/ x (- (tan B)))
(if (<= F 5.6e-142)
t_0
(if (<= F 7.3e-96) (- (/ 1.0 B) t_1) (- (/ 1.0 (sin B)) t_1))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -7.4e-149) {
tmp = (F / (B * -F)) - t_1;
} else if (F <= -2.8e-195) {
tmp = t_0;
} else if (F <= 9.2e-200) {
tmp = x / -tan(B);
} else if (F <= 5.6e-142) {
tmp = t_0;
} else if (F <= 7.3e-96) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / tan(b)
if (f <= (-7.4d-149)) then
tmp = (f / (b * -f)) - t_1
else if (f <= (-2.8d-195)) then
tmp = t_0
else if (f <= 9.2d-200) then
tmp = x / -tan(b)
else if (f <= 5.6d-142) then
tmp = t_0
else if (f <= 7.3d-96) then
tmp = (1.0d0 / b) - t_1
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -7.4e-149) {
tmp = (F / (B * -F)) - t_1;
} else if (F <= -2.8e-195) {
tmp = t_0;
} else if (F <= 9.2e-200) {
tmp = x / -Math.tan(B);
} else if (F <= 5.6e-142) {
tmp = t_0;
} else if (F <= 7.3e-96) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / math.tan(B) tmp = 0 if F <= -7.4e-149: tmp = (F / (B * -F)) - t_1 elif F <= -2.8e-195: tmp = t_0 elif F <= 9.2e-200: tmp = x / -math.tan(B) elif F <= 5.6e-142: tmp = t_0 elif F <= 7.3e-96: tmp = (1.0 / B) - t_1 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.4e-149) tmp = Float64(Float64(F / Float64(B * Float64(-F))) - t_1); elseif (F <= -2.8e-195) tmp = t_0; elseif (F <= 9.2e-200) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 5.6e-142) tmp = t_0; elseif (F <= 7.3e-96) tmp = Float64(Float64(1.0 / B) - t_1); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / tan(B); tmp = 0.0; if (F <= -7.4e-149) tmp = (F / (B * -F)) - t_1; elseif (F <= -2.8e-195) tmp = t_0; elseif (F <= 9.2e-200) tmp = x / -tan(B); elseif (F <= 5.6e-142) tmp = t_0; elseif (F <= 7.3e-96) tmp = (1.0 / B) - t_1; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.4e-149], N[(N[(F / N[(B * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.8e-195], t$95$0, If[LessEqual[F, 9.2e-200], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 5.6e-142], t$95$0, If[LessEqual[F, 7.3e-96], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.4 \cdot 10^{-149}:\\
\;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-195}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-142}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7.3 \cdot 10^{-96}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -7.3999999999999998e-149Initial program 78.1%
Simplified84.5%
Taylor expanded in x around 0 84.6%
associate-*l/84.5%
*-lft-identity84.5%
+-commutative84.5%
unpow284.5%
fma-undefine84.5%
Simplified84.5%
clear-num84.5%
un-div-inv84.5%
inv-pow84.5%
sqrt-pow184.5%
metadata-eval84.5%
Applied egg-rr84.5%
Taylor expanded in B around 0 72.5%
+-commutative72.5%
unpow272.5%
fma-undefine72.5%
Simplified72.5%
Taylor expanded in F around -inf 77.1%
associate-*r*77.1%
neg-mul-177.1%
Simplified77.1%
if -7.3999999999999998e-149 < F < -2.80000000000000003e-195 or 9.2000000000000003e-200 < F < 5.60000000000000009e-142Initial program 99.2%
Simplified99.4%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 69.3%
if -2.80000000000000003e-195 < F < 9.2000000000000003e-200Initial program 99.5%
Taylor expanded in F around -inf 38.2%
Taylor expanded in x around inf 94.1%
mul-1-neg94.1%
associate-/l*94.0%
distribute-lft-neg-in94.0%
Simplified94.0%
add-sqr-sqrt26.6%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod0.8%
add-sqr-sqrt1.7%
clear-num1.7%
tan-quot1.7%
div-inv1.7%
frac-2neg1.7%
neg-sub01.7%
div-sub1.7%
add-sqr-sqrt0.8%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod26.8%
add-sqr-sqrt94.2%
frac-2neg94.2%
Applied egg-rr94.2%
div094.2%
neg-sub094.2%
distribute-frac-neg294.2%
Simplified94.2%
if 5.60000000000000009e-142 < F < 7.29999999999999994e-96Initial program 99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
inv-pow99.5%
sqrt-pow199.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 87.8%
+-commutative87.8%
unpow287.8%
fma-undefine87.8%
Simplified87.8%
Taylor expanded in F around inf 77.0%
if 7.29999999999999994e-96 < F Initial program 65.7%
Simplified72.5%
Taylor expanded in x around 0 72.6%
associate-*l/72.6%
*-lft-identity72.6%
+-commutative72.6%
unpow272.6%
fma-undefine72.6%
Simplified72.6%
Taylor expanded in F around inf 88.2%
Final simplification83.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (tan B))))
(if (<= F -2.5e-152)
(- (/ F (* B (- F))) t_1)
(if (<= F -2.9e-196)
t_0
(if (<= F 4.3e-200)
(/ x (- (tan B)))
(if (<= F 8.5e-145)
t_0
(if (<= F 2.3e-61)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 2.35e+212)
(- (/ 1.0 B) t_1)
(if (<= F 3.6e+280)
(/ 1.0 (sin B))
(- (/ F (* F B)) t_1))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -2.5e-152) {
tmp = (F / (B * -F)) - t_1;
} else if (F <= -2.9e-196) {
tmp = t_0;
} else if (F <= 4.3e-200) {
tmp = x / -tan(B);
} else if (F <= 8.5e-145) {
tmp = t_0;
} else if (F <= 2.3e-61) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 2.35e+212) {
tmp = (1.0 / B) - t_1;
} else if (F <= 3.6e+280) {
tmp = 1.0 / sin(B);
} else {
tmp = (F / (F * B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / tan(b)
if (f <= (-2.5d-152)) then
tmp = (f / (b * -f)) - t_1
else if (f <= (-2.9d-196)) then
tmp = t_0
else if (f <= 4.3d-200) then
tmp = x / -tan(b)
else if (f <= 8.5d-145) then
tmp = t_0
else if (f <= 2.3d-61) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 2.35d+212) then
tmp = (1.0d0 / b) - t_1
else if (f <= 3.6d+280) then
tmp = 1.0d0 / sin(b)
else
tmp = (f / (f * b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.5e-152) {
tmp = (F / (B * -F)) - t_1;
} else if (F <= -2.9e-196) {
tmp = t_0;
} else if (F <= 4.3e-200) {
tmp = x / -Math.tan(B);
} else if (F <= 8.5e-145) {
tmp = t_0;
} else if (F <= 2.3e-61) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 2.35e+212) {
tmp = (1.0 / B) - t_1;
} else if (F <= 3.6e+280) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (F / (F * B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / math.tan(B) tmp = 0 if F <= -2.5e-152: tmp = (F / (B * -F)) - t_1 elif F <= -2.9e-196: tmp = t_0 elif F <= 4.3e-200: tmp = x / -math.tan(B) elif F <= 8.5e-145: tmp = t_0 elif F <= 2.3e-61: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 2.35e+212: tmp = (1.0 / B) - t_1 elif F <= 3.6e+280: tmp = 1.0 / math.sin(B) else: tmp = (F / (F * B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.5e-152) tmp = Float64(Float64(F / Float64(B * Float64(-F))) - t_1); elseif (F <= -2.9e-196) tmp = t_0; elseif (F <= 4.3e-200) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 8.5e-145) tmp = t_0; elseif (F <= 2.3e-61) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 2.35e+212) tmp = Float64(Float64(1.0 / B) - t_1); elseif (F <= 3.6e+280) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(F / Float64(F * B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / tan(B); tmp = 0.0; if (F <= -2.5e-152) tmp = (F / (B * -F)) - t_1; elseif (F <= -2.9e-196) tmp = t_0; elseif (F <= 4.3e-200) tmp = x / -tan(B); elseif (F <= 8.5e-145) tmp = t_0; elseif (F <= 2.3e-61) tmp = cos(B) * (-x / sin(B)); elseif (F <= 2.35e+212) tmp = (1.0 / B) - t_1; elseif (F <= 3.6e+280) tmp = 1.0 / sin(B); else tmp = (F / (F * B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e-152], N[(N[(F / N[(B * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.9e-196], t$95$0, If[LessEqual[F, 4.3e-200], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 8.5e-145], t$95$0, If[LessEqual[F, 2.3e-61], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.35e+212], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3.6e+280], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-152}:\\
\;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-196}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-145}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-61}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{+280}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_1\\
\end{array}
\end{array}
if F < -2.4999999999999998e-152Initial program 78.1%
Simplified84.5%
Taylor expanded in x around 0 84.6%
associate-*l/84.5%
*-lft-identity84.5%
+-commutative84.5%
unpow284.5%
fma-undefine84.5%
Simplified84.5%
clear-num84.5%
un-div-inv84.5%
inv-pow84.5%
sqrt-pow184.5%
metadata-eval84.5%
Applied egg-rr84.5%
Taylor expanded in B around 0 72.5%
+-commutative72.5%
unpow272.5%
fma-undefine72.5%
Simplified72.5%
Taylor expanded in F around -inf 77.1%
associate-*r*77.1%
neg-mul-177.1%
Simplified77.1%
if -2.4999999999999998e-152 < F < -2.89999999999999987e-196 or 4.29999999999999975e-200 < F < 8.50000000000000043e-145Initial program 99.2%
Simplified99.4%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 69.3%
if -2.89999999999999987e-196 < F < 4.29999999999999975e-200Initial program 99.5%
Taylor expanded in F around -inf 38.2%
Taylor expanded in x around inf 94.1%
mul-1-neg94.1%
associate-/l*94.0%
distribute-lft-neg-in94.0%
Simplified94.0%
add-sqr-sqrt26.6%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod0.8%
add-sqr-sqrt1.7%
clear-num1.7%
tan-quot1.7%
div-inv1.7%
frac-2neg1.7%
neg-sub01.7%
div-sub1.7%
add-sqr-sqrt0.8%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod26.8%
add-sqr-sqrt94.2%
frac-2neg94.2%
Applied egg-rr94.2%
div094.2%
neg-sub094.2%
distribute-frac-neg294.2%
Simplified94.2%
if 8.50000000000000043e-145 < F < 2.29999999999999992e-61Initial program 99.4%
Taylor expanded in F around -inf 29.5%
Taylor expanded in x around inf 65.8%
mul-1-neg65.8%
associate-/l*65.9%
distribute-lft-neg-in65.9%
Simplified65.9%
clear-num65.9%
tan-quot65.8%
*-un-lft-identity65.8%
Applied egg-rr65.8%
*-lft-identity65.8%
Simplified65.8%
Taylor expanded in x around 0 65.8%
mul-1-neg65.8%
distribute-frac-neg265.8%
*-commutative65.8%
associate-/l*65.9%
Simplified65.9%
if 2.29999999999999992e-61 < F < 2.34999999999999996e212Initial program 84.4%
Simplified88.2%
Taylor expanded in x around 0 88.3%
associate-*l/88.3%
*-lft-identity88.3%
+-commutative88.3%
unpow288.3%
fma-undefine88.3%
Simplified88.3%
clear-num88.2%
un-div-inv88.3%
inv-pow88.3%
sqrt-pow188.2%
metadata-eval88.2%
Applied egg-rr88.2%
Taylor expanded in B around 0 63.8%
+-commutative63.8%
unpow263.8%
fma-undefine63.8%
Simplified63.8%
Taylor expanded in F around inf 68.4%
if 2.34999999999999996e212 < F < 3.6e280Initial program 18.0%
Taylor expanded in F around -inf 27.1%
add-cube-cbrt27.0%
pow327.0%
Applied egg-rr72.6%
Taylor expanded in x around 0 73.9%
Taylor expanded in B around inf 74.9%
if 3.6e280 < F Initial program 36.9%
Simplified56.4%
Taylor expanded in x around 0 56.4%
associate-*l/56.4%
*-lft-identity56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
clear-num56.4%
un-div-inv56.4%
inv-pow56.4%
sqrt-pow156.4%
metadata-eval56.4%
Applied egg-rr56.4%
Taylor expanded in B around 0 56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
Taylor expanded in F around inf 82.5%
*-commutative82.5%
Simplified82.5%
Final simplification76.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.37)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 4.5e-82)
(- (* 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.37) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 4.5e-82) {
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.37d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 4.5d-82) 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.37) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 4.5e-82) {
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.37: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 4.5e-82: 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.37) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 4.5e-82) 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 <= -0.37) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 4.5e-82) 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.37], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-82], 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 -0.37:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-82}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.37Initial program 69.2%
Taylor expanded in F around -inf 99.7%
div-inv69.3%
clear-num69.2%
Applied egg-rr99.8%
if -0.37 < F < 4.4999999999999998e-82Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.5%
Taylor expanded in x around 0 88.4%
associate-/l*88.5%
Simplified88.5%
if 4.4999999999999998e-82 < F Initial program 64.6%
Simplified71.6%
Taylor expanded in x around 0 71.7%
associate-*l/71.7%
*-lft-identity71.7%
+-commutative71.7%
unpow271.7%
fma-undefine71.7%
Simplified71.7%
Taylor expanded in F around inf 89.9%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.5)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 2.15e-61)
(- (* 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.5) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 2.15e-61) {
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.5d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 2.15d-61) 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.5) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 2.15e-61) {
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.5: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 2.15e-61: 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.5) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 2.15e-61) 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 <= -0.5) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 2.15e-61) 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.5], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.15e-61], 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 -0.5:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{-61}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.5Initial program 69.2%
Taylor expanded in F around -inf 99.7%
if -0.5 < F < 2.1500000000000002e-61Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.0%
Taylor expanded in x around 0 88.0%
associate-/l*88.0%
Simplified88.0%
if 2.1500000000000002e-61 < F Initial program 62.8%
Simplified70.3%
Taylor expanded in x around 0 70.4%
associate-*l/70.4%
*-lft-identity70.4%
+-commutative70.4%
unpow270.4%
fma-undefine70.4%
Simplified70.4%
Taylor expanded in F around inf 92.1%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.4e+66)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 7.8e-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+66) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 7.8e-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+66)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 7.8d-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+66) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 7.8e-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+66: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 7.8e-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+66) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 7.8e-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+66) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 7.8e-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+66], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-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^{+66}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 7.8 \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.4000000000000003e66Initial program 63.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.5%
if -3.4000000000000003e66 < F < 7.8000000000000004e-53Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 94.1%
Taylor expanded in B around 0 83.0%
Taylor expanded in x around 0 83.8%
associate-/l*83.9%
Simplified83.9%
if 7.8000000000000004e-53 < F Initial program 61.9%
Simplified69.5%
Taylor expanded in x around 0 69.6%
associate-*l/69.6%
*-lft-identity69.6%
+-commutative69.6%
unpow269.6%
fma-undefine69.6%
Simplified69.6%
Taylor expanded in F around inf 94.3%
Final simplification87.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (/ x (- (tan B))))
(t_2 (/ 1.0 (sin B)))
(t_3 (- (/ -1.0 (sin B)) (/ x B)))
(t_4 (- (/ 1.0 B) t_0)))
(if (<= F -8e+209)
t_3
(if (<= F -5.5e+149)
t_1
(if (<= F -4.2e+105)
t_3
(if (<= F 2.65e-61)
t_1
(if (<= F 9.2e+80)
t_4
(if (<= F 4.2e+100)
t_2
(if (<= F 2.3e+212)
t_4
(if (<= F 3.5e+280) t_2 (- (/ F (* F B)) t_0)))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = x / -tan(B);
double t_2 = 1.0 / sin(B);
double t_3 = (-1.0 / sin(B)) - (x / B);
double t_4 = (1.0 / B) - t_0;
double tmp;
if (F <= -8e+209) {
tmp = t_3;
} else if (F <= -5.5e+149) {
tmp = t_1;
} else if (F <= -4.2e+105) {
tmp = t_3;
} else if (F <= 2.65e-61) {
tmp = t_1;
} else if (F <= 9.2e+80) {
tmp = t_4;
} else if (F <= 4.2e+100) {
tmp = t_2;
} else if (F <= 2.3e+212) {
tmp = t_4;
} else if (F <= 3.5e+280) {
tmp = t_2;
} else {
tmp = (F / (F * 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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = x / tan(b)
t_1 = x / -tan(b)
t_2 = 1.0d0 / sin(b)
t_3 = ((-1.0d0) / sin(b)) - (x / b)
t_4 = (1.0d0 / b) - t_0
if (f <= (-8d+209)) then
tmp = t_3
else if (f <= (-5.5d+149)) then
tmp = t_1
else if (f <= (-4.2d+105)) then
tmp = t_3
else if (f <= 2.65d-61) then
tmp = t_1
else if (f <= 9.2d+80) then
tmp = t_4
else if (f <= 4.2d+100) then
tmp = t_2
else if (f <= 2.3d+212) then
tmp = t_4
else if (f <= 3.5d+280) then
tmp = t_2
else
tmp = (f / (f * 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 t_1 = x / -Math.tan(B);
double t_2 = 1.0 / Math.sin(B);
double t_3 = (-1.0 / Math.sin(B)) - (x / B);
double t_4 = (1.0 / B) - t_0;
double tmp;
if (F <= -8e+209) {
tmp = t_3;
} else if (F <= -5.5e+149) {
tmp = t_1;
} else if (F <= -4.2e+105) {
tmp = t_3;
} else if (F <= 2.65e-61) {
tmp = t_1;
} else if (F <= 9.2e+80) {
tmp = t_4;
} else if (F <= 4.2e+100) {
tmp = t_2;
} else if (F <= 2.3e+212) {
tmp = t_4;
} else if (F <= 3.5e+280) {
tmp = t_2;
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = x / -math.tan(B) t_2 = 1.0 / math.sin(B) t_3 = (-1.0 / math.sin(B)) - (x / B) t_4 = (1.0 / B) - t_0 tmp = 0 if F <= -8e+209: tmp = t_3 elif F <= -5.5e+149: tmp = t_1 elif F <= -4.2e+105: tmp = t_3 elif F <= 2.65e-61: tmp = t_1 elif F <= 9.2e+80: tmp = t_4 elif F <= 4.2e+100: tmp = t_2 elif F <= 2.3e+212: tmp = t_4 elif F <= 3.5e+280: tmp = t_2 else: tmp = (F / (F * B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(x / Float64(-tan(B))) t_2 = Float64(1.0 / sin(B)) t_3 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_4 = Float64(Float64(1.0 / B) - t_0) tmp = 0.0 if (F <= -8e+209) tmp = t_3; elseif (F <= -5.5e+149) tmp = t_1; elseif (F <= -4.2e+105) tmp = t_3; elseif (F <= 2.65e-61) tmp = t_1; elseif (F <= 9.2e+80) tmp = t_4; elseif (F <= 4.2e+100) tmp = t_2; elseif (F <= 2.3e+212) tmp = t_4; elseif (F <= 3.5e+280) tmp = t_2; else tmp = Float64(Float64(F / Float64(F * B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = x / -tan(B); t_2 = 1.0 / sin(B); t_3 = (-1.0 / sin(B)) - (x / B); t_4 = (1.0 / B) - t_0; tmp = 0.0; if (F <= -8e+209) tmp = t_3; elseif (F <= -5.5e+149) tmp = t_1; elseif (F <= -4.2e+105) tmp = t_3; elseif (F <= 2.65e-61) tmp = t_1; elseif (F <= 9.2e+80) tmp = t_4; elseif (F <= 4.2e+100) tmp = t_2; elseif (F <= 2.3e+212) tmp = t_4; elseif (F <= 3.5e+280) tmp = t_2; else tmp = (F / (F * B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -8e+209], t$95$3, If[LessEqual[F, -5.5e+149], t$95$1, If[LessEqual[F, -4.2e+105], t$95$3, If[LessEqual[F, 2.65e-61], t$95$1, If[LessEqual[F, 9.2e+80], t$95$4, If[LessEqual[F, 4.2e+100], t$95$2, If[LessEqual[F, 2.3e+212], t$95$4, If[LessEqual[F, 3.5e+280], t$95$2, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{x}{-\tan B}\\
t_2 := \frac{1}{\sin B}\\
t_3 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_4 := \frac{1}{B} - t\_0\\
\mathbf{if}\;F \leq -8 \cdot 10^{+209}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{+80}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -8.0000000000000006e209 or -5.49999999999999999e149 < F < -4.2000000000000002e105Initial program 46.9%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 75.5%
if -8.0000000000000006e209 < F < -5.49999999999999999e149 or -4.2000000000000002e105 < F < 2.65e-61Initial program 98.7%
Taylor expanded in F around -inf 51.4%
Taylor expanded in x around inf 71.3%
mul-1-neg71.3%
associate-/l*71.2%
distribute-lft-neg-in71.2%
Simplified71.2%
add-sqr-sqrt19.2%
sqrt-unprod16.2%
sqr-neg16.2%
sqrt-unprod1.1%
add-sqr-sqrt1.9%
clear-num1.9%
tan-quot1.9%
div-inv1.9%
frac-2neg1.9%
neg-sub01.9%
div-sub1.9%
add-sqr-sqrt1.1%
sqrt-unprod16.2%
sqr-neg16.2%
sqrt-unprod19.3%
add-sqr-sqrt71.4%
frac-2neg71.4%
Applied egg-rr71.4%
div071.4%
neg-sub071.4%
distribute-frac-neg271.4%
Simplified71.4%
if 2.65e-61 < F < 9.20000000000000016e80 or 4.1999999999999997e100 < F < 2.2999999999999998e212Initial program 82.0%
Simplified86.4%
Taylor expanded in x around 0 86.5%
associate-*l/86.6%
*-lft-identity86.6%
+-commutative86.6%
unpow286.6%
fma-undefine86.6%
Simplified86.6%
clear-num86.4%
un-div-inv86.5%
inv-pow86.5%
sqrt-pow186.4%
metadata-eval86.4%
Applied egg-rr86.4%
Taylor expanded in B around 0 69.0%
+-commutative69.0%
unpow269.0%
fma-undefine69.0%
Simplified69.0%
Taylor expanded in F around inf 74.3%
if 9.20000000000000016e80 < F < 4.1999999999999997e100 or 2.2999999999999998e212 < F < 3.5000000000000001e280Initial program 40.0%
Taylor expanded in F around -inf 24.0%
add-cube-cbrt23.9%
pow324.0%
Applied egg-rr75.7%
Taylor expanded in x around 0 76.8%
Taylor expanded in B around inf 77.9%
if 3.5000000000000001e280 < F Initial program 36.9%
Simplified56.4%
Taylor expanded in x around 0 56.4%
associate-*l/56.4%
*-lft-identity56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
clear-num56.4%
un-div-inv56.4%
inv-pow56.4%
sqrt-pow156.4%
metadata-eval56.4%
Applied egg-rr56.4%
Taylor expanded in B around 0 56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
Taylor expanded in F around inf 82.5%
*-commutative82.5%
Simplified82.5%
Final simplification73.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1e+212)
t_1
(if (<= F -5.5e+149)
t_0
(if (<= F -4.2e+105)
t_1
(if (<= F 3.2e-61)
t_0
(if (or (<= F 8.5e+78)
(and (not (<= F 1.5e+101))
(or (<= F 2.15e+212) (not (<= F 3.9e+280)))))
(- (/ 1.0 B) (/ x (tan B)))
(/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = x / -tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1e+212) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = t_0;
} else if (F <= -4.2e+105) {
tmp = t_1;
} else if (F <= 3.2e-61) {
tmp = t_0;
} else if ((F <= 8.5e+78) || (!(F <= 1.5e+101) && ((F <= 2.15e+212) || !(F <= 3.9e+280)))) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / -tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1d+212)) then
tmp = t_1
else if (f <= (-5.5d+149)) then
tmp = t_0
else if (f <= (-4.2d+105)) then
tmp = t_1
else if (f <= 3.2d-61) then
tmp = t_0
else if ((f <= 8.5d+78) .or. (.not. (f <= 1.5d+101)) .and. (f <= 2.15d+212) .or. (.not. (f <= 3.9d+280))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1e+212) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = t_0;
} else if (F <= -4.2e+105) {
tmp = t_1;
} else if (F <= 3.2e-61) {
tmp = t_0;
} else if ((F <= 8.5e+78) || (!(F <= 1.5e+101) && ((F <= 2.15e+212) || !(F <= 3.9e+280)))) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / -math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1e+212: tmp = t_1 elif F <= -5.5e+149: tmp = t_0 elif F <= -4.2e+105: tmp = t_1 elif F <= 3.2e-61: tmp = t_0 elif (F <= 8.5e+78) or (not (F <= 1.5e+101) and ((F <= 2.15e+212) or not (F <= 3.9e+280))): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1e+212) tmp = t_1; elseif (F <= -5.5e+149) tmp = t_0; elseif (F <= -4.2e+105) tmp = t_1; elseif (F <= 3.2e-61) tmp = t_0; elseif ((F <= 8.5e+78) || (!(F <= 1.5e+101) && ((F <= 2.15e+212) || !(F <= 3.9e+280)))) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1e+212) tmp = t_1; elseif (F <= -5.5e+149) tmp = t_0; elseif (F <= -4.2e+105) tmp = t_1; elseif (F <= 3.2e-61) tmp = t_0; elseif ((F <= 8.5e+78) || (~((F <= 1.5e+101)) && ((F <= 2.15e+212) || ~((F <= 3.9e+280))))) tmp = (1.0 / B) - (x / tan(B)); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+212], t$95$1, If[LessEqual[F, -5.5e+149], t$95$0, If[LessEqual[F, -4.2e+105], t$95$1, If[LessEqual[F, 3.2e-61], t$95$0, If[Or[LessEqual[F, 8.5e+78], And[N[Not[LessEqual[F, 1.5e+101]], $MachinePrecision], Or[LessEqual[F, 2.15e+212], N[Not[LessEqual[F, 3.9e+280]], $MachinePrecision]]]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-61}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+78} \lor \neg \left(F \leq 1.5 \cdot 10^{+101}\right) \land \left(F \leq 2.15 \cdot 10^{+212} \lor \neg \left(F \leq 3.9 \cdot 10^{+280}\right)\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.9999999999999991e211 or -5.49999999999999999e149 < F < -4.2000000000000002e105Initial program 46.9%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 75.5%
if -9.9999999999999991e211 < F < -5.49999999999999999e149 or -4.2000000000000002e105 < F < 3.2000000000000001e-61Initial program 98.7%
Taylor expanded in F around -inf 51.4%
Taylor expanded in x around inf 71.3%
mul-1-neg71.3%
associate-/l*71.2%
distribute-lft-neg-in71.2%
Simplified71.2%
add-sqr-sqrt19.2%
sqrt-unprod16.2%
sqr-neg16.2%
sqrt-unprod1.1%
add-sqr-sqrt1.9%
clear-num1.9%
tan-quot1.9%
div-inv1.9%
frac-2neg1.9%
neg-sub01.9%
div-sub1.9%
add-sqr-sqrt1.1%
sqrt-unprod16.2%
sqr-neg16.2%
sqrt-unprod19.3%
add-sqr-sqrt71.4%
frac-2neg71.4%
Applied egg-rr71.4%
div071.4%
neg-sub071.4%
distribute-frac-neg271.4%
Simplified71.4%
if 3.2000000000000001e-61 < F < 8.50000000000000079e78 or 1.49999999999999997e101 < F < 2.1499999999999998e212 or 3.90000000000000029e280 < F Initial program 73.0%
Simplified80.4%
Taylor expanded in x around 0 80.5%
associate-*l/80.5%
*-lft-identity80.5%
+-commutative80.5%
unpow280.5%
fma-undefine80.5%
Simplified80.5%
clear-num80.4%
un-div-inv80.5%
inv-pow80.5%
sqrt-pow180.4%
metadata-eval80.4%
Applied egg-rr80.4%
Taylor expanded in B around 0 66.5%
+-commutative66.5%
unpow266.5%
fma-undefine66.5%
Simplified66.5%
Taylor expanded in F around inf 75.9%
if 8.50000000000000079e78 < F < 1.49999999999999997e101 or 2.1499999999999998e212 < F < 3.90000000000000029e280Initial program 40.0%
Taylor expanded in F around -inf 24.0%
add-cube-cbrt23.9%
pow324.0%
Applied egg-rr75.7%
Taylor expanded in x around 0 76.8%
Taylor expanded in B around inf 77.9%
Final simplification73.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (tan B))))
(if (<= F -4.5e-152)
(- (/ F (* B (- F))) t_1)
(if (<= F -8.5e-196)
t_0
(if (<= F 9e-200)
(/ x (- (tan B)))
(if (<= F 9.2e-145)
t_0
(if (<= F 3.2e-61)
(* x (/ -1.0 (tan B)))
(if (<= F 2.3e+212)
(- (/ 1.0 B) t_1)
(if (<= F 3.9e+280)
(/ 1.0 (sin B))
(- (/ F (* F B)) t_1))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -4.5e-152) {
tmp = (F / (B * -F)) - t_1;
} else if (F <= -8.5e-196) {
tmp = t_0;
} else if (F <= 9e-200) {
tmp = x / -tan(B);
} else if (F <= 9.2e-145) {
tmp = t_0;
} else if (F <= 3.2e-61) {
tmp = x * (-1.0 / tan(B));
} else if (F <= 2.3e+212) {
tmp = (1.0 / B) - t_1;
} else if (F <= 3.9e+280) {
tmp = 1.0 / sin(B);
} else {
tmp = (F / (F * B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / tan(b)
if (f <= (-4.5d-152)) then
tmp = (f / (b * -f)) - t_1
else if (f <= (-8.5d-196)) then
tmp = t_0
else if (f <= 9d-200) then
tmp = x / -tan(b)
else if (f <= 9.2d-145) then
tmp = t_0
else if (f <= 3.2d-61) then
tmp = x * ((-1.0d0) / tan(b))
else if (f <= 2.3d+212) then
tmp = (1.0d0 / b) - t_1
else if (f <= 3.9d+280) then
tmp = 1.0d0 / sin(b)
else
tmp = (f / (f * b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -4.5e-152) {
tmp = (F / (B * -F)) - t_1;
} else if (F <= -8.5e-196) {
tmp = t_0;
} else if (F <= 9e-200) {
tmp = x / -Math.tan(B);
} else if (F <= 9.2e-145) {
tmp = t_0;
} else if (F <= 3.2e-61) {
tmp = x * (-1.0 / Math.tan(B));
} else if (F <= 2.3e+212) {
tmp = (1.0 / B) - t_1;
} else if (F <= 3.9e+280) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (F / (F * B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / math.tan(B) tmp = 0 if F <= -4.5e-152: tmp = (F / (B * -F)) - t_1 elif F <= -8.5e-196: tmp = t_0 elif F <= 9e-200: tmp = x / -math.tan(B) elif F <= 9.2e-145: tmp = t_0 elif F <= 3.2e-61: tmp = x * (-1.0 / math.tan(B)) elif F <= 2.3e+212: tmp = (1.0 / B) - t_1 elif F <= 3.9e+280: tmp = 1.0 / math.sin(B) else: tmp = (F / (F * B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.5e-152) tmp = Float64(Float64(F / Float64(B * Float64(-F))) - t_1); elseif (F <= -8.5e-196) tmp = t_0; elseif (F <= 9e-200) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 9.2e-145) tmp = t_0; elseif (F <= 3.2e-61) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (F <= 2.3e+212) tmp = Float64(Float64(1.0 / B) - t_1); elseif (F <= 3.9e+280) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(F / Float64(F * B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / tan(B); tmp = 0.0; if (F <= -4.5e-152) tmp = (F / (B * -F)) - t_1; elseif (F <= -8.5e-196) tmp = t_0; elseif (F <= 9e-200) tmp = x / -tan(B); elseif (F <= 9.2e-145) tmp = t_0; elseif (F <= 3.2e-61) tmp = x * (-1.0 / tan(B)); elseif (F <= 2.3e+212) tmp = (1.0 / B) - t_1; elseif (F <= 3.9e+280) tmp = 1.0 / sin(B); else tmp = (F / (F * B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.5e-152], N[(N[(F / N[(B * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -8.5e-196], t$95$0, If[LessEqual[F, 9e-200], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 9.2e-145], t$95$0, If[LessEqual[F, 3.2e-61], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e+212], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3.9e+280], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.5 \cdot 10^{-152}:\\
\;\;\;\;\frac{F}{B \cdot \left(-F\right)} - t\_1\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-196}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-200}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-145}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-61}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+212}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{+280}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_1\\
\end{array}
\end{array}
if F < -4.5000000000000004e-152Initial program 78.1%
Simplified84.5%
Taylor expanded in x around 0 84.6%
associate-*l/84.5%
*-lft-identity84.5%
+-commutative84.5%
unpow284.5%
fma-undefine84.5%
Simplified84.5%
clear-num84.5%
un-div-inv84.5%
inv-pow84.5%
sqrt-pow184.5%
metadata-eval84.5%
Applied egg-rr84.5%
Taylor expanded in B around 0 72.5%
+-commutative72.5%
unpow272.5%
fma-undefine72.5%
Simplified72.5%
Taylor expanded in F around -inf 77.1%
associate-*r*77.1%
neg-mul-177.1%
Simplified77.1%
if -4.5000000000000004e-152 < F < -8.50000000000000004e-196 or 9.0000000000000004e-200 < F < 9.20000000000000028e-145Initial program 99.2%
Simplified99.4%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 69.3%
if -8.50000000000000004e-196 < F < 9.0000000000000004e-200Initial program 99.5%
Taylor expanded in F around -inf 38.2%
Taylor expanded in x around inf 94.1%
mul-1-neg94.1%
associate-/l*94.0%
distribute-lft-neg-in94.0%
Simplified94.0%
add-sqr-sqrt26.6%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod0.8%
add-sqr-sqrt1.7%
clear-num1.7%
tan-quot1.7%
div-inv1.7%
frac-2neg1.7%
neg-sub01.7%
div-sub1.7%
add-sqr-sqrt0.8%
sqrt-unprod20.8%
sqr-neg20.8%
sqrt-unprod26.8%
add-sqr-sqrt94.2%
frac-2neg94.2%
Applied egg-rr94.2%
div094.2%
neg-sub094.2%
distribute-frac-neg294.2%
Simplified94.2%
if 9.20000000000000028e-145 < F < 3.2000000000000001e-61Initial program 99.4%
Taylor expanded in F around -inf 29.5%
Taylor expanded in x around inf 65.8%
mul-1-neg65.8%
associate-/l*65.9%
distribute-lft-neg-in65.9%
Simplified65.9%
clear-num65.9%
tan-quot65.8%
*-un-lft-identity65.8%
Applied egg-rr65.8%
*-lft-identity65.8%
Simplified65.8%
if 3.2000000000000001e-61 < F < 2.2999999999999998e212Initial program 84.4%
Simplified88.2%
Taylor expanded in x around 0 88.3%
associate-*l/88.3%
*-lft-identity88.3%
+-commutative88.3%
unpow288.3%
fma-undefine88.3%
Simplified88.3%
clear-num88.2%
un-div-inv88.3%
inv-pow88.3%
sqrt-pow188.2%
metadata-eval88.2%
Applied egg-rr88.2%
Taylor expanded in B around 0 63.8%
+-commutative63.8%
unpow263.8%
fma-undefine63.8%
Simplified63.8%
Taylor expanded in F around inf 68.4%
if 2.2999999999999998e212 < F < 3.90000000000000029e280Initial program 18.0%
Taylor expanded in F around -inf 27.1%
add-cube-cbrt27.0%
pow327.0%
Applied egg-rr72.6%
Taylor expanded in x around 0 73.9%
Taylor expanded in B around inf 74.9%
if 3.90000000000000029e280 < F Initial program 36.9%
Simplified56.4%
Taylor expanded in x around 0 56.4%
associate-*l/56.4%
*-lft-identity56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
clear-num56.4%
un-div-inv56.4%
inv-pow56.4%
sqrt-pow156.4%
metadata-eval56.4%
Applied egg-rr56.4%
Taylor expanded in B around 0 56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
Taylor expanded in F around inf 82.5%
*-commutative82.5%
Simplified82.5%
Final simplification76.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- (tan B)))))
(if (<= F -1.25e+149)
t_0
(if (<= F -4.1e+83)
(/ (- -1.0 x) B)
(if (<= F 2.85e-61)
t_0
(if (or (<= F 4.4e+76)
(not
(or (<= F 6.2e+100)
(and (not (<= F 2.3e+212)) (<= F 3.9e+280)))))
(- (/ 1.0 B) (/ x (tan B)))
(/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / -tan(B);
double tmp;
if (F <= -1.25e+149) {
tmp = t_0;
} else if (F <= -4.1e+83) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.85e-61) {
tmp = t_0;
} else if ((F <= 4.4e+76) || !((F <= 6.2e+100) || (!(F <= 2.3e+212) && (F <= 3.9e+280)))) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -tan(b)
if (f <= (-1.25d+149)) then
tmp = t_0
else if (f <= (-4.1d+83)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.85d-61) then
tmp = t_0
else if ((f <= 4.4d+76) .or. (.not. (f <= 6.2d+100) .or. (.not. (f <= 2.3d+212)) .and. (f <= 3.9d+280))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = 1.0d0 / sin(b)
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.25e+149) {
tmp = t_0;
} else if (F <= -4.1e+83) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.85e-61) {
tmp = t_0;
} else if ((F <= 4.4e+76) || !((F <= 6.2e+100) || (!(F <= 2.3e+212) && (F <= 3.9e+280)))) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / -math.tan(B) tmp = 0 if F <= -1.25e+149: tmp = t_0 elif F <= -4.1e+83: tmp = (-1.0 - x) / B elif F <= 2.85e-61: tmp = t_0 elif (F <= 4.4e+76) or not ((F <= 6.2e+100) or (not (F <= 2.3e+212) and (F <= 3.9e+280))): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-tan(B))) tmp = 0.0 if (F <= -1.25e+149) tmp = t_0; elseif (F <= -4.1e+83) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.85e-61) tmp = t_0; elseif ((F <= 4.4e+76) || !((F <= 6.2e+100) || (!(F <= 2.3e+212) && (F <= 3.9e+280)))) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -tan(B); tmp = 0.0; if (F <= -1.25e+149) tmp = t_0; elseif (F <= -4.1e+83) tmp = (-1.0 - x) / B; elseif (F <= 2.85e-61) tmp = t_0; elseif ((F <= 4.4e+76) || ~(((F <= 6.2e+100) || (~((F <= 2.3e+212)) && (F <= 3.9e+280))))) tmp = (1.0 / B) - (x / tan(B)); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[F, -1.25e+149], t$95$0, If[LessEqual[F, -4.1e+83], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.85e-61], t$95$0, If[Or[LessEqual[F, 4.4e+76], N[Not[Or[LessEqual[F, 6.2e+100], And[N[Not[LessEqual[F, 2.3e+212]], $MachinePrecision], LessEqual[F, 3.9e+280]]]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-\tan B}\\
\mathbf{if}\;F \leq -1.25 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.85 \cdot 10^{-61}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{+76} \lor \neg \left(F \leq 6.2 \cdot 10^{+100} \lor \neg \left(F \leq 2.3 \cdot 10^{+212}\right) \land F \leq 3.9 \cdot 10^{+280}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.24999999999999998e149 or -4.1000000000000001e83 < F < 2.85000000000000003e-61Initial program 87.6%
Taylor expanded in F around -inf 58.1%
Taylor expanded in x around inf 66.7%
mul-1-neg66.7%
associate-/l*66.7%
distribute-lft-neg-in66.7%
Simplified66.7%
add-sqr-sqrt21.1%
sqrt-unprod18.1%
sqr-neg18.1%
sqrt-unprod1.1%
add-sqr-sqrt2.0%
clear-num2.0%
tan-quot2.0%
div-inv2.0%
frac-2neg2.0%
neg-sub02.0%
div-sub2.0%
add-sqr-sqrt1.1%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-unprod21.2%
add-sqr-sqrt66.9%
frac-2neg66.9%
Applied egg-rr66.9%
div066.9%
neg-sub066.9%
distribute-frac-neg266.9%
Simplified66.9%
if -1.24999999999999998e149 < F < -4.1000000000000001e83Initial program 82.9%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 71.5%
mul-1-neg71.5%
distribute-neg-frac271.5%
Simplified71.5%
if 2.85000000000000003e-61 < F < 4.4000000000000001e76 or 6.20000000000000014e100 < F < 2.2999999999999998e212 or 3.90000000000000029e280 < F Initial program 73.0%
Simplified80.4%
Taylor expanded in x around 0 80.5%
associate-*l/80.5%
*-lft-identity80.5%
+-commutative80.5%
unpow280.5%
fma-undefine80.5%
Simplified80.5%
clear-num80.4%
un-div-inv80.5%
inv-pow80.5%
sqrt-pow180.4%
metadata-eval80.4%
Applied egg-rr80.4%
Taylor expanded in B around 0 66.5%
+-commutative66.5%
unpow266.5%
fma-undefine66.5%
Simplified66.5%
Taylor expanded in F around inf 75.9%
if 4.4000000000000001e76 < F < 6.20000000000000014e100 or 2.2999999999999998e212 < F < 3.90000000000000029e280Initial program 40.0%
Taylor expanded in F around -inf 24.0%
add-cube-cbrt23.9%
pow324.0%
Applied egg-rr75.7%
Taylor expanded in x around 0 76.8%
Taylor expanded in B around inf 77.9%
Final simplification70.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ 1.0 B) t_0)) (t_2 (/ 1.0 (sin B))))
(if (<= F -2.2e-7)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 2.45e-145)
(/ x (- (tan B)))
(if (<= F 4.4e+57)
t_1
(if (<= F 8.8e+101)
t_2
(if (<= F 2.35e+212)
t_1
(if (<= F 3.5e+280) t_2 (- (/ F (* F B)) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (1.0 / B) - t_0;
double t_2 = 1.0 / sin(B);
double tmp;
if (F <= -2.2e-7) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 2.45e-145) {
tmp = x / -tan(B);
} else if (F <= 4.4e+57) {
tmp = t_1;
} else if (F <= 8.8e+101) {
tmp = t_2;
} else if (F <= 2.35e+212) {
tmp = t_1;
} else if (F <= 3.5e+280) {
tmp = t_2;
} else {
tmp = (F / (F * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (1.0d0 / b) - t_0
t_2 = 1.0d0 / sin(b)
if (f <= (-2.2d-7)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 2.45d-145) then
tmp = x / -tan(b)
else if (f <= 4.4d+57) then
tmp = t_1
else if (f <= 8.8d+101) then
tmp = t_2
else if (f <= 2.35d+212) then
tmp = t_1
else if (f <= 3.5d+280) then
tmp = t_2
else
tmp = (f / (f * 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 t_1 = (1.0 / B) - t_0;
double t_2 = 1.0 / Math.sin(B);
double tmp;
if (F <= -2.2e-7) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 2.45e-145) {
tmp = x / -Math.tan(B);
} else if (F <= 4.4e+57) {
tmp = t_1;
} else if (F <= 8.8e+101) {
tmp = t_2;
} else if (F <= 2.35e+212) {
tmp = t_1;
} else if (F <= 3.5e+280) {
tmp = t_2;
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (1.0 / B) - t_0 t_2 = 1.0 / math.sin(B) tmp = 0 if F <= -2.2e-7: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 2.45e-145: tmp = x / -math.tan(B) elif F <= 4.4e+57: tmp = t_1 elif F <= 8.8e+101: tmp = t_2 elif F <= 2.35e+212: tmp = t_1 elif F <= 3.5e+280: tmp = t_2 else: tmp = (F / (F * B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(1.0 / B) - t_0) t_2 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -2.2e-7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 2.45e-145) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 4.4e+57) tmp = t_1; elseif (F <= 8.8e+101) tmp = t_2; elseif (F <= 2.35e+212) tmp = t_1; elseif (F <= 3.5e+280) tmp = t_2; else tmp = Float64(Float64(F / Float64(F * B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (1.0 / B) - t_0; t_2 = 1.0 / sin(B); tmp = 0.0; if (F <= -2.2e-7) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 2.45e-145) tmp = x / -tan(B); elseif (F <= 4.4e+57) tmp = t_1; elseif (F <= 8.8e+101) tmp = t_2; elseif (F <= 2.35e+212) tmp = t_1; elseif (F <= 3.5e+280) tmp = t_2; else tmp = (F / (F * B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.2e-7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e-145], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 4.4e+57], t$95$1, If[LessEqual[F, 8.8e+101], t$95$2, If[LessEqual[F, 2.35e+212], t$95$1, If[LessEqual[F, 3.5e+280], t$95$2, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{1}{B} - t\_0\\
t_2 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{-145}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{+101}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -2.2000000000000001e-7Initial program 69.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 83.7%
if -2.2000000000000001e-7 < F < 2.44999999999999984e-145Initial program 99.4%
Taylor expanded in F around -inf 38.8%
Taylor expanded in x around inf 74.6%
mul-1-neg74.6%
associate-/l*74.4%
distribute-lft-neg-in74.4%
Simplified74.4%
add-sqr-sqrt16.6%
sqrt-unprod14.6%
sqr-neg14.6%
sqrt-unprod1.3%
add-sqr-sqrt2.0%
clear-num2.0%
tan-quot2.0%
div-inv2.0%
frac-2neg2.0%
neg-sub02.0%
div-sub2.0%
add-sqr-sqrt1.3%
sqrt-unprod14.6%
sqr-neg14.6%
sqrt-unprod16.7%
add-sqr-sqrt74.7%
frac-2neg74.7%
Applied egg-rr74.7%
div074.7%
neg-sub074.7%
distribute-frac-neg274.7%
Simplified74.7%
if 2.44999999999999984e-145 < F < 4.4000000000000001e57 or 8.8000000000000003e101 < F < 2.34999999999999996e212Initial program 86.0%
Simplified89.3%
Taylor expanded in x around 0 89.4%
associate-*l/89.4%
*-lft-identity89.4%
+-commutative89.4%
unpow289.4%
fma-undefine89.4%
Simplified89.4%
clear-num89.3%
un-div-inv89.4%
inv-pow89.4%
sqrt-pow189.4%
metadata-eval89.4%
Applied egg-rr89.4%
Taylor expanded in B around 0 72.3%
+-commutative72.3%
unpow272.3%
fma-undefine72.3%
Simplified72.3%
Taylor expanded in F around inf 70.6%
if 4.4000000000000001e57 < F < 8.8000000000000003e101 or 2.34999999999999996e212 < F < 3.5000000000000001e280Initial program 51.1%
Taylor expanded in F around -inf 25.9%
add-cube-cbrt25.6%
pow325.7%
Applied egg-rr73.8%
Taylor expanded in x around 0 74.9%
Taylor expanded in B around inf 76.0%
if 3.5000000000000001e280 < F Initial program 36.9%
Simplified56.4%
Taylor expanded in x around 0 56.4%
associate-*l/56.4%
*-lft-identity56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
clear-num56.4%
un-div-inv56.4%
inv-pow56.4%
sqrt-pow156.4%
metadata-eval56.4%
Applied egg-rr56.4%
Taylor expanded in B around 0 56.4%
+-commutative56.4%
unpow256.4%
fma-undefine56.4%
Simplified56.4%
Taylor expanded in F around inf 82.5%
*-commutative82.5%
Simplified82.5%
Final simplification76.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -2.2e-7)
t_0
(if (<= F 2.3e-222)
(/ (- x) B)
(if (or (<= F 5.3e+129) (not (<= F 6.2e+155))) (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -2.2e-7) {
tmp = t_0;
} else if (F <= 2.3e-222) {
tmp = -x / B;
} else if ((F <= 5.3e+129) || !(F <= 6.2e+155)) {
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) - x) / b
if (f <= (-2.2d-7)) then
tmp = t_0
else if (f <= 2.3d-222) then
tmp = -x / b
else if ((f <= 5.3d+129) .or. (.not. (f <= 6.2d+155))) 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 - x) / B;
double tmp;
if (F <= -2.2e-7) {
tmp = t_0;
} else if (F <= 2.3e-222) {
tmp = -x / B;
} else if ((F <= 5.3e+129) || !(F <= 6.2e+155)) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -2.2e-7: tmp = t_0 elif F <= 2.3e-222: tmp = -x / B elif (F <= 5.3e+129) or not (F <= 6.2e+155): tmp = 1.0 / math.sin(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -2.2e-7) tmp = t_0; elseif (F <= 2.3e-222) tmp = Float64(Float64(-x) / B); elseif ((F <= 5.3e+129) || !(F <= 6.2e+155)) 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 - x) / B; tmp = 0.0; if (F <= -2.2e-7) tmp = t_0; elseif (F <= 2.3e-222) tmp = -x / B; elseif ((F <= 5.3e+129) || ~((F <= 6.2e+155))) 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 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -2.2e-7], t$95$0, If[LessEqual[F, 2.3e-222], N[((-x) / B), $MachinePrecision], If[Or[LessEqual[F, 5.3e+129], N[Not[LessEqual[F, 6.2e+155]], $MachinePrecision]], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -2.2 \cdot 10^{-7}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-222}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{+129} \lor \neg \left(F \leq 6.2 \cdot 10^{+155}\right):\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -2.2000000000000001e-7 or 5.2999999999999999e129 < F < 6.19999999999999978e155Initial program 72.3%
Taylor expanded in F around -inf 99.2%
Taylor expanded in B around 0 54.8%
mul-1-neg54.8%
distribute-neg-frac254.8%
Simplified54.8%
if -2.2000000000000001e-7 < F < 2.3000000000000001e-222Initial program 99.5%
Taylor expanded in F around -inf 41.1%
Taylor expanded in B around 0 23.6%
mul-1-neg23.6%
distribute-neg-frac223.6%
Simplified23.6%
Taylor expanded in x around inf 43.6%
associate-*r/43.6%
mul-1-neg43.6%
Simplified43.6%
if 2.3000000000000001e-222 < F < 5.2999999999999999e129 or 6.19999999999999978e155 < F Initial program 70.8%
Taylor expanded in F around -inf 30.4%
add-cube-cbrt30.0%
pow330.0%
Applied egg-rr43.0%
Taylor expanded in x around 0 44.1%
Taylor expanded in B around inf 44.8%
Final simplification47.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= B 9.5e-102)
t_0
(if (<= B 9.6e-52) (/ (- x) B) (if (<= B 3e-12) t_0 (/ x (- (tan B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (B <= 9.5e-102) {
tmp = t_0;
} else if (B <= 9.6e-52) {
tmp = -x / B;
} else if (B <= 3e-12) {
tmp = t_0;
} else {
tmp = 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) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) - x) / b
if (b <= 9.5d-102) then
tmp = t_0
else if (b <= 9.6d-52) then
tmp = -x / b
else if (b <= 3d-12) then
tmp = t_0
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (B <= 9.5e-102) {
tmp = t_0;
} else if (B <= 9.6e-52) {
tmp = -x / B;
} else if (B <= 3e-12) {
tmp = t_0;
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if B <= 9.5e-102: tmp = t_0 elif B <= 9.6e-52: tmp = -x / B elif B <= 3e-12: tmp = t_0 else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (B <= 9.5e-102) tmp = t_0; elseif (B <= 9.6e-52) tmp = Float64(Float64(-x) / B); elseif (B <= 3e-12) tmp = t_0; else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (B <= 9.5e-102) tmp = t_0; elseif (B <= 9.6e-52) tmp = -x / B; elseif (B <= 3e-12) tmp = t_0; else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[B, 9.5e-102], t$95$0, If[LessEqual[B, 9.6e-52], N[((-x) / B), $MachinePrecision], If[LessEqual[B, 3e-12], t$95$0, N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;B \leq 9.5 \cdot 10^{-102}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;B \leq 9.6 \cdot 10^{-52}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;B \leq 3 \cdot 10^{-12}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if B < 9.50000000000000025e-102 or 9.6000000000000007e-52 < B < 3.0000000000000001e-12Initial program 76.1%
Taylor expanded in F around -inf 54.6%
Taylor expanded in B around 0 35.7%
mul-1-neg35.7%
distribute-neg-frac235.7%
Simplified35.7%
if 9.50000000000000025e-102 < B < 9.6000000000000007e-52Initial program 83.1%
Taylor expanded in F around -inf 48.4%
Taylor expanded in B around 0 48.5%
mul-1-neg48.5%
distribute-neg-frac248.5%
Simplified48.5%
Taylor expanded in x around inf 65.3%
associate-*r/65.3%
mul-1-neg65.3%
Simplified65.3%
if 3.0000000000000001e-12 < B Initial program 87.5%
Taylor expanded in F around -inf 55.9%
Taylor expanded in x around inf 60.6%
mul-1-neg60.6%
associate-/l*60.7%
distribute-lft-neg-in60.7%
Simplified60.7%
add-sqr-sqrt28.3%
sqrt-unprod20.7%
sqr-neg20.7%
sqrt-unprod1.0%
add-sqr-sqrt2.2%
clear-num2.2%
tan-quot2.2%
div-inv2.2%
frac-2neg2.2%
neg-sub02.2%
div-sub2.2%
add-sqr-sqrt1.0%
sqrt-unprod20.7%
sqr-neg20.7%
sqrt-unprod28.4%
add-sqr-sqrt60.8%
frac-2neg60.8%
Applied egg-rr60.8%
div060.8%
neg-sub060.8%
distribute-frac-neg260.8%
Simplified60.8%
Final simplification43.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3e+56)
(/ (- -1.0 x) B)
(if (or (<= F 9.5e-79) (and (not (<= F 4.5e+121)) (<= F 4.6e+152)))
(/ (- x) B)
(/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e+56) {
tmp = (-1.0 - x) / B;
} else if ((F <= 9.5e-79) || (!(F <= 4.5e+121) && (F <= 4.6e+152))) {
tmp = -x / B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3d+56)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 9.5d-79) .or. (.not. (f <= 4.5d+121)) .and. (f <= 4.6d+152)) then
tmp = -x / b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3e+56) {
tmp = (-1.0 - x) / B;
} else if ((F <= 9.5e-79) || (!(F <= 4.5e+121) && (F <= 4.6e+152))) {
tmp = -x / B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e+56: tmp = (-1.0 - x) / B elif (F <= 9.5e-79) or (not (F <= 4.5e+121) and (F <= 4.6e+152)): tmp = -x / B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e+56) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 9.5e-79) || (!(F <= 4.5e+121) && (F <= 4.6e+152))) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e+56) tmp = (-1.0 - x) / B; elseif ((F <= 9.5e-79) || (~((F <= 4.5e+121)) && (F <= 4.6e+152))) tmp = -x / B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e+56], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 9.5e-79], And[N[Not[LessEqual[F, 4.5e+121]], $MachinePrecision], LessEqual[F, 4.6e+152]]], N[((-x) / B), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-79} \lor \neg \left(F \leq 4.5 \cdot 10^{+121}\right) \land F \leq 4.6 \cdot 10^{+152}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -3.00000000000000006e56Initial program 64.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 50.2%
mul-1-neg50.2%
distribute-neg-frac250.2%
Simplified50.2%
if -3.00000000000000006e56 < F < 9.4999999999999997e-79 or 4.5000000000000003e121 < F < 4.5999999999999997e152Initial program 98.7%
Taylor expanded in F around -inf 44.4%
Taylor expanded in B around 0 27.8%
mul-1-neg27.8%
distribute-neg-frac227.8%
Simplified27.8%
Taylor expanded in x around inf 39.7%
associate-*r/39.7%
mul-1-neg39.7%
Simplified39.7%
if 9.4999999999999997e-79 < F < 4.5000000000000003e121 or 4.5999999999999997e152 < F Initial program 61.6%
Taylor expanded in F around -inf 33.9%
add-cube-cbrt33.4%
pow333.4%
Applied egg-rr54.7%
Taylor expanded in B around 0 28.0%
Final simplification38.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e+235) (/ -1.0 B) (if (<= F 1.05e-78) (/ (- x) B) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+235) {
tmp = -1.0 / B;
} else if (F <= 1.05e-78) {
tmp = -x / B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.3d+235)) then
tmp = (-1.0d0) / b
else if (f <= 1.05d-78) then
tmp = -x / b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e+235) {
tmp = -1.0 / B;
} else if (F <= 1.05e-78) {
tmp = -x / B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e+235: tmp = -1.0 / B elif F <= 1.05e-78: tmp = -x / B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e+235) tmp = Float64(-1.0 / B); elseif (F <= 1.05e-78) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e+235) tmp = -1.0 / B; elseif (F <= 1.05e-78) tmp = -x / B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e+235], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.05e-78], N[((-x) / B), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{+235}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-78}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.2999999999999999e235Initial program 32.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 54.8%
mul-1-neg54.8%
distribute-neg-frac254.8%
Simplified54.8%
Taylor expanded in x around 0 39.8%
if -1.2999999999999999e235 < F < 1.05e-78Initial program 93.7%
Taylor expanded in F around -inf 58.4%
Taylor expanded in B around 0 32.3%
mul-1-neg32.3%
distribute-neg-frac232.3%
Simplified32.3%
Taylor expanded in x around inf 33.9%
associate-*r/33.9%
mul-1-neg33.9%
Simplified33.9%
if 1.05e-78 < F Initial program 64.1%
Taylor expanded in F around -inf 37.7%
add-cube-cbrt37.2%
pow337.3%
Applied egg-rr51.9%
Taylor expanded in B around 0 27.8%
Final simplification32.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.16e+235) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.16e+235) {
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 <= (-1.16d+235)) 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 <= -1.16e+235) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.16e+235: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.16e+235) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.16e+235) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.16e+235], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.16 \cdot 10^{+235}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.15999999999999994e235Initial program 32.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 54.8%
mul-1-neg54.8%
distribute-neg-frac254.8%
Simplified54.8%
Taylor expanded in x around 0 39.8%
if -1.15999999999999994e235 < F Initial program 83.1%
Taylor expanded in F around -inf 51.0%
Taylor expanded in B around 0 26.6%
mul-1-neg26.6%
distribute-neg-frac226.6%
Simplified26.6%
Taylor expanded in x around inf 27.9%
associate-*r/27.9%
mul-1-neg27.9%
Simplified27.9%
(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 79.3%
Taylor expanded in F around -inf 54.6%
Taylor expanded in B around 0 28.7%
mul-1-neg28.7%
distribute-neg-frac228.7%
Simplified28.7%
Taylor expanded in x around 0 11.2%
herbie shell --seed 2024103
(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))))))