
(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 29 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 -5.2e-9)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 2.9e+60)
(- (* 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 <= -5.2e-9) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 2.9e+60) {
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 <= -5.2e-9) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 2.9e+60) 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, -5.2e-9], 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.9e+60], 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 -5.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{+60}:\\
\;\;\;\;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 < -5.2000000000000002e-9Initial program 70.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -5.2000000000000002e-9 < F < 2.9e60Initial 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 2.9e60 < F Initial program 52.6%
Simplified62.1%
Taylor expanded in x around 0 62.1%
associate-*l/62.1%
*-lft-identity62.1%
+-commutative62.1%
unpow262.1%
fma-undefine62.1%
Simplified62.1%
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 -5.2e-9)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 5e+35)
(- (/ 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 <= -5.2e-9) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 5e+35) {
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 <= -5.2e-9) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 5e+35) 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, -5.2e-9], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+35], 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.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+35}:\\
\;\;\;\;\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.2000000000000002e-9Initial program 70.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -5.2000000000000002e-9 < F < 5.00000000000000021e35Initial 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 5.00000000000000021e35 < F Initial program 57.2%
Simplified65.7%
Taylor expanded in x around 0 65.8%
associate-*l/65.8%
*-lft-identity65.8%
+-commutative65.8%
unpow265.8%
fma-undefine65.8%
Simplified65.8%
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 -5.2e-9)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1e+31)
(- (/ 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 <= -5.2e-9) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1e+31) {
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 <= -5.2e-9) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1e+31) 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, -5.2e-9], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+31], 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 -5.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 10^{+31}:\\
\;\;\;\;\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 < -5.2000000000000002e-9Initial program 70.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -5.2000000000000002e-9 < F < 9.9999999999999996e30Initial 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.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
associate-/r/99.6%
times-frac99.6%
*-lft-identity99.6%
Simplified99.6%
if 9.9999999999999996e30 < F Initial program 57.8%
Simplified66.2%
Taylor expanded in x around 0 66.3%
associate-*l/66.3%
*-lft-identity66.3%
+-commutative66.3%
unpow266.3%
fma-undefine66.3%
Simplified66.3%
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 -5.2e-9)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 5e+46)
(+ 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 <= -5.2e-9) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 5e+46) {
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 <= (-5.2d-9)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 5d+46) 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 <= -5.2e-9) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 5e+46) {
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 <= -5.2e-9: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 5e+46: 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 <= -5.2e-9) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 5e+46) 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 <= -5.2e-9) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 5e+46) 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, -5.2e-9], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+46], 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 -5.2 \cdot 10^{-9}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+46}:\\
\;\;\;\;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 < -5.2000000000000002e-9Initial program 70.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -5.2000000000000002e-9 < F < 5.0000000000000002e46Initial program 99.4%
div-inv33.0%
clear-num33.0%
Applied egg-rr99.4%
if 5.0000000000000002e46 < F Initial program 56.0%
Simplified64.8%
Taylor expanded in x around 0 64.9%
associate-*l/64.8%
*-lft-identity64.8%
+-commutative64.8%
unpow264.8%
fma-undefine64.8%
Simplified64.8%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -5.2e-9)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 3.2e+46)
(+
(* (/ 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 <= -5.2e-9) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 3.2e+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)) - (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 <= (-5.2d-9)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 3.2d+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)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-9) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 3.2e+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)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e-9: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 3.2e+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)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e-9) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 3.2e+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)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.2e-9) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 3.2e+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)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e-9], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e+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] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.2 \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} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.2000000000000002e-9Initial program 70.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -5.2000000000000002e-9 < F < 3.1999999999999998e46Initial program 99.4%
if 3.1999999999999998e46 < F Initial program 56.0%
Simplified64.8%
Taylor expanded in x around 0 64.9%
associate-*l/64.8%
*-lft-identity64.8%
+-commutative64.8%
unpow264.8%
fma-undefine64.8%
Simplified64.8%
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 -5.2e-9)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.42)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.2e-9) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.42) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.2d-9)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.42d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.2e-9) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.42) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.2e-9: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.42: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.2e-9) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.42) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.2e-9) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.42) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.2e-9], 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[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.2000000000000002e-9Initial program 70.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -5.2000000000000002e-9 < 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%
clear-num99.6%
un-div-inv99.6%
inv-pow99.6%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.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 -5.2e-9)
(+ (/ -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 <= -5.2e-9) {
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 <= (-5.2d-9)) 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 <= -5.2e-9) {
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 <= -5.2e-9: 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 <= -5.2e-9) 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 <= -5.2e-9) 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, -5.2e-9], 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 -5.2 \cdot 10^{-9}:\\
\;\;\;\;\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 < -5.2000000000000002e-9Initial program 70.4%
Taylor expanded in F around -inf 99.7%
div-inv99.9%
clear-num99.9%
Applied egg-rr99.9%
if -5.2000000000000002e-9 < 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 -8e-26)
(+ (/ -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 <= -8e-26) {
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 <= (-8d-26)) 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 <= -8e-26) {
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 <= -8e-26: 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 <= -8e-26) 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 <= -8e-26) 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, -8e-26], 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 -8 \cdot 10^{-26}:\\
\;\;\;\;\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 < -8.0000000000000003e-26Initial program 72.5%
Taylor expanded in F around -inf 97.4%
div-inv97.6%
clear-num97.6%
Applied egg-rr97.6%
if -8.0000000000000003e-26 < F < 1.3000000000000001e-46Initial program 99.5%
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 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 -8e-26)
(+ (/ -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 <= -8e-26) {
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 <= (-8d-26)) 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 <= -8e-26) {
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 <= -8e-26: 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 <= -8e-26) 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 <= -8e-26) 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, -8e-26], 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 -8 \cdot 10^{-26}:\\
\;\;\;\;\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 < -8.0000000000000003e-26Initial program 72.5%
Taylor expanded in F around -inf 97.4%
if -8.0000000000000003e-26 < F < 1.3000000000000001e-46Initial program 99.5%
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 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 -2.15e-7)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 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 <= -2.15e-7) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / 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 <= (-2.15d-7)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / 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 <= -2.15e-7) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / 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 <= -2.15e-7: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / 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 <= -2.15e-7) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / 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 <= -2.15e-7) tmp = (x * (-1.0 / tan(B))) + (-1.0 / 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, -2.15e-7], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $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 -2.15 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{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 < -2.1500000000000001e-7Initial program 69.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 83.9%
if -2.1500000000000001e-7 < F < 1.3000000000000001e-46Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 87.5%
Taylor expanded in x around 0 87.4%
associate-/l*87.5%
Simplified87.5%
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 -2e-87)
(- (/ F (* F (- B))) t_0)
(if (<= F 3.4e-47) (/ (- 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 <= -2e-87) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 3.4e-47) {
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 <= (-2d-87)) then
tmp = (f / (f * -b)) - t_0
else if (f <= 3.4d-47) 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 <= -2e-87) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 3.4e-47) {
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 <= -2e-87: tmp = (F / (F * -B)) - t_0 elif F <= 3.4e-47: 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 <= -2e-87) tmp = Float64(Float64(F / Float64(F * Float64(-B))) - t_0); elseif (F <= 3.4e-47) 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 <= -2e-87) tmp = (F / (F * -B)) - t_0; elseif (F <= 3.4e-47) 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, -2e-87], N[(N[(F / N[(F * (-B)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e-47], 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 -2 \cdot 10^{-87}:\\
\;\;\;\;\frac{F}{F \cdot \left(-B\right)} - t\_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-47}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.00000000000000004e-87Initial program 75.5%
Simplified82.6%
Taylor expanded in x around 0 82.7%
associate-*l/82.7%
*-lft-identity82.7%
+-commutative82.7%
unpow282.7%
fma-undefine82.7%
Simplified82.7%
clear-num82.7%
un-div-inv82.6%
inv-pow82.6%
sqrt-pow182.7%
metadata-eval82.7%
Applied egg-rr82.7%
Taylor expanded in B around 0 73.0%
+-commutative73.0%
unpow273.0%
fma-undefine73.0%
Simplified73.0%
Taylor expanded in F around -inf 80.8%
associate-*r*80.8%
neg-mul-180.8%
Simplified80.8%
if -2.00000000000000004e-87 < F < 3.4000000000000002e-47Initial program 99.4%
Taylor expanded in F around -inf 29.4%
Taylor expanded in x around inf 71.0%
mul-1-neg71.0%
associate-/l*71.0%
distribute-lft-neg-in71.0%
Simplified71.0%
clear-num70.9%
tan-quot71.0%
*-un-lft-identity71.0%
Applied egg-rr71.0%
*-lft-identity71.0%
Simplified71.0%
distribute-lft-neg-out71.0%
neg-sub071.0%
un-div-inv71.1%
Applied egg-rr71.1%
neg-sub071.1%
distribute-neg-frac71.1%
Simplified71.1%
if 3.4000000000000002e-47 < 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 -5.25e+123)
t_0
(if (<= F -2.15e-7)
(/ (- -1.0 x) B)
(if (<= F 1.33e-46)
t_0
(if (or (<= F 4.7e+220) (not (<= F 3.9e+282)))
(- (/ 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 <= -5.25e+123) {
tmp = t_0;
} else if (F <= -2.15e-7) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.33e-46) {
tmp = t_0;
} else if ((F <= 4.7e+220) || !(F <= 3.9e+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) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-5.25d+123)) then
tmp = t_0
else if (f <= (-2.15d-7)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.33d-46) then
tmp = t_0
else if ((f <= 4.7d+220) .or. (.not. (f <= 3.9d+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 t_0 = -x / Math.tan(B);
double tmp;
if (F <= -5.25e+123) {
tmp = t_0;
} else if (F <= -2.15e-7) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.33e-46) {
tmp = t_0;
} else if ((F <= 4.7e+220) || !(F <= 3.9e+282)) {
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 <= -5.25e+123: tmp = t_0 elif F <= -2.15e-7: tmp = (-1.0 - x) / B elif F <= 1.33e-46: tmp = t_0 elif (F <= 4.7e+220) or not (F <= 3.9e+282): 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 <= -5.25e+123) tmp = t_0; elseif (F <= -2.15e-7) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.33e-46) tmp = t_0; elseif ((F <= 4.7e+220) || !(F <= 3.9e+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) t_0 = -x / tan(B); tmp = 0.0; if (F <= -5.25e+123) tmp = t_0; elseif (F <= -2.15e-7) tmp = (-1.0 - x) / B; elseif (F <= 1.33e-46) tmp = t_0; elseif ((F <= 4.7e+220) || ~((F <= 3.9e+282))) 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, -5.25e+123], t$95$0, If[LessEqual[F, -2.15e-7], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.33e-46], t$95$0, If[Or[LessEqual[F, 4.7e+220], N[Not[LessEqual[F, 3.9e+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}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -5.25 \cdot 10^{+123}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{+220} \lor \neg \left(F \leq 3.9 \cdot 10^{+282}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.25000000000000029e123Initial program 53.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around inf 59.0%
mul-1-neg59.0%
associate-/l*59.0%
distribute-lft-neg-in59.0%
Simplified59.0%
add-sqr-sqrt38.4%
sqrt-unprod26.8%
sqr-neg26.8%
sqrt-unprod0.5%
add-sqr-sqrt1.8%
clear-num1.8%
tan-quot1.8%
div-inv1.8%
frac-2neg1.8%
neg-sub01.8%
div-sub1.8%
add-sqr-sqrt0.5%
sqrt-unprod27.0%
sqr-neg27.0%
sqrt-unprod38.4%
add-sqr-sqrt59.3%
frac-2neg59.3%
Applied egg-rr59.3%
div059.3%
neg-sub059.3%
distribute-frac-neg259.3%
Simplified59.3%
if -5.25000000000000029e123 < F < -2.1500000000000001e-7Initial program 96.2%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 67.8%
mul-1-neg67.8%
distribute-neg-frac267.8%
Simplified67.8%
if -2.1500000000000001e-7 < F < 1.33000000000000008e-46Initial program 99.4%
Taylor expanded in F around -inf 34.9%
Taylor expanded in x around inf 69.8%
mul-1-neg69.8%
associate-/l*69.7%
distribute-lft-neg-in69.7%
Simplified69.7%
clear-num69.7%
tan-quot69.8%
*-un-lft-identity69.8%
Applied egg-rr69.8%
*-lft-identity69.8%
Simplified69.8%
distribute-lft-neg-out69.8%
neg-sub069.8%
un-div-inv69.9%
Applied egg-rr69.9%
neg-sub069.9%
distribute-neg-frac69.9%
Simplified69.9%
if 1.33000000000000008e-46 < F < 4.70000000000000026e220 or 3.8999999999999998e282 < F Initial program 74.0%
Simplified80.6%
Taylor expanded in x around 0 80.8%
associate-*l/80.8%
*-lft-identity80.8%
+-commutative80.8%
unpow280.8%
fma-undefine80.8%
Simplified80.8%
clear-num80.7%
un-div-inv80.8%
inv-pow80.8%
sqrt-pow180.7%
metadata-eval80.7%
Applied egg-rr80.7%
Taylor expanded in B around 0 61.9%
+-commutative61.9%
unpow261.9%
fma-undefine61.9%
Simplified61.9%
Taylor expanded in F around inf 75.0%
if 4.70000000000000026e220 < F < 3.8999999999999998e282Initial program 14.3%
Taylor expanded in F around -inf 24.5%
add-cube-cbrt24.3%
pow324.3%
Applied egg-rr75.4%
Taylor expanded in x around 0 76.7%
Taylor expanded in B around inf 77.6%
Final simplification69.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.8e-87)
(- (/ F (* F (- B))) t_0)
(if (<= F 1.33e-46)
(/ (- x) (tan B))
(if (<= F 1.46e+221)
(- (/ 1.0 B) t_0)
(if (<= F 1.16e+285) (/ 1.0 (sin B)) (- (/ F (* F B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.8e-87) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 1.33e-46) {
tmp = -x / tan(B);
} else if (F <= 1.46e+221) {
tmp = (1.0 / B) - t_0;
} else if (F <= 1.16e+285) {
tmp = 1.0 / sin(B);
} 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) :: tmp
t_0 = x / tan(b)
if (f <= (-5.8d-87)) then
tmp = (f / (f * -b)) - t_0
else if (f <= 1.33d-46) then
tmp = -x / tan(b)
else if (f <= 1.46d+221) then
tmp = (1.0d0 / b) - t_0
else if (f <= 1.16d+285) then
tmp = 1.0d0 / sin(b)
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 tmp;
if (F <= -5.8e-87) {
tmp = (F / (F * -B)) - t_0;
} else if (F <= 1.33e-46) {
tmp = -x / Math.tan(B);
} else if (F <= 1.46e+221) {
tmp = (1.0 / B) - t_0;
} else if (F <= 1.16e+285) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.8e-87: tmp = (F / (F * -B)) - t_0 elif F <= 1.33e-46: tmp = -x / math.tan(B) elif F <= 1.46e+221: tmp = (1.0 / B) - t_0 elif F <= 1.16e+285: tmp = 1.0 / math.sin(B) else: tmp = (F / (F * B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.8e-87) tmp = Float64(Float64(F / Float64(F * Float64(-B))) - t_0); elseif (F <= 1.33e-46) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.46e+221) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= 1.16e+285) tmp = Float64(1.0 / sin(B)); 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); tmp = 0.0; if (F <= -5.8e-87) tmp = (F / (F * -B)) - t_0; elseif (F <= 1.33e-46) tmp = -x / tan(B); elseif (F <= 1.46e+221) tmp = (1.0 / B) - t_0; elseif (F <= 1.16e+285) tmp = 1.0 / sin(B); 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]}, If[LessEqual[F, -5.8e-87], N[(N[(F / N[(F * (-B)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.46e+221], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.16e+285], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-87}:\\
\;\;\;\;\frac{F}{F \cdot \left(-B\right)} - t\_0\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.46 \cdot 10^{+221}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{+285}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -5.7999999999999998e-87Initial program 75.5%
Simplified82.6%
Taylor expanded in x around 0 82.7%
associate-*l/82.7%
*-lft-identity82.7%
+-commutative82.7%
unpow282.7%
fma-undefine82.7%
Simplified82.7%
clear-num82.7%
un-div-inv82.6%
inv-pow82.6%
sqrt-pow182.7%
metadata-eval82.7%
Applied egg-rr82.7%
Taylor expanded in B around 0 73.0%
+-commutative73.0%
unpow273.0%
fma-undefine73.0%
Simplified73.0%
Taylor expanded in F around -inf 80.8%
associate-*r*80.8%
neg-mul-180.8%
Simplified80.8%
if -5.7999999999999998e-87 < F < 1.33000000000000008e-46Initial program 99.4%
Taylor expanded in F around -inf 29.1%
Taylor expanded in x around inf 70.3%
mul-1-neg70.3%
associate-/l*70.2%
distribute-lft-neg-in70.2%
Simplified70.2%
clear-num70.2%
tan-quot70.3%
*-un-lft-identity70.3%
Applied egg-rr70.3%
*-lft-identity70.3%
Simplified70.3%
distribute-lft-neg-out70.3%
neg-sub070.3%
un-div-inv70.3%
Applied egg-rr70.3%
neg-sub070.3%
distribute-neg-frac70.3%
Simplified70.3%
if 1.33000000000000008e-46 < F < 1.4599999999999999e221Initial program 79.5%
Simplified83.1%
Taylor expanded in x around 0 83.3%
associate-*l/83.3%
*-lft-identity83.3%
+-commutative83.3%
unpow283.3%
fma-undefine83.3%
Simplified83.3%
clear-num83.2%
un-div-inv83.3%
inv-pow83.3%
sqrt-pow183.2%
metadata-eval83.2%
Applied egg-rr83.2%
Taylor expanded in B around 0 61.5%
+-commutative61.5%
unpow261.5%
fma-undefine61.5%
Simplified61.5%
Taylor expanded in F around inf 71.2%
if 1.4599999999999999e221 < F < 1.15999999999999994e285Initial program 14.3%
Taylor expanded in F around -inf 24.5%
add-cube-cbrt24.3%
pow324.3%
Applied egg-rr75.4%
Taylor expanded in x around 0 76.7%
Taylor expanded in B around inf 77.6%
if 1.15999999999999994e285 < F Initial program 37.3%
Simplified64.1%
Taylor expanded in x around 0 64.1%
associate-*l/64.1%
*-lft-identity64.1%
+-commutative64.1%
unpow264.1%
fma-undefine64.1%
Simplified64.1%
clear-num64.1%
un-div-inv64.1%
inv-pow64.1%
sqrt-pow164.1%
metadata-eval64.1%
Applied egg-rr64.1%
Taylor expanded in B around 0 64.1%
+-commutative64.1%
unpow264.1%
fma-undefine64.1%
Simplified64.1%
Taylor expanded in F around inf 100.0%
*-commutative100.0%
Simplified100.0%
Final simplification75.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.5e-51)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F 1.33e-46)
(/ (- x) (tan B))
(if (<= F 1e+221)
(- (/ 1.0 B) t_0)
(if (<= F 5.8e+282) (/ 1.0 (sin B)) (- (/ F (* F B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.5e-51) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 1.33e-46) {
tmp = -x / tan(B);
} else if (F <= 1e+221) {
tmp = (1.0 / B) - t_0;
} else if (F <= 5.8e+282) {
tmp = 1.0 / sin(B);
} 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) :: tmp
t_0 = x / tan(b)
if (f <= (-7.5d-51)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 1.33d-46) then
tmp = -x / tan(b)
else if (f <= 1d+221) then
tmp = (1.0d0 / b) - t_0
else if (f <= 5.8d+282) then
tmp = 1.0d0 / sin(b)
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 tmp;
if (F <= -7.5e-51) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 1.33e-46) {
tmp = -x / Math.tan(B);
} else if (F <= 1e+221) {
tmp = (1.0 / B) - t_0;
} else if (F <= 5.8e+282) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.5e-51: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 1.33e-46: tmp = -x / math.tan(B) elif F <= 1e+221: tmp = (1.0 / B) - t_0 elif F <= 5.8e+282: tmp = 1.0 / math.sin(B) else: tmp = (F / (F * B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.5e-51) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 1.33e-46) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1e+221) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= 5.8e+282) tmp = Float64(1.0 / sin(B)); 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); tmp = 0.0; if (F <= -7.5e-51) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 1.33e-46) tmp = -x / tan(B); elseif (F <= 1e+221) tmp = (1.0 / B) - t_0; elseif (F <= 5.8e+282) tmp = 1.0 / sin(B); 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]}, If[LessEqual[F, -7.5e-51], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+221], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e+282], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{-51}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 10^{+221}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{+282}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -7.49999999999999976e-51Initial program 73.2%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 81.2%
if -7.49999999999999976e-51 < 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%
clear-num70.6%
tan-quot70.7%
*-un-lft-identity70.7%
Applied egg-rr70.7%
*-lft-identity70.7%
Simplified70.7%
distribute-lft-neg-out70.7%
neg-sub070.7%
un-div-inv70.8%
Applied egg-rr70.8%
neg-sub070.8%
distribute-neg-frac70.8%
Simplified70.8%
if 1.33000000000000008e-46 < F < 1e221Initial program 79.5%
Simplified83.1%
Taylor expanded in x around 0 83.3%
associate-*l/83.3%
*-lft-identity83.3%
+-commutative83.3%
unpow283.3%
fma-undefine83.3%
Simplified83.3%
clear-num83.2%
un-div-inv83.3%
inv-pow83.3%
sqrt-pow183.2%
metadata-eval83.2%
Applied egg-rr83.2%
Taylor expanded in B around 0 61.5%
+-commutative61.5%
unpow261.5%
fma-undefine61.5%
Simplified61.5%
Taylor expanded in F around inf 71.2%
if 1e221 < F < 5.80000000000000032e282Initial program 14.3%
Taylor expanded in F around -inf 24.5%
add-cube-cbrt24.3%
pow324.3%
Applied egg-rr75.4%
Taylor expanded in x around 0 76.7%
Taylor expanded in B around inf 77.6%
if 5.80000000000000032e282 < F Initial program 37.3%
Simplified64.1%
Taylor expanded in x around 0 64.1%
associate-*l/64.1%
*-lft-identity64.1%
+-commutative64.1%
unpow264.1%
fma-undefine64.1%
Simplified64.1%
clear-num64.1%
un-div-inv64.1%
inv-pow64.1%
sqrt-pow164.1%
metadata-eval64.1%
Applied egg-rr64.1%
Taylor expanded in B around 0 64.1%
+-commutative64.1%
unpow264.1%
fma-undefine64.1%
Simplified64.1%
Taylor expanded in F around inf 100.0%
*-commutative100.0%
Simplified100.0%
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 -7.5e+204)
t_1
(if (<= F -5.5e+149)
(- (/ F (* F B)) t_0)
(if (<= F -2.15e-7)
t_1
(if (<= F 1.33e-46) (/ (- x) (tan B)) (- (/ 1.0 B) t_0)))))))
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 <= -7.5e+204) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = (F / (F * B)) - t_0;
} else if (F <= -2.15e-7) {
tmp = t_1;
} else if (F <= 1.33e-46) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-7.5d+204)) then
tmp = t_1
else if (f <= (-5.5d+149)) then
tmp = (f / (f * b)) - t_0
else if (f <= (-2.15d-7)) then
tmp = t_1
else if (f <= 1.33d-46) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -7.5e+204) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = (F / (F * B)) - t_0;
} else if (F <= -2.15e-7) {
tmp = t_1;
} else if (F <= 1.33e-46) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
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 <= -7.5e+204: tmp = t_1 elif F <= -5.5e+149: tmp = (F / (F * B)) - t_0 elif F <= -2.15e-7: tmp = t_1 elif F <= 1.33e-46: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -7.5e+204) tmp = t_1; elseif (F <= -5.5e+149) tmp = Float64(Float64(F / Float64(F * B)) - t_0); elseif (F <= -2.15e-7) tmp = t_1; elseif (F <= 1.33e-46) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -7.5e+204) tmp = t_1; elseif (F <= -5.5e+149) tmp = (F / (F * B)) - t_0; elseif (F <= -2.15e-7) tmp = t_1; elseif (F <= 1.33e-46) tmp = -x / tan(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e+204], t$95$1, If[LessEqual[F, -5.5e+149], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.15e-7], t$95$1, If[LessEqual[F, 1.33e-46], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $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 -7.5 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_0\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -7.4999999999999998e204 or -5.49999999999999999e149 < F < -2.1500000000000001e-7Initial program 64.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.9%
if -7.4999999999999998e204 < F < -5.49999999999999999e149Initial program 99.4%
Simplified99.8%
Taylor expanded in x around 0 99.8%
associate-*l/99.8%
*-lft-identity99.8%
+-commutative99.8%
unpow299.8%
fma-undefine99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
inv-pow99.8%
sqrt-pow199.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in B around 0 99.8%
+-commutative99.8%
unpow299.8%
fma-undefine99.8%
Simplified99.8%
Taylor expanded in F around inf 99.8%
*-commutative99.8%
Simplified99.8%
if -2.1500000000000001e-7 < F < 1.33000000000000008e-46Initial program 99.4%
Taylor expanded in F around -inf 34.9%
Taylor expanded in x around inf 69.8%
mul-1-neg69.8%
associate-/l*69.7%
distribute-lft-neg-in69.7%
Simplified69.7%
clear-num69.7%
tan-quot69.8%
*-un-lft-identity69.8%
Applied egg-rr69.8%
*-lft-identity69.8%
Simplified69.8%
distribute-lft-neg-out69.8%
neg-sub069.8%
un-div-inv69.9%
Applied egg-rr69.9%
neg-sub069.9%
distribute-neg-frac69.9%
Simplified69.9%
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%
clear-num68.8%
un-div-inv68.9%
inv-pow68.9%
sqrt-pow168.8%
metadata-eval68.8%
Applied egg-rr68.8%
Taylor expanded in B around 0 54.1%
+-commutative54.1%
unpow254.1%
fma-undefine54.1%
Simplified54.1%
Taylor expanded in F around inf 68.1%
Final simplification72.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ 1.0 B) (/ x (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1.5e+205)
t_1
(if (<= F -5.5e+149)
t_0
(if (<= F -2.15e-7) t_1 (if (<= F 1.33e-46) (/ (- x) (tan B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1.5e+205) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = t_0;
} else if (F <= -2.15e-7) {
tmp = t_1;
} else if (F <= 1.33e-46) {
tmp = -x / tan(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) :: t_1
real(8) :: tmp
t_0 = (1.0d0 / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1.5d+205)) then
tmp = t_1
else if (f <= (-5.5d+149)) then
tmp = t_0
else if (f <= (-2.15d-7)) then
tmp = t_1
else if (f <= 1.33d-46) then
tmp = -x / tan(b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (1.0 / B) - (x / Math.tan(B));
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1.5e+205) {
tmp = t_1;
} else if (F <= -5.5e+149) {
tmp = t_0;
} else if (F <= -2.15e-7) {
tmp = t_1;
} else if (F <= 1.33e-46) {
tmp = -x / Math.tan(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1.5e+205: tmp = t_1 elif F <= -5.5e+149: tmp = t_0 elif F <= -2.15e-7: tmp = t_1 elif F <= 1.33e-46: tmp = -x / math.tan(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1.5e+205) tmp = t_1; elseif (F <= -5.5e+149) tmp = t_0; elseif (F <= -2.15e-7) tmp = t_1; elseif (F <= 1.33e-46) tmp = Float64(Float64(-x) / tan(B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1.5e+205) tmp = t_1; elseif (F <= -5.5e+149) tmp = t_0; elseif (F <= -2.15e-7) tmp = t_1; elseif (F <= 1.33e-46) tmp = -x / tan(B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5e+205], t$95$1, If[LessEqual[F, -5.5e+149], t$95$0, If[LessEqual[F, -2.15e-7], t$95$1, If[LessEqual[F, 1.33e-46], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{+149}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.5e205 or -5.49999999999999999e149 < F < -2.1500000000000001e-7Initial program 64.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.9%
if -1.5e205 < F < -5.49999999999999999e149 or 1.33000000000000008e-46 < F Initial program 65.3%
Simplified72.3%
Taylor expanded in x around 0 72.4%
associate-*l/72.4%
*-lft-identity72.4%
+-commutative72.4%
unpow272.4%
fma-undefine72.4%
Simplified72.4%
clear-num72.3%
un-div-inv72.4%
inv-pow72.4%
sqrt-pow172.3%
metadata-eval72.3%
Applied egg-rr72.3%
Taylor expanded in B around 0 59.3%
+-commutative59.3%
unpow259.3%
fma-undefine59.3%
Simplified59.3%
Taylor expanded in F around inf 71.7%
if -2.1500000000000001e-7 < F < 1.33000000000000008e-46Initial program 99.4%
Taylor expanded in F around -inf 34.9%
Taylor expanded in x around inf 69.8%
mul-1-neg69.8%
associate-/l*69.7%
distribute-lft-neg-in69.7%
Simplified69.7%
clear-num69.7%
tan-quot69.8%
*-un-lft-identity69.8%
Applied egg-rr69.8%
*-lft-identity69.8%
Simplified69.8%
distribute-lft-neg-out69.8%
neg-sub069.8%
un-div-inv69.9%
Applied egg-rr69.9%
neg-sub069.9%
distribute-neg-frac69.9%
Simplified69.9%
Final simplification72.9%
(FPCore (F B x)
:precision binary64
(if (or (<= x -1.38e-64)
(not
(or (<= x 1.6e-211) (and (not (<= x 1.85e-147)) (<= x 8.5e-43)))))
(/ (- x) (tan B))
(/ 1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.38e-64) || !((x <= 1.6e-211) || (!(x <= 1.85e-147) && (x <= 8.5e-43)))) {
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 <= (-1.38d-64)) .or. (.not. (x <= 1.6d-211) .or. (.not. (x <= 1.85d-147)) .and. (x <= 8.5d-43))) 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 <= -1.38e-64) || !((x <= 1.6e-211) || (!(x <= 1.85e-147) && (x <= 8.5e-43)))) {
tmp = -x / Math.tan(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.38e-64) or not ((x <= 1.6e-211) or (not (x <= 1.85e-147) and (x <= 8.5e-43))): tmp = -x / math.tan(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.38e-64) || !((x <= 1.6e-211) || (!(x <= 1.85e-147) && (x <= 8.5e-43)))) 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 <= -1.38e-64) || ~(((x <= 1.6e-211) || (~((x <= 1.85e-147)) && (x <= 8.5e-43))))) tmp = -x / tan(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.38e-64], N[Not[Or[LessEqual[x, 1.6e-211], And[N[Not[LessEqual[x, 1.85e-147]], $MachinePrecision], LessEqual[x, 8.5e-43]]]], $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 -1.38 \cdot 10^{-64} \lor \neg \left(x \leq 1.6 \cdot 10^{-211} \lor \neg \left(x \leq 1.85 \cdot 10^{-147}\right) \land x \leq 8.5 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if x < -1.37999999999999998e-64Initial program 84.4%
Taylor expanded in F around -inf 71.3%
Taylor expanded in x around inf 88.7%
mul-1-neg88.7%
associate-/l*88.6%
distribute-lft-neg-in88.6%
Simplified88.6%
add-sqr-sqrt88.4%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod0.0%
add-sqr-sqrt1.1%
clear-num1.1%
tan-quot1.1%
div-inv1.1%
frac-2neg1.1%
neg-sub01.1%
div-sub1.1%
add-sqr-sqrt0.0%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod88.5%
add-sqr-sqrt88.9%
frac-2neg88.9%
Applied egg-rr88.9%
div088.9%
neg-sub088.9%
distribute-frac-neg288.9%
Simplified88.9%
if -1.37999999999999998e-64 < x < 1.59999999999999993e-211 or 1.8500000000000001e-147 < x < 8.50000000000000056e-43Initial 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%
if 1.59999999999999993e-211 < x < 1.8500000000000001e-147 or 8.50000000000000056e-43 < x Initial program 93.9%
Taylor expanded in F around -inf 76.1%
Taylor expanded in x around inf 82.4%
mul-1-neg82.4%
associate-/l*82.2%
distribute-lft-neg-in82.2%
Simplified82.2%
clear-num82.1%
tan-quot82.2%
*-un-lft-identity82.2%
Applied egg-rr82.2%
*-lft-identity82.2%
Simplified82.2%
distribute-lft-neg-out82.2%
neg-sub082.2%
un-div-inv82.5%
Applied egg-rr82.5%
neg-sub082.5%
distribute-neg-frac82.5%
Simplified82.5%
Final simplification66.1%
(FPCore (F B x)
:precision binary64
(if (or (<= x -5.5e-64)
(and (not (<= x 1.5e-211)) (or (<= x 1.2e-147) (not (<= x 8.2e-43)))))
(/ (- x) (tan B))
(/ 1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.5e-64) || (!(x <= 1.5e-211) && ((x <= 1.2e-147) || !(x <= 8.2e-43)))) {
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 <= (-5.5d-64)) .or. (.not. (x <= 1.5d-211)) .and. (x <= 1.2d-147) .or. (.not. (x <= 8.2d-43))) 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 <= -5.5e-64) || (!(x <= 1.5e-211) && ((x <= 1.2e-147) || !(x <= 8.2e-43)))) {
tmp = -x / Math.tan(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.5e-64) or (not (x <= 1.5e-211) and ((x <= 1.2e-147) or not (x <= 8.2e-43))): tmp = -x / math.tan(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.5e-64) || (!(x <= 1.5e-211) && ((x <= 1.2e-147) || !(x <= 8.2e-43)))) 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 <= -5.5e-64) || (~((x <= 1.5e-211)) && ((x <= 1.2e-147) || ~((x <= 8.2e-43))))) tmp = -x / tan(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.5e-64], And[N[Not[LessEqual[x, 1.5e-211]], $MachinePrecision], Or[LessEqual[x, 1.2e-147], N[Not[LessEqual[x, 8.2e-43]], $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 -5.5 \cdot 10^{-64} \lor \neg \left(x \leq 1.5 \cdot 10^{-211}\right) \land \left(x \leq 1.2 \cdot 10^{-147} \lor \neg \left(x \leq 8.2 \cdot 10^{-43}\right)\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if x < -5.4999999999999999e-64 or 1.50000000000000002e-211 < x < 1.19999999999999999e-147 or 8.1999999999999996e-43 < 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 -5.4999999999999999e-64 < x < 1.50000000000000002e-211 or 1.19999999999999999e-147 < x < 8.1999999999999996e-43Initial 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 (/ (- x) (tan B))) (t_1 (/ 1.0 (sin B))))
(if (<= x -1.12e-64)
t_0
(if (<= x 1.8e-211)
t_1
(if (<= x 2.5e-147)
(* x (/ -1.0 (tan B)))
(if (<= x 1.35e-42) t_1 t_0))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = 1.0 / sin(B);
double tmp;
if (x <= -1.12e-64) {
tmp = t_0;
} else if (x <= 1.8e-211) {
tmp = t_1;
} else if (x <= 2.5e-147) {
tmp = x * (-1.0 / tan(B));
} else if (x <= 1.35e-42) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = 1.0d0 / sin(b)
if (x <= (-1.12d-64)) then
tmp = t_0
else if (x <= 1.8d-211) then
tmp = t_1
else if (x <= 2.5d-147) then
tmp = x * ((-1.0d0) / tan(b))
else if (x <= 1.35d-42) then
tmp = t_1
else
tmp = 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 / Math.sin(B);
double tmp;
if (x <= -1.12e-64) {
tmp = t_0;
} else if (x <= 1.8e-211) {
tmp = t_1;
} else if (x <= 2.5e-147) {
tmp = x * (-1.0 / Math.tan(B));
} else if (x <= 1.35e-42) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = 1.0 / math.sin(B) tmp = 0 if x <= -1.12e-64: tmp = t_0 elif x <= 1.8e-211: tmp = t_1 elif x <= 2.5e-147: tmp = x * (-1.0 / math.tan(B)) elif x <= 1.35e-42: tmp = t_1 else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(1.0 / sin(B)) tmp = 0.0 if (x <= -1.12e-64) tmp = t_0; elseif (x <= 1.8e-211) tmp = t_1; elseif (x <= 2.5e-147) tmp = Float64(x * Float64(-1.0 / tan(B))); elseif (x <= 1.35e-42) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = 1.0 / sin(B); tmp = 0.0; if (x <= -1.12e-64) tmp = t_0; elseif (x <= 1.8e-211) tmp = t_1; elseif (x <= 2.5e-147) tmp = x * (-1.0 / tan(B)); elseif (x <= 1.35e-42) tmp = t_1; else tmp = 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.12e-64], t$95$0, If[LessEqual[x, 1.8e-211], t$95$1, If[LessEqual[x, 2.5e-147], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.35e-42], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;x \leq -1.12 \cdot 10^{-64}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-211}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-147}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.12e-64Initial program 84.4%
Taylor expanded in F around -inf 71.3%
Taylor expanded in x around inf 88.7%
mul-1-neg88.7%
associate-/l*88.6%
distribute-lft-neg-in88.6%
Simplified88.6%
add-sqr-sqrt88.4%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod0.0%
add-sqr-sqrt1.1%
clear-num1.1%
tan-quot1.1%
div-inv1.1%
frac-2neg1.1%
neg-sub01.1%
div-sub1.1%
add-sqr-sqrt0.0%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod88.5%
add-sqr-sqrt88.9%
frac-2neg88.9%
Applied egg-rr88.9%
div088.9%
neg-sub088.9%
distribute-frac-neg288.9%
Simplified88.9%
if -1.12e-64 < x < 1.7999999999999999e-211 or 2.50000000000000007e-147 < x < 1.35e-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%
if 1.7999999999999999e-211 < x < 2.50000000000000007e-147Initial program 91.1%
Taylor expanded in F around -inf 24.6%
Taylor expanded in x around inf 25.1%
mul-1-neg25.1%
associate-/l*25.1%
distribute-lft-neg-in25.1%
Simplified25.1%
clear-num25.1%
tan-quot25.1%
*-un-lft-identity25.1%
Applied egg-rr25.1%
*-lft-identity25.1%
Simplified25.1%
if 1.35e-42 < x Initial program 94.8%
Taylor expanded in F around -inf 90.8%
Taylor expanded in x around inf 98.6%
mul-1-neg98.6%
associate-/l*98.5%
distribute-lft-neg-in98.5%
Simplified98.5%
clear-num98.4%
tan-quot98.5%
*-un-lft-identity98.5%
Applied egg-rr98.5%
*-lft-identity98.5%
Simplified98.5%
distribute-lft-neg-out98.5%
neg-sub098.5%
un-div-inv98.7%
Applied egg-rr98.7%
neg-sub098.7%
distribute-neg-frac98.7%
Simplified98.7%
Final simplification66.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))) (t_1 (/ 1.0 (sin B))))
(if (<= x -3.6e-63)
t_0
(if (<= x 2.05e-212)
t_1
(if (<= x 2.4e-147)
(/ -1.0 (/ (tan B) x))
(if (<= x 2.3e-42) t_1 t_0))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double t_1 = 1.0 / sin(B);
double tmp;
if (x <= -3.6e-63) {
tmp = t_0;
} else if (x <= 2.05e-212) {
tmp = t_1;
} else if (x <= 2.4e-147) {
tmp = -1.0 / (tan(B) / x);
} else if (x <= 2.3e-42) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = -x / tan(b)
t_1 = 1.0d0 / sin(b)
if (x <= (-3.6d-63)) then
tmp = t_0
else if (x <= 2.05d-212) then
tmp = t_1
else if (x <= 2.4d-147) then
tmp = (-1.0d0) / (tan(b) / x)
else if (x <= 2.3d-42) then
tmp = t_1
else
tmp = 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 / Math.sin(B);
double tmp;
if (x <= -3.6e-63) {
tmp = t_0;
} else if (x <= 2.05e-212) {
tmp = t_1;
} else if (x <= 2.4e-147) {
tmp = -1.0 / (Math.tan(B) / x);
} else if (x <= 2.3e-42) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) t_1 = 1.0 / math.sin(B) tmp = 0 if x <= -3.6e-63: tmp = t_0 elif x <= 2.05e-212: tmp = t_1 elif x <= 2.4e-147: tmp = -1.0 / (math.tan(B) / x) elif x <= 2.3e-42: tmp = t_1 else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) t_1 = Float64(1.0 / sin(B)) tmp = 0.0 if (x <= -3.6e-63) tmp = t_0; elseif (x <= 2.05e-212) tmp = t_1; elseif (x <= 2.4e-147) tmp = Float64(-1.0 / Float64(tan(B) / x)); elseif (x <= 2.3e-42) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); t_1 = 1.0 / sin(B); tmp = 0.0; if (x <= -3.6e-63) tmp = t_0; elseif (x <= 2.05e-212) tmp = t_1; elseif (x <= 2.4e-147) tmp = -1.0 / (tan(B) / x); elseif (x <= 2.3e-42) tmp = t_1; else tmp = 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e-63], t$95$0, If[LessEqual[x, 2.05e-212], t$95$1, If[LessEqual[x, 2.4e-147], N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e-42], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{-63}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-147}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-42}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -3.60000000000000008e-63Initial program 84.4%
Taylor expanded in F around -inf 71.3%
Taylor expanded in x around inf 88.7%
mul-1-neg88.7%
associate-/l*88.6%
distribute-lft-neg-in88.6%
Simplified88.6%
add-sqr-sqrt88.4%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod0.0%
add-sqr-sqrt1.1%
clear-num1.1%
tan-quot1.1%
div-inv1.1%
frac-2neg1.1%
neg-sub01.1%
div-sub1.1%
add-sqr-sqrt0.0%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod88.5%
add-sqr-sqrt88.9%
frac-2neg88.9%
Applied egg-rr88.9%
div088.9%
neg-sub088.9%
distribute-frac-neg288.9%
Simplified88.9%
if -3.60000000000000008e-63 < x < 2.05000000000000007e-212 or 2.39999999999999998e-147 < x < 2.30000000000000004e-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%
if 2.05000000000000007e-212 < x < 2.39999999999999998e-147Initial program 91.1%
Taylor expanded in F around -inf 24.6%
Taylor expanded in x around inf 25.1%
mul-1-neg25.1%
associate-/l*25.1%
distribute-lft-neg-in25.1%
Simplified25.1%
clear-num25.1%
tan-quot25.1%
*-un-lft-identity25.1%
Applied egg-rr25.1%
*-lft-identity25.1%
Simplified25.1%
tan-quot25.1%
clear-num25.1%
associate-/l*25.1%
clear-num25.1%
frac-2neg25.1%
metadata-eval25.1%
add-sqr-sqrt0.0%
sqrt-unprod3.2%
sqr-neg3.2%
sqrt-unprod3.8%
add-sqr-sqrt3.8%
remove-double-neg3.8%
distribute-lft-neg-out3.8%
distribute-frac-neg23.8%
distribute-lft-neg-out3.8%
remove-double-neg3.8%
*-commutative3.8%
distribute-rgt-neg-out3.8%
Applied egg-rr25.1%
if 2.30000000000000004e-42 < x Initial program 94.8%
Taylor expanded in F around -inf 90.8%
Taylor expanded in x around inf 98.6%
mul-1-neg98.6%
associate-/l*98.5%
distribute-lft-neg-in98.5%
Simplified98.5%
clear-num98.4%
tan-quot98.5%
*-un-lft-identity98.5%
Applied egg-rr98.5%
*-lft-identity98.5%
Simplified98.5%
distribute-lft-neg-out98.5%
neg-sub098.5%
un-div-inv98.7%
Applied egg-rr98.7%
neg-sub098.7%
distribute-neg-frac98.7%
Simplified98.7%
Final simplification66.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.5e-54)
(/ (- -1.0 x) B)
(if (<= F 1.05e-78)
(/ x (- B))
(if (or (<= F 6e+129) (not (<= F 5.6e+155)))
(/ 1.0 (sin B))
(* x (- (/ -1.0 B) (/ 1.0 (* B x))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-78) {
tmp = x / -B;
} else if ((F <= 6e+129) || !(F <= 5.6e+155)) {
tmp = 1.0 / sin(B);
} else {
tmp = x * ((-1.0 / B) - (1.0 / (B * x)));
}
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.5d-54)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.05d-78) then
tmp = x / -b
else if ((f <= 6d+129) .or. (.not. (f <= 5.6d+155))) then
tmp = 1.0d0 / sin(b)
else
tmp = x * (((-1.0d0) / b) - (1.0d0 / (b * x)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-78) {
tmp = x / -B;
} else if ((F <= 6e+129) || !(F <= 5.6e+155)) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = x * ((-1.0 / B) - (1.0 / (B * x)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-54: tmp = (-1.0 - x) / B elif F <= 1.05e-78: tmp = x / -B elif (F <= 6e+129) or not (F <= 5.6e+155): tmp = 1.0 / math.sin(B) else: tmp = x * ((-1.0 / B) - (1.0 / (B * x))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.05e-78) tmp = Float64(x / Float64(-B)); elseif ((F <= 6e+129) || !(F <= 5.6e+155)) tmp = Float64(1.0 / sin(B)); else tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(1.0 / Float64(B * x)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-54) tmp = (-1.0 - x) / B; elseif (F <= 1.05e-78) tmp = x / -B; elseif ((F <= 6e+129) || ~((F <= 5.6e+155))) tmp = 1.0 / sin(B); else tmp = x * ((-1.0 / B) - (1.0 / (B * x))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.05e-78], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 6e+129], N[Not[LessEqual[F, 5.6e+155]], $MachinePrecision]], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(1.0 / N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-78}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+129} \lor \neg \left(F \leq 5.6 \cdot 10^{+155}\right):\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - \frac{1}{B \cdot x}\right)\\
\end{array}
\end{array}
if F < -1.50000000000000005e-54Initial program 73.2%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 51.9%
mul-1-neg51.9%
distribute-neg-frac251.9%
Simplified51.9%
if -1.50000000000000005e-54 < F < 1.05e-78Initial 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 1.05e-78 < F < 6.0000000000000006e129 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%
if 6.0000000000000006e129 < F < 5.60000000000000033e155Initial program 99.8%
Taylor expanded in F around -inf 94.1%
Taylor expanded in B around 0 63.4%
mul-1-neg63.4%
distribute-neg-frac263.4%
Simplified63.4%
Taylor expanded in x around inf 63.4%
associate-*r*63.4%
mul-1-neg63.4%
Simplified63.4%
Final simplification49.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.3e-53)
(/ (- -1.0 x) B)
(if (<= F 1.33e-46)
(/ x (- B))
(if (or (<= F 3e+126) (not (<= F 1.45e+157)))
(/ 1.0 (/ B (+ 1.0 x)))
(* x (- (/ -1.0 B) (/ 1.0 (* B x))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-53) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 3e+126) || !(F <= 1.45e+157)) {
tmp = 1.0 / (B / (1.0 + x));
} else {
tmp = x * ((-1.0 / B) - (1.0 / (B * x)));
}
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-53)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.33d-46) then
tmp = x / -b
else if ((f <= 3d+126) .or. (.not. (f <= 1.45d+157))) then
tmp = 1.0d0 / (b / (1.0d0 + x))
else
tmp = x * (((-1.0d0) / b) - (1.0d0 / (b * x)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-53) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 3e+126) || !(F <= 1.45e+157)) {
tmp = 1.0 / (B / (1.0 + x));
} else {
tmp = x * ((-1.0 / B) - (1.0 / (B * x)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-53: tmp = (-1.0 - x) / B elif F <= 1.33e-46: tmp = x / -B elif (F <= 3e+126) or not (F <= 1.45e+157): tmp = 1.0 / (B / (1.0 + x)) else: tmp = x * ((-1.0 / B) - (1.0 / (B * x))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-53) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.33e-46) tmp = Float64(x / Float64(-B)); elseif ((F <= 3e+126) || !(F <= 1.45e+157)) tmp = Float64(1.0 / Float64(B / Float64(1.0 + x))); else tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(1.0 / Float64(B * x)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-53) tmp = (-1.0 - x) / B; elseif (F <= 1.33e-46) tmp = x / -B; elseif ((F <= 3e+126) || ~((F <= 1.45e+157))) tmp = 1.0 / (B / (1.0 + x)); else tmp = x * ((-1.0 / B) - (1.0 / (B * x))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-53], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 3e+126], N[Not[LessEqual[F, 1.45e+157]], $MachinePrecision]], N[(1.0 / N[(B / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(1.0 / N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{+126} \lor \neg \left(F \leq 1.45 \cdot 10^{+157}\right):\\
\;\;\;\;\frac{1}{\frac{B}{1 + x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - \frac{1}{B \cdot x}\right)\\
\end{array}
\end{array}
if F < -1.29999999999999998e-53Initial program 73.2%
Taylor expanded in F around -inf 95.2%
Taylor expanded in B around 0 51.9%
mul-1-neg51.9%
distribute-neg-frac251.9%
Simplified51.9%
if -1.29999999999999998e-53 < 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 < 3.0000000000000002e126 or 1.44999999999999994e157 < F Initial program 56.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in B around 0 12.2%
mul-1-neg12.2%
distribute-neg-frac212.2%
Simplified12.2%
clear-num12.2%
inv-pow12.2%
add-sqr-sqrt5.6%
sqrt-unprod22.0%
sqr-neg22.0%
sqrt-unprod21.5%
add-sqr-sqrt33.0%
Applied egg-rr33.0%
unpow-133.0%
Simplified33.0%
if 3.0000000000000002e126 < F < 1.44999999999999994e157Initial program 99.8%
Taylor expanded in F around -inf 94.1%
Taylor expanded in B around 0 63.4%
mul-1-neg63.4%
distribute-neg-frac263.4%
Simplified63.4%
Taylor expanded in x around inf 63.4%
associate-*r*63.4%
mul-1-neg63.4%
Simplified63.4%
Final simplification40.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -6.8e-53)
t_0
(if (<= F 1.33e-46)
(/ x (- B))
(if (or (<= F 8.5e+124) (not (<= F 5.6e+155)))
(/ 1.0 (/ B (+ 1.0 x)))
t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -6.8e-53) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 8.5e+124) || !(F <= 5.6e+155)) {
tmp = 1.0 / (B / (1.0 + x));
} 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 <= (-6.8d-53)) then
tmp = t_0
else if (f <= 1.33d-46) then
tmp = x / -b
else if ((f <= 8.5d+124) .or. (.not. (f <= 5.6d+155))) then
tmp = 1.0d0 / (b / (1.0d0 + x))
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 <= -6.8e-53) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 8.5e+124) || !(F <= 5.6e+155)) {
tmp = 1.0 / (B / (1.0 + x));
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -6.8e-53: tmp = t_0 elif F <= 1.33e-46: tmp = x / -B elif (F <= 8.5e+124) or not (F <= 5.6e+155): tmp = 1.0 / (B / (1.0 + x)) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -6.8e-53) tmp = t_0; elseif (F <= 1.33e-46) tmp = Float64(x / Float64(-B)); elseif ((F <= 8.5e+124) || !(F <= 5.6e+155)) tmp = Float64(1.0 / Float64(B / Float64(1.0 + x))); 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 <= -6.8e-53) tmp = t_0; elseif (F <= 1.33e-46) tmp = x / -B; elseif ((F <= 8.5e+124) || ~((F <= 5.6e+155))) tmp = 1.0 / (B / (1.0 + x)); 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, -6.8e-53], t$95$0, If[LessEqual[F, 1.33e-46], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 8.5e+124], N[Not[LessEqual[F, 5.6e+155]], $MachinePrecision]], N[(1.0 / N[(B / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-53}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+124} \lor \neg \left(F \leq 5.6 \cdot 10^{+155}\right):\\
\;\;\;\;\frac{1}{\frac{B}{1 + x}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -6.8e-53 or 8.4999999999999997e124 < 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 -6.8e-53 < 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 < 8.4999999999999997e124 or 5.60000000000000033e155 < F Initial program 56.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in B around 0 12.2%
mul-1-neg12.2%
distribute-neg-frac212.2%
Simplified12.2%
clear-num12.2%
inv-pow12.2%
add-sqr-sqrt5.6%
sqrt-unprod22.0%
sqr-neg22.0%
sqrt-unprod21.5%
add-sqr-sqrt33.0%
Applied egg-rr33.0%
unpow-133.0%
Simplified33.0%
Final simplification40.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.05e-57)
t_0
(if (<= F 1.33e-46)
(/ x (- B))
(if (or (<= F 4.1e+129) (not (<= F 7.8e+158)))
(* (/ 1.0 B) (+ 1.0 x))
t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.05e-57) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 4.1e+129) || !(F <= 7.8e+158)) {
tmp = (1.0 / B) * (1.0 + x);
} 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.05d-57)) then
tmp = t_0
else if (f <= 1.33d-46) then
tmp = x / -b
else if ((f <= 4.1d+129) .or. (.not. (f <= 7.8d+158))) then
tmp = (1.0d0 / b) * (1.0d0 + x)
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.05e-57) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 4.1e+129) || !(F <= 7.8e+158)) {
tmp = (1.0 / B) * (1.0 + x);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.05e-57: tmp = t_0 elif F <= 1.33e-46: tmp = x / -B elif (F <= 4.1e+129) or not (F <= 7.8e+158): tmp = (1.0 / B) * (1.0 + x) 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.05e-57) tmp = t_0; elseif (F <= 1.33e-46) tmp = Float64(x / Float64(-B)); elseif ((F <= 4.1e+129) || !(F <= 7.8e+158)) tmp = Float64(Float64(1.0 / B) * Float64(1.0 + x)); 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.05e-57) tmp = t_0; elseif (F <= 1.33e-46) tmp = x / -B; elseif ((F <= 4.1e+129) || ~((F <= 7.8e+158))) tmp = (1.0 / B) * (1.0 + x); 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.05e-57], t$95$0, If[LessEqual[F, 1.33e-46], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 4.1e+129], N[Not[LessEqual[F, 7.8e+158]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] * N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{-57}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 4.1 \cdot 10^{+129} \lor \neg \left(F \leq 7.8 \cdot 10^{+158}\right):\\
\;\;\;\;\frac{1}{B} \cdot \left(1 + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.05e-57 or 4.1000000000000003e129 < F < 7.8e158Initial 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.05e-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 < 4.1000000000000003e129 or 7.8e158 < F Initial program 56.5%
Taylor expanded in F around -inf 33.5%
Taylor expanded in B around 0 12.2%
mul-1-neg12.2%
distribute-neg-frac212.2%
Simplified12.2%
div-inv12.2%
add-sqr-sqrt5.6%
sqrt-unprod22.0%
sqr-neg22.0%
sqrt-unprod21.5%
add-sqr-sqrt33.0%
Applied egg-rr33.0%
Final simplification40.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.3e-59)
t_0
(if (<= F 1.33e-46)
(/ x (- B))
(if (or (<= F 1.05e+128) (not (<= F 6.5e+155))) (/ (+ 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 <= -1.3e-59) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 1.05e+128) || !(F <= 6.5e+155)) {
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 <= (-1.3d-59)) then
tmp = t_0
else if (f <= 1.33d-46) then
tmp = x / -b
else if ((f <= 1.05d+128) .or. (.not. (f <= 6.5d+155))) 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 <= -1.3e-59) {
tmp = t_0;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 1.05e+128) || !(F <= 6.5e+155)) {
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 <= -1.3e-59: tmp = t_0 elif F <= 1.33e-46: tmp = x / -B elif (F <= 1.05e+128) or not (F <= 6.5e+155): 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 <= -1.3e-59) tmp = t_0; elseif (F <= 1.33e-46) tmp = Float64(x / Float64(-B)); elseif ((F <= 1.05e+128) || !(F <= 6.5e+155)) 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 <= -1.3e-59) tmp = t_0; elseif (F <= 1.33e-46) tmp = x / -B; elseif ((F <= 1.05e+128) || ~((F <= 6.5e+155))) 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, -1.3e-59], t$95$0, If[LessEqual[F, 1.33e-46], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 1.05e+128], N[Not[LessEqual[F, 6.5e+155]], $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 -1.3 \cdot 10^{-59}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{+128} \lor \neg \left(F \leq 6.5 \cdot 10^{+155}\right):\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.29999999999999999e-59 or 1.05e128 < F < 6.50000000000000046e155Initial 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.29999999999999999e-59 < 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.05e128 or 6.50000000000000046e155 < 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 -1.7e+59)
(/ -1.0 B)
(if (<= F 1.33e-46)
(/ x (- B))
(if (or (<= F 6.2e+125) (not (<= F 1.65e+159)))
(/ (+ 1.0 x) B)
(* x (/ -1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e+59) {
tmp = -1.0 / B;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 6.2e+125) || !(F <= 1.65e+159)) {
tmp = (1.0 + 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.7d+59)) then
tmp = (-1.0d0) / b
else if (f <= 1.33d-46) then
tmp = x / -b
else if ((f <= 6.2d+125) .or. (.not. (f <= 1.65d+159))) then
tmp = (1.0d0 + 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.7e+59) {
tmp = -1.0 / B;
} else if (F <= 1.33e-46) {
tmp = x / -B;
} else if ((F <= 6.2e+125) || !(F <= 1.65e+159)) {
tmp = (1.0 + x) / B;
} else {
tmp = x * (-1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e+59: tmp = -1.0 / B elif F <= 1.33e-46: tmp = x / -B elif (F <= 6.2e+125) or not (F <= 1.65e+159): tmp = (1.0 + x) / B else: tmp = x * (-1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e+59) tmp = Float64(-1.0 / B); elseif (F <= 1.33e-46) tmp = Float64(x / Float64(-B)); elseif ((F <= 6.2e+125) || !(F <= 1.65e+159)) tmp = Float64(Float64(1.0 + x) / B); else tmp = Float64(x * Float64(-1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e+59) tmp = -1.0 / B; elseif (F <= 1.33e-46) tmp = x / -B; elseif ((F <= 6.2e+125) || ~((F <= 1.65e+159))) tmp = (1.0 + x) / B; else tmp = x * (-1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e+59], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.33e-46], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 6.2e+125], N[Not[LessEqual[F, 1.65e+159]], $MachinePrecision]], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision], N[(x * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{+59}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.33 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{+125} \lor \neg \left(F \leq 1.65 \cdot 10^{+159}\right):\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{B}\\
\end{array}
\end{array}
if F < -1.70000000000000003e59Initial 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 -1.70000000000000003e59 < 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 < 6.2e125 or 1.6499999999999999e159 < 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%
if 6.2e125 < F < 1.6499999999999999e159Initial program 99.8%
Taylor expanded in F around -inf 94.1%
Taylor expanded in x around inf 94.3%
mul-1-neg94.3%
associate-/l*94.3%
distribute-lft-neg-in94.3%
Simplified94.3%
Taylor expanded in B around 0 63.4%
Final simplification35.6%
(FPCore (F B x) :precision binary64 (if (<= F -3e+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 <= -3e+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 <= (-3d+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 <= -3e+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 <= -3e+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 <= -3e+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 <= -3e+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, -3e+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 \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.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 < 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 -6.8e+56) (/ -1.0 B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e+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 <= (-6.8d+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 <= -6.8e+56) {
tmp = -1.0 / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.8e+56: tmp = -1.0 / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.8e+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 <= -6.8e+56) tmp = -1.0 / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.8e+56], N[(-1.0 / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.8 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -6.80000000000000002e56Initial 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 -6.80000000000000002e56 < 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))))))