
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -20000000000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.4e+24)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -20000000000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.4e+24) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -20000000000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.4e+24) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -20000000000000.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, 1.4e+24], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $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 -20000000000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{+24}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2e13Initial program 68.7%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.8%
Applied egg-rr99.8%
if -2e13 < F < 1.4000000000000001e24Initial 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%
if 1.4000000000000001e24 < F Initial program 58.4%
Simplified66.7%
Taylor expanded in x around 0 66.8%
associate-*l/66.8%
*-lft-identity66.8%
+-commutative66.8%
unpow266.8%
fma-undefine66.8%
Simplified66.8%
Taylor expanded in F around inf 99.9%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+61)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 120000000.0)
(- (/ 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 <= -5e+61) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 120000000.0) {
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 <= -5e+61) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 120000000.0) 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, -5e+61], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 120000000.0], 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 -5 \cdot 10^{+61}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\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 < -5.00000000000000018e61Initial program 64.8%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.8%
Applied egg-rr99.8%
if -5.00000000000000018e61 < F < 1.2e8Initial 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%
clear-num99.6%
un-div-inv99.6%
inv-pow99.6%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 1.2e8 < F Initial program 59.5%
Simplified67.6%
Taylor expanded in x around 0 67.7%
associate-*l/67.7%
*-lft-identity67.7%
+-commutative67.7%
unpow267.7%
fma-undefine67.7%
Simplified67.7%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+56)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 120000000.0)
(- (/ 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 <= -4e+56) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 120000000.0) {
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 <= -4e+56) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 120000000.0) 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, -4e+56], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 120000000.0], 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 -4 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\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 < -4.00000000000000037e56Initial program 64.8%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.8%
Applied egg-rr99.8%
if -4.00000000000000037e56 < F < 1.2e8Initial 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%
associate-*r/99.5%
clear-num99.5%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r/99.6%
times-frac99.6%
*-lft-identity99.6%
Simplified99.6%
if 1.2e8 < F Initial program 59.5%
Simplified67.6%
Taylor expanded in x around 0 67.7%
associate-*l/67.7%
*-lft-identity67.7%
+-commutative67.7%
unpow267.7%
fma-undefine67.7%
Simplified67.7%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ -1.0 (/ (tan B) x))))
(if (<= F -105000000.0)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 85000000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = -1.0 / (tan(B) / x);
double tmp;
if (F <= -105000000.0) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 85000000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (-1.0d0) / (tan(b) / x)
if (f <= (-105000000.0d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 85000000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -1.0 / (Math.tan(B) / x);
double tmp;
if (F <= -105000000.0) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 85000000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = -1.0 / (math.tan(B) / x) tmp = 0 if F <= -105000000.0: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 85000000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(-1.0 / Float64(tan(B) / x)) tmp = 0.0 if (F <= -105000000.0) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 85000000.0) tmp = Float64(t_0 + 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)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -1.0 / (tan(B) / x); tmp = 0.0; if (F <= -105000000.0) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 85000000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -105000000.0], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 85000000.0], N[(t$95$0 + 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] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{if}\;F \leq -105000000:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 85000000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.05e8Initial program 69.2%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.8%
Applied egg-rr99.8%
if -1.05e8 < F < 8.5e7Initial program 99.4%
div-inv34.7%
clear-num34.7%
Applied egg-rr99.4%
if 8.5e7 < F Initial program 59.5%
Simplified67.6%
Taylor expanded in x around 0 67.7%
associate-*l/67.7%
*-lft-identity67.7%
+-commutative67.7%
unpow267.7%
fma-undefine67.7%
Simplified67.7%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -2.1e-7)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 38000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-7) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 38000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.1d-7)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 38000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-7) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 38000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-7: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 38000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-7) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 38000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-7) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 38000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-7], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 38000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 38000000:\\
\;\;\;\;\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} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.1e-7Initial program 70.0%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -2.1e-7 < F < 3.8e7Initial program 99.4%
if 3.8e7 < F Initial program 59.5%
Simplified67.6%
Taylor expanded in x around 0 67.7%
associate-*l/67.7%
*-lft-identity67.7%
+-commutative67.7%
unpow267.7%
fma-undefine67.7%
Simplified67.7%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.35)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.42)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.35) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.42) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.35d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.42d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.35) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.35: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.42: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.35) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.35) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.42) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.35:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3500000000000001Initial program 69.2%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.8%
Applied egg-rr99.8%
if -1.3500000000000001 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
if 1.4199999999999999 < F Initial program 60.0%
Simplified68.0%
Taylor expanded in x around 0 68.1%
associate-*l/68.1%
*-lft-identity68.1%
+-commutative68.1%
unpow268.1%
fma-undefine68.1%
Simplified68.1%
Taylor expanded in F around inf 98.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.05e-21)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.3e-46)
(- (* 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 <= -1.05e-21) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.3e-46) {
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 <= (-1.05d-21)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.3d-46) 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 <= -1.05e-21) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.3e-46) {
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 <= -1.05e-21: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.3e-46: 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 <= -1.05e-21) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.3e-46) 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 <= -1.05e-21) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.3e-46) 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, -1.05e-21], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-46], 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 -1.05 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-46}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.05000000000000006e-21Initial program 71.8%
Taylor expanded in F around -inf 97.4%
div-inv97.6%
clear-num97.5%
Applied egg-rr97.5%
if -1.05000000000000006e-21 < F < 1.3000000000000001e-46Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.7%
Taylor expanded in x around 0 88.6%
associate-/l*88.7%
Simplified88.7%
if 1.3000000000000001e-46 < F Initial program 61.5%
Simplified69.2%
Taylor expanded in x around 0 69.2%
associate-*l/69.3%
*-lft-identity69.3%
+-commutative69.3%
unpow269.3%
fma-undefine69.3%
Simplified69.3%
Taylor expanded in F around inf 95.4%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.05e-21)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 1.3e-46)
(- (* 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 <= -1.05e-21) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 1.3e-46) {
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 <= (-1.05d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 1.3d-46) 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 <= -1.05e-21) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.3e-46) {
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 <= -1.05e-21: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 1.3e-46: 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 <= -1.05e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.3e-46) 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 <= -1.05e-21) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 1.3e-46) 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, -1.05e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-46], 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 -1.05 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-46}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.05000000000000006e-21Initial program 71.8%
Taylor expanded in F around -inf 97.4%
if -1.05000000000000006e-21 < F < 1.3000000000000001e-46Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 88.7%
Taylor expanded in x around 0 88.6%
associate-/l*88.7%
Simplified88.7%
if 1.3000000000000001e-46 < F Initial program 61.5%
Simplified69.2%
Taylor expanded in x around 0 69.2%
associate-*l/69.3%
*-lft-identity69.3%
+-commutative69.3%
unpow269.3%
fma-undefine69.3%
Simplified69.3%
Taylor expanded in F around inf 95.4%
Final simplification93.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 1.3e-46)
(- (* 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 <= -1.5) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 1.3e-46) {
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 <= (-1.5d0)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 1.3d-46) 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 <= -1.5) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.3e-46) {
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 <= -1.5: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 1.3e-46: 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 <= -1.5) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.3e-46) 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 <= -1.5) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 1.3e-46) 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, -1.5], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-46], 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 -1.5:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-46}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.5Initial program 69.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 83.7%
if -1.5 < F < 1.3000000000000001e-46Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 87.6%
Taylor expanded in x around 0 87.5%
associate-/l*87.6%
Simplified87.6%
if 1.3000000000000001e-46 < F Initial program 61.5%
Simplified69.2%
Taylor expanded in x around 0 69.2%
associate-*l/69.3%
*-lft-identity69.3%
+-commutative69.3%
unpow269.3%
fma-undefine69.3%
Simplified69.3%
Taylor expanded in F around inf 95.4%
Final simplification88.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e-77)
(- (/ F (* F (- B))) t_0)
(if (<= F 8e-50) (/ (- x) (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.9e-77) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 8e-50) {
tmp = -x / 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.9d-77)) then
tmp = (f / (f * -b)) - t_0
else if (f <= 8d-50) then
tmp = -x / 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.9e-77) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 8e-50) {
tmp = -x / 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.9e-77: tmp = (F / (F * -B)) - t_0 elif F <= 8e-50: tmp = -x / 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.9e-77) tmp = Float64(Float64(F / Float64(F * Float64(-B))) - t_0); elseif (F <= 8e-50) tmp = Float64(Float64(-x) / 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.9e-77) tmp = (F / (F * -B)) - t_0; elseif (F <= 8e-50) tmp = -x / 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.9e-77], N[(N[(F / N[(F * (-B)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-50], N[((-x) / N[Tan[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 -1.9 \cdot 10^{-77}:\\
\;\;\;\;\frac{F}{F \cdot \left(-B\right)} - t\_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.8999999999999999e-77Initial program 75.0%
Simplified82.3%
Taylor expanded in x around 0 82.3%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
clear-num82.3%
un-div-inv82.3%
inv-pow82.3%
sqrt-pow182.3%
metadata-eval82.3%
Applied egg-rr82.3%
Taylor expanded in B around 0 72.4%
+-commutative72.4%
unpow272.4%
fma-undefine72.4%
Simplified72.4%
Taylor expanded in F around -inf 80.3%
associate-*r*80.3%
neg-mul-180.3%
Simplified80.3%
if -1.8999999999999999e-77 < F < 8.00000000000000006e-50Initial program 99.4%
Taylor expanded in F around -inf 29.9%
Taylor expanded in x around inf 71.6%
mul-1-neg71.6%
associate-/l*71.6%
distribute-lft-neg-in71.6%
Simplified71.6%
add-sqr-sqrt20.6%
sqrt-unprod18.6%
sqr-neg18.6%
sqrt-unprod1.3%
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.3%
sqrt-unprod18.6%
sqr-neg18.6%
sqrt-unprod20.7%
add-sqr-sqrt71.7%
frac-2neg71.7%
Applied egg-rr71.7%
div071.7%
neg-sub071.7%
distribute-frac-neg271.7%
Simplified71.7%
if 8.00000000000000006e-50 < F Initial program 61.5%
Simplified69.2%
Taylor expanded in x around 0 69.2%
associate-*l/69.3%
*-lft-identity69.3%
+-commutative69.3%
unpow269.3%
fma-undefine69.3%
Simplified69.3%
Taylor expanded in F around inf 95.4%
Final simplification82.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -3.9e+119)
t_0
(if (<= F -1350.0)
(/ (- -1.0 x) B)
(if (<= F 1.33e-46)
t_0
(if (or (<= F 5.5e+219) (not (<= F 5.8e+287)))
(- (/ 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 <= -3.9e+119) {
tmp = t_0;
} else if (F <= -1350.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.33e-46) {
tmp = t_0;
} else if ((F <= 5.5e+219) || !(F <= 5.8e+287)) {
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 <= (-3.9d+119)) then
tmp = t_0
else if (f <= (-1350.0d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.33d-46) then
tmp = t_0
else if ((f <= 5.5d+219) .or. (.not. (f <= 5.8d+287))) 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 <= -3.9e+119) {
tmp = t_0;
} else if (F <= -1350.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.33e-46) {
tmp = t_0;
} else if ((F <= 5.5e+219) || !(F <= 5.8e+287)) {
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 <= -3.9e+119: tmp = t_0 elif F <= -1350.0: tmp = (-1.0 - x) / B elif F <= 1.33e-46: tmp = t_0 elif (F <= 5.5e+219) or not (F <= 5.8e+287): 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(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -3.9e+119) tmp = t_0; elseif (F <= -1350.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.33e-46) tmp = t_0; elseif ((F <= 5.5e+219) || !(F <= 5.8e+287)) 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 <= -3.9e+119) tmp = t_0; elseif (F <= -1350.0) tmp = (-1.0 - x) / B; elseif (F <= 1.33e-46) tmp = t_0; elseif ((F <= 5.5e+219) || ~((F <= 5.8e+287))) 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, -3.9e+119], t$95$0, If[LessEqual[F, -1350.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.33e-46], t$95$0, If[Or[LessEqual[F, 5.5e+219], N[Not[LessEqual[F, 5.8e+287]], $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 -3.9 \cdot 10^{+119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1350:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{+219} \lor \neg \left(F \leq 5.8 \cdot 10^{+287}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -3.8999999999999998e119 or -1350 < F < 1.33000000000000008e-46Initial program 85.9%
Taylor expanded in F around -inf 54.5%
Taylor expanded in x around inf 66.8%
mul-1-neg66.8%
associate-/l*66.8%
distribute-lft-neg-in66.8%
Simplified66.8%
add-sqr-sqrt23.5%
sqrt-unprod19.0%
sqr-neg19.0%
sqrt-unprod1.0%
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.0%
sqrt-unprod19.1%
sqr-neg19.1%
sqrt-unprod23.5%
add-sqr-sqrt66.9%
frac-2neg66.9%
Applied egg-rr66.9%
div066.9%
neg-sub066.9%
distribute-frac-neg266.9%
Simplified66.9%
if -3.8999999999999998e119 < F < -1350Initial program 96.0%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 66.5%
mul-1-neg66.5%
distribute-neg-frac266.5%
Simplified66.5%
if 1.33000000000000008e-46 < F < 5.49999999999999973e219 or 5.80000000000000023e287 < F Initial program 75.2%
Simplified82.0%
Taylor expanded in x around 0 82.1%
associate-*l/82.1%
*-lft-identity82.1%
+-commutative82.1%
unpow282.1%
fma-undefine82.1%
Simplified82.1%
clear-num82.0%
un-div-inv82.1%
inv-pow82.1%
sqrt-pow182.0%
metadata-eval82.0%
Applied egg-rr82.0%
Taylor expanded in B around 0 62.9%
+-commutative62.9%
unpow262.9%
fma-undefine62.9%
Simplified62.9%
Taylor expanded in F around inf 74.6%
if 5.49999999999999973e219 < F < 5.80000000000000023e287Initial program 13.5%
Taylor expanded in F around -inf 23.2%
add-cube-cbrt23.0%
pow323.0%
Applied egg-rr76.5%
Taylor expanded in x around 0 77.8%
Taylor expanded in B around inf 78.9%
Final simplification69.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.25e-77)
(- (/ F (* F (- B))) t_0)
(if (<= F 3.5e-48)
(/ (- x) (tan B))
(if (or (<= F 7.8e+219) (not (<= F 2.65e+289)))
(- (/ 1.0 B) t_0)
(/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.25e-77) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 3.5e-48) {
tmp = -x / tan(B);
} else if ((F <= 7.8e+219) || !(F <= 2.65e+289)) {
tmp = (1.0 / B) - t_0;
} 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-77)) then
tmp = (f / (f * -b)) - t_0
else if (f <= 3.5d-48) then
tmp = -x / tan(b)
else if ((f <= 7.8d+219) .or. (.not. (f <= 2.65d+289))) then
tmp = (1.0d0 / b) - t_0
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-77) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 3.5e-48) {
tmp = -x / Math.tan(B);
} else if ((F <= 7.8e+219) || !(F <= 2.65e+289)) {
tmp = (1.0 / B) - t_0;
} 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-77: tmp = (F / (F * -B)) - t_0 elif F <= 3.5e-48: tmp = -x / math.tan(B) elif (F <= 7.8e+219) or not (F <= 2.65e+289): tmp = (1.0 / B) - t_0 else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.25e-77) tmp = Float64(Float64(F / Float64(F * Float64(-B))) - t_0); elseif (F <= 3.5e-48) tmp = Float64(Float64(-x) / tan(B)); elseif ((F <= 7.8e+219) || !(F <= 2.65e+289)) tmp = Float64(Float64(1.0 / B) - t_0); 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-77) tmp = (F / (F * -B)) - t_0; elseif (F <= 3.5e-48) tmp = -x / tan(B); elseif ((F <= 7.8e+219) || ~((F <= 2.65e+289))) tmp = (1.0 / B) - t_0; 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-77], N[(N[(F / N[(F * (-B)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.5e-48], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 7.8e+219], N[Not[LessEqual[F, 2.65e+289]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $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^{-77}:\\
\;\;\;\;\frac{F}{F \cdot \left(-B\right)} - t\_0\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-48}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{+219} \lor \neg \left(F \leq 2.65 \cdot 10^{+289}\right):\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.24999999999999991e-77Initial program 75.0%
Simplified82.3%
Taylor expanded in x around 0 82.3%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
clear-num82.3%
un-div-inv82.3%
inv-pow82.3%
sqrt-pow182.3%
metadata-eval82.3%
Applied egg-rr82.3%
Taylor expanded in B around 0 72.4%
+-commutative72.4%
unpow272.4%
fma-undefine72.4%
Simplified72.4%
Taylor expanded in F around -inf 80.3%
associate-*r*80.3%
neg-mul-180.3%
Simplified80.3%
if -1.24999999999999991e-77 < F < 3.49999999999999991e-48Initial program 99.4%
Taylor expanded in F around -inf 29.9%
Taylor expanded in x around inf 71.6%
mul-1-neg71.6%
associate-/l*71.6%
distribute-lft-neg-in71.6%
Simplified71.6%
add-sqr-sqrt20.6%
sqrt-unprod18.6%
sqr-neg18.6%
sqrt-unprod1.3%
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.3%
sqrt-unprod18.6%
sqr-neg18.6%
sqrt-unprod20.7%
add-sqr-sqrt71.7%
frac-2neg71.7%
Applied egg-rr71.7%
div071.7%
neg-sub071.7%
distribute-frac-neg271.7%
Simplified71.7%
if 3.49999999999999991e-48 < F < 7.7999999999999998e219 or 2.65e289 < F Initial program 75.6%
Simplified82.2%
Taylor expanded in x around 0 82.3%
associate-*l/82.4%
*-lft-identity82.4%
+-commutative82.4%
unpow282.4%
fma-undefine82.4%
Simplified82.4%
clear-num82.3%
un-div-inv82.4%
inv-pow82.4%
sqrt-pow182.3%
metadata-eval82.3%
Applied egg-rr82.3%
Taylor expanded in B around 0 62.0%
+-commutative62.0%
unpow262.0%
fma-undefine62.0%
Simplified62.0%
Taylor expanded in F around inf 73.5%
if 7.7999999999999998e219 < F < 2.65e289Initial program 13.5%
Taylor expanded in F around -inf 23.2%
add-cube-cbrt23.0%
pow323.0%
Applied egg-rr76.5%
Taylor expanded in x around 0 77.8%
Taylor expanded in B around inf 78.9%
Final simplification75.6%
(FPCore (F B x)
:precision binary64
(if (<= F -8e-52)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 1.33e-46)
(/ (- x) (tan B))
(if (or (<= F 3e+219) (not (<= F 2.8e+282)))
(- (/ 1.0 B) (/ x (tan B)))
(/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8e-52) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 1.33e-46) {
tmp = -x / tan(B);
} else if ((F <= 3e+219) || !(F <= 2.8e+282)) {
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) :: tmp
if (f <= (-8d-52)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 1.33d-46) then
tmp = -x / tan(b)
else if ((f <= 3d+219) .or. (.not. (f <= 2.8d+282))) 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 tmp;
if (F <= -8e-52) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.33e-46) {
tmp = -x / Math.tan(B);
} else if ((F <= 3e+219) || !(F <= 2.8e+282)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8e-52: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 1.33e-46: tmp = -x / math.tan(B) elif (F <= 3e+219) or not (F <= 2.8e+282): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8e-52) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.33e-46) tmp = Float64(Float64(-x) / tan(B)); elseif ((F <= 3e+219) || !(F <= 2.8e+282)) 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) tmp = 0.0; if (F <= -8e-52) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 1.33e-46) tmp = -x / tan(B); elseif ((F <= 3e+219) || ~((F <= 2.8e+282))) tmp = (1.0 / B) - (x / tan(B)); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8e-52], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3e+219], N[Not[LessEqual[F, 2.8e+282]], $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}
\mathbf{if}\;F \leq -8 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{+219} \lor \neg \left(F \leq 2.8 \cdot 10^{+282}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -8.0000000000000001e-52Initial program 73.2%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 81.2%
if -8.0000000000000001e-52 < F < 1.33000000000000008e-46Initial program 99.4%
Taylor expanded in F around -inf 32.0%
Taylor expanded in x around inf 70.7%
mul-1-neg70.7%
associate-/l*70.7%
distribute-lft-neg-in70.7%
Simplified70.7%
add-sqr-sqrt19.2%
sqrt-unprod17.4%
sqr-neg17.4%
sqrt-unprod1.3%
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.3%
sqrt-unprod17.4%
sqr-neg17.4%
sqrt-unprod19.3%
add-sqr-sqrt70.8%
frac-2neg70.8%
Applied egg-rr70.8%
div070.8%
neg-sub070.8%
distribute-frac-neg270.8%
Simplified70.8%
if 1.33000000000000008e-46 < F < 2.9999999999999997e219 or 2.7999999999999998e282 < F Initial program 75.2%
Simplified82.0%
Taylor expanded in x around 0 82.1%
associate-*l/82.1%
*-lft-identity82.1%
+-commutative82.1%
unpow282.1%
fma-undefine82.1%
Simplified82.1%
clear-num82.0%
un-div-inv82.1%
inv-pow82.1%
sqrt-pow182.0%
metadata-eval82.0%
Applied egg-rr82.0%
Taylor expanded in B around 0 62.9%
+-commutative62.9%
unpow262.9%
fma-undefine62.9%
Simplified62.9%
Taylor expanded in F around inf 74.6%
if 2.9999999999999997e219 < F < 2.7999999999999998e282Initial program 13.5%
Taylor expanded in F around -inf 23.2%
add-cube-cbrt23.0%
pow323.0%
Applied egg-rr76.5%
Taylor expanded in x around 0 77.8%
Taylor expanded in B around inf 78.9%
Final simplification75.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -5.8e+209)
t_1
(if (<= F -5.5e+149)
t_0
(if (<= F -3.5e-5)
t_1
(if (<= F 4.6e-52) t_0 (- (/ 1.0 B) (/ x (tan 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 <= -5.8e+209) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = t_0;
} else if (F <= -3.5e-5) {
tmp = t_1;
} else if (F <= 4.6e-52) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-5.8d+209)) then
tmp = t_1
else if (f <= (-5.5d+149)) then
tmp = t_0
else if (f <= (-3.5d-5)) then
tmp = t_1
else if (f <= 4.6d-52) then
tmp = t_0
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -5.8e+209) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = t_0;
} else if (F <= -3.5e-5) {
tmp = t_1;
} else if (F <= 4.6e-52) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / Math.tan(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 <= -5.8e+209: tmp = t_1 elif F <= -5.5e+149: tmp = t_0 elif F <= -3.5e-5: tmp = t_1 elif F <= 4.6e-52: tmp = t_0 else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -5.8e+209) tmp = t_1; elseif (F <= -5.5e+149) tmp = t_0; elseif (F <= -3.5e-5) tmp = t_1; elseif (F <= 4.6e-52) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(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 <= -5.8e+209) tmp = t_1; elseif (F <= -5.5e+149) tmp = t_0; elseif (F <= -3.5e-5) tmp = t_1; elseif (F <= 4.6e-52) tmp = t_0; else tmp = (1.0 / B) - (x / tan(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, -5.8e+209], t$95$1, If[LessEqual[F, -5.5e+149], t$95$0, If[LessEqual[F, -3.5e-5], t$95$1, If[LessEqual[F, 4.6e-52], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $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 -5.8 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-52}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.79999999999999999e209 or -5.49999999999999999e149 < F < -3.4999999999999997e-5Initial program 65.3%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.2%
if -5.79999999999999999e209 < F < -5.49999999999999999e149 or -3.4999999999999997e-5 < F < 4.59999999999999989e-52Initial program 98.6%
Taylor expanded in F around -inf 41.8%
Taylor expanded in x around inf 73.4%
mul-1-neg73.4%
associate-/l*73.3%
distribute-lft-neg-in73.3%
Simplified73.3%
add-sqr-sqrt20.7%
sqrt-unprod17.1%
sqr-neg17.1%
sqrt-unprod1.2%
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.2%
sqrt-unprod17.1%
sqr-neg17.1%
sqrt-unprod20.9%
add-sqr-sqrt73.5%
frac-2neg73.5%
Applied egg-rr73.5%
div073.5%
neg-sub073.5%
distribute-frac-neg273.5%
Simplified73.5%
if 4.59999999999999989e-52 < F Initial program 61.5%
Simplified69.2%
Taylor expanded in x around 0 69.2%
associate-*l/69.3%
*-lft-identity69.3%
+-commutative69.3%
unpow269.3%
fma-undefine69.3%
Simplified69.3%
clear-num69.2%
un-div-inv69.3%
inv-pow69.3%
sqrt-pow169.2%
metadata-eval69.2%
Applied egg-rr69.2%
Taylor expanded in B around 0 53.5%
+-commutative53.5%
unpow253.5%
fma-undefine53.5%
Simplified53.5%
Taylor expanded in F around inf 67.3%
Final simplification72.9%
(FPCore (F B x)
:precision binary64
(if (or (<= x -7.2e-64)
(not
(or (<= x 1.08e-212) (and (not (<= x 1.35e-147)) (<= x 1.3e-42)))))
(/ (- x) (tan B))
(/ 1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -7.2e-64) || !((x <= 1.08e-212) || (!(x <= 1.35e-147) && (x <= 1.3e-42)))) {
tmp = -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) :: tmp
if ((x <= (-7.2d-64)) .or. (.not. (x <= 1.08d-212) .or. (.not. (x <= 1.35d-147)) .and. (x <= 1.3d-42))) then
tmp = -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 tmp;
if ((x <= -7.2e-64) || !((x <= 1.08e-212) || (!(x <= 1.35e-147) && (x <= 1.3e-42)))) {
tmp = -x / Math.tan(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -7.2e-64) or not ((x <= 1.08e-212) or (not (x <= 1.35e-147) and (x <= 1.3e-42))): tmp = -x / math.tan(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -7.2e-64) || !((x <= 1.08e-212) || (!(x <= 1.35e-147) && (x <= 1.3e-42)))) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -7.2e-64) || ~(((x <= 1.08e-212) || (~((x <= 1.35e-147)) && (x <= 1.3e-42))))) tmp = -x / tan(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -7.2e-64], N[Not[Or[LessEqual[x, 1.08e-212], And[N[Not[LessEqual[x, 1.35e-147]], $MachinePrecision], LessEqual[x, 1.3e-42]]]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-64} \lor \neg \left(x \leq 1.08 \cdot 10^{-212} \lor \neg \left(x \leq 1.35 \cdot 10^{-147}\right) \land x \leq 1.3 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if x < -7.1999999999999996e-64 or 1.08e-212 < x < 1.35e-147 or 1.3e-42 < x Initial program 91.0%
Taylor expanded in F around -inf 74.7%
Taylor expanded in x around inf 84.3%
mul-1-neg84.3%
associate-/l*84.2%
distribute-lft-neg-in84.2%
Simplified84.2%
add-sqr-sqrt27.1%
sqrt-unprod21.7%
sqr-neg21.7%
sqrt-unprod0.9%
add-sqr-sqrt1.2%
clear-num1.2%
tan-quot1.2%
div-inv1.2%
frac-2neg1.2%
neg-sub01.2%
div-sub1.2%
add-sqr-sqrt0.9%
sqrt-unprod21.8%
sqr-neg21.8%
sqrt-unprod27.1%
add-sqr-sqrt84.4%
frac-2neg84.4%
Applied egg-rr84.4%
div084.4%
neg-sub084.4%
distribute-frac-neg284.4%
Simplified84.4%
if -7.1999999999999996e-64 < x < 1.08e-212 or 1.35e-147 < x < 1.3e-42Initial program 62.8%
Taylor expanded in F around -inf 26.3%
add-cube-cbrt25.8%
pow325.8%
Applied egg-rr39.6%
Taylor expanded in x around 0 39.6%
Taylor expanded in B around inf 40.2%
Final simplification66.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.35e-53)
t_0
(if (<= F 6.8e-79)
(/ x (- B))
(if (or (<= F 6.8e+129) (not (<= F 5.6e+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 <= -1.35e-53) {
tmp = t_0;
} else if (F <= 6.8e-79) {
tmp = x / -B;
} else if ((F <= 6.8e+129) || !(F <= 5.6e+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 <= (-1.35d-53)) then
tmp = t_0
else if (f <= 6.8d-79) then
tmp = x / -b
else if ((f <= 6.8d+129) .or. (.not. (f <= 5.6d+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 <= -1.35e-53) {
tmp = t_0;
} else if (F <= 6.8e-79) {
tmp = x / -B;
} else if ((F <= 6.8e+129) || !(F <= 5.6e+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 <= -1.35e-53: tmp = t_0 elif F <= 6.8e-79: tmp = x / -B elif (F <= 6.8e+129) or not (F <= 5.6e+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 <= -1.35e-53) tmp = t_0; elseif (F <= 6.8e-79) tmp = Float64(x / Float64(-B)); elseif ((F <= 6.8e+129) || !(F <= 5.6e+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 <= -1.35e-53) tmp = t_0; elseif (F <= 6.8e-79) tmp = x / -B; elseif ((F <= 6.8e+129) || ~((F <= 5.6e+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, -1.35e-53], t$95$0, If[LessEqual[F, 6.8e-79], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 6.8e+129], N[Not[LessEqual[F, 5.6e+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 -1.35 \cdot 10^{-53}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-79}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+129} \lor \neg \left(F \leq 5.6 \cdot 10^{+155}\right):\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.35e-53 or 6.80000000000000036e129 < F < 5.60000000000000033e155Initial program 75.6%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 52.9%
mul-1-neg52.9%
distribute-neg-frac252.9%
Simplified52.9%
if -1.35e-53 < F < 6.79999999999999951e-79Initial program 99.4%
Taylor expanded in F around -inf 33.3%
Taylor expanded in B around 0 19.1%
mul-1-neg19.1%
distribute-neg-frac219.1%
Simplified19.1%
Taylor expanded in x around inf 37.1%
associate-*r/37.1%
mul-1-neg37.1%
Simplified37.1%
if 6.79999999999999951e-79 < F < 6.80000000000000036e129 or 5.60000000000000033e155 < F Initial program 60.4%
Taylor expanded in F around -inf 31.9%
add-cube-cbrt31.5%
pow331.5%
Applied egg-rr57.2%
Taylor expanded in x around 0 58.6%
Taylor expanded in B around inf 59.5%
Final simplification49.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -7.6e-57)
t_0
(if (<= F 1.33e-46)
(/ x (- B))
(if (or (<= F 1.08e+129) (not (<= F 1.12e+158)))
(/ (+ 1.0 x) B)
t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -7.6e-57) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 1.08e+129) || !(F <= 1.12e+158)) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) - x) / b
if (f <= (-7.6d-57)) then
tmp = t_0
else if (f <= 1.33d-46) then
tmp = x / -b
else if ((f <= 1.08d+129) .or. (.not. (f <= 1.12d+158))) then
tmp = (1.0d0 + x) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -7.6e-57) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 1.08e+129) || !(F <= 1.12e+158)) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -7.6e-57: tmp = t_0 elif F <= 1.33e-46: tmp = x / -B elif (F <= 1.08e+129) or not (F <= 1.12e+158): tmp = (1.0 + x) / 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 <= -7.6e-57) tmp = t_0; elseif (F <= 1.33e-46) tmp = Float64(x / Float64(-B)); elseif ((F <= 1.08e+129) || !(F <= 1.12e+158)) tmp = Float64(Float64(1.0 + x) / 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 <= -7.6e-57) tmp = t_0; elseif (F <= 1.33e-46) tmp = x / -B; elseif ((F <= 1.08e+129) || ~((F <= 1.12e+158))) tmp = (1.0 + x) / 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, -7.6e-57], t$95$0, If[LessEqual[F, 1.33e-46], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 1.08e+129], N[Not[LessEqual[F, 1.12e+158]], $MachinePrecision]], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -7.6 \cdot 10^{-57}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{+129} \lor \neg \left(F \leq 1.12 \cdot 10^{+158}\right):\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -7.5999999999999995e-57 or 1.08e129 < F < 1.1200000000000001e158Initial program 75.6%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 52.9%
mul-1-neg52.9%
distribute-neg-frac252.9%
Simplified52.9%
if -7.5999999999999995e-57 < F < 1.33000000000000008e-46Initial program 99.4%
Taylor expanded in F around -inf 32.0%
Taylor expanded in B around 0 17.9%
mul-1-neg17.9%
distribute-neg-frac217.9%
Simplified17.9%
Taylor expanded in x around inf 34.9%
associate-*r/34.9%
mul-1-neg34.9%
Simplified34.9%
if 1.33000000000000008e-46 < F < 1.08e129 or 1.1200000000000001e158 < F Initial program 56.5%
Taylor expanded in F around -inf 33.5%
add-cube-cbrt33.1%
pow333.1%
Applied egg-rr62.4%
Taylor expanded in B around 0 33.0%
Final simplification40.7%
(FPCore (F B x) :precision binary64 (if (<= F -3.1e+56) (/ -1.0 B) (if (<= F 1.33e-46) (/ x (- B)) (/ (+ 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e+56) {
tmp = -1.0 / B;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else {
tmp = (1.0 + x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d+56)) then
tmp = (-1.0d0) / b
else if (f <= 1.33d-46) then
tmp = x / -b
else
tmp = (1.0d0 + x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e+56) {
tmp = -1.0 / B;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else {
tmp = (1.0 + x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e+56: tmp = -1.0 / B elif F <= 1.33e-46: tmp = x / -B else: tmp = (1.0 + x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e+56) tmp = Float64(-1.0 / B); elseif (F <= 1.33e-46) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 + x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e+56) tmp = -1.0 / B; elseif (F <= 1.33e-46) tmp = x / -B; else tmp = (1.0 + x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e+56], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x}{B}\\
\end{array}
\end{array}
if F < -3.10000000000000005e56Initial 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%
Taylor expanded in x around 0 32.5%
if -3.10000000000000005e56 < F < 1.33000000000000008e-46Initial program 99.4%
Taylor expanded in F around -inf 40.5%
Taylor expanded in B around 0 24.7%
mul-1-neg24.7%
distribute-neg-frac224.7%
Simplified24.7%
Taylor expanded in x around inf 36.9%
associate-*r/36.9%
mul-1-neg36.9%
Simplified36.9%
if 1.33000000000000008e-46 < F Initial program 61.0%
Taylor expanded in F around -inf 39.7%
add-cube-cbrt39.2%
pow339.2%
Applied egg-rr56.0%
Taylor expanded in B around 0 29.8%
Final simplification33.7%
(FPCore (F B x) :precision binary64 (if (<= F -3e+56) (/ -1.0 B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e+56) {
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 <= (-3d+56)) 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 <= -3e+56) {
tmp = -1.0 / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e+56: tmp = -1.0 / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e+56) tmp = Float64(-1.0 / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e+56) tmp = -1.0 / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e+56], N[(-1.0 / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-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%
Taylor expanded in x around 0 32.5%
if -3.00000000000000006e56 < F Initial program 84.0%
Taylor expanded in F around -inf 40.2%
Taylor expanded in B around 0 21.8%
mul-1-neg21.8%
distribute-neg-frac221.8%
Simplified21.8%
Taylor expanded in x around inf 29.3%
associate-*r/29.3%
mul-1-neg29.3%
Simplified29.3%
Final simplification30.1%
(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))))))