
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.12e+69)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.8)
(- (* 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 <= -1.12e+69) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.8) {
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 <= -1.12e+69) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.8) 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, -1.12e+69], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.8], 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 -1.12 \cdot 10^{+69}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.8:\\
\;\;\;\;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 < -1.12e69Initial program 56.8%
distribute-lft-neg-in56.8%
+-commutative56.8%
cancel-sign-sub-inv56.8%
Simplified81.9%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-udef81.9%
Simplified81.9%
Taylor expanded in F around -inf 99.9%
if -1.12e69 < F < 6.79999999999999982Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
if 6.79999999999999982 < F Initial program 56.1%
distribute-lft-neg-in56.1%
+-commutative56.1%
cancel-sign-sub-inv56.1%
Simplified67.9%
Taylor expanded in x around 0 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
fma-udef68.0%
Simplified68.0%
Taylor expanded in F around inf 99.8%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+158)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.8)
(- (/ (/ F (sqrt (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 <= -5e+158) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.8) {
tmp = ((F / sqrt(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 <= -5e+158) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.8) tmp = Float64(Float64(Float64(F / sqrt(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, -5e+158], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.8], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+158}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.8:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\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 < -4.9999999999999996e158Initial program 46.9%
distribute-lft-neg-in46.9%
+-commutative46.9%
cancel-sign-sub-inv46.9%
Simplified71.2%
Taylor expanded in x around 0 71.2%
associate-*l/71.2%
*-lft-identity71.2%
+-commutative71.2%
unpow271.2%
fma-udef71.2%
Simplified71.2%
Taylor expanded in F around -inf 99.9%
if -4.9999999999999996e158 < F < 6.79999999999999982Initial program 96.4%
distribute-lft-neg-in96.4%
+-commutative96.4%
cancel-sign-sub-inv96.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
associate-*r/99.7%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 6.79999999999999982 < F Initial program 56.1%
distribute-lft-neg-in56.1%
+-commutative56.1%
cancel-sign-sub-inv56.1%
Simplified67.9%
Taylor expanded in x around 0 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
fma-udef68.0%
Simplified68.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e+16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.8)
(+
(/ -1.0 (/ (tan B) x))
(* (/ 1.0 (/ (sin B) F)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.8) {
tmp = (-1.0 / (tan(B) / x)) + ((1.0 / (sin(B) / F)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d+16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.8d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((1.0d0 / (sin(b) / f)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e+16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.8) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((1.0 / (Math.sin(B) / F)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e+16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.8: tmp = (-1.0 / (math.tan(B) / x)) + ((1.0 / (math.sin(B) / F)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.8) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(1.0 / Float64(sin(B) / F)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.8e+16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.8) tmp = (-1.0 / (tan(B) / x)) + ((1.0 / (sin(B) / F)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.8], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.8:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.8e16Initial program 64.7%
distribute-lft-neg-in64.7%
+-commutative64.7%
cancel-sign-sub-inv64.7%
Simplified85.2%
Taylor expanded in x around 0 85.2%
associate-*l/85.2%
*-lft-identity85.2%
+-commutative85.2%
unpow285.2%
fma-udef85.2%
Simplified85.2%
Taylor expanded in F around -inf 99.9%
if -3.8e16 < F < 6.79999999999999982Initial program 99.6%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
if 6.79999999999999982 < F Initial program 56.1%
distribute-lft-neg-in56.1%
+-commutative56.1%
cancel-sign-sub-inv56.1%
Simplified67.9%
Taylor expanded in x around 0 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
fma-udef68.0%
Simplified68.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e+16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.8)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B)))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.8) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d+16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.8d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e+16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.8) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e+16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.8: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.8) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.8e+16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.8) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.8], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.8:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.8e16Initial program 64.7%
distribute-lft-neg-in64.7%
+-commutative64.7%
cancel-sign-sub-inv64.7%
Simplified85.2%
Taylor expanded in x around 0 85.2%
associate-*l/85.2%
*-lft-identity85.2%
+-commutative85.2%
unpow285.2%
fma-udef85.2%
Simplified85.2%
Taylor expanded in F around -inf 99.9%
if -3.8e16 < F < 6.79999999999999982Initial program 99.6%
if 6.79999999999999982 < F Initial program 56.1%
distribute-lft-neg-in56.1%
+-commutative56.1%
cancel-sign-sub-inv56.1%
Simplified67.9%
Taylor expanded in x around 0 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
fma-udef68.0%
Simplified68.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e+16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.8)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.8) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d+16)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.8d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e+16) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.8) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e+16: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.8: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.8) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.8e+16) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.8) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.8], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 6.8:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.8e16Initial program 64.7%
distribute-lft-neg-in64.7%
+-commutative64.7%
cancel-sign-sub-inv64.7%
Simplified85.2%
Taylor expanded in x around 0 85.2%
associate-*l/85.2%
*-lft-identity85.2%
+-commutative85.2%
unpow285.2%
fma-udef85.2%
Simplified85.2%
Taylor expanded in F around -inf 99.9%
if -3.8e16 < F < 6.79999999999999982Initial program 99.6%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
if 6.79999999999999982 < F Initial program 56.1%
distribute-lft-neg-in56.1%
+-commutative56.1%
cancel-sign-sub-inv56.1%
Simplified67.9%
Taylor expanded in x around 0 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
fma-udef68.0%
Simplified68.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.94)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.9)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.94) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.94d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.9d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.94) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.94: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.9: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.94) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.9) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.94) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.9) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.94], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.9], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.94:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.93999999999999995Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
associate-*r/85.7%
sqrt-div85.7%
metadata-eval85.7%
un-div-inv85.8%
Applied egg-rr85.8%
Taylor expanded in F around -inf 99.4%
mul-1-neg99.4%
Simplified99.4%
if -0.93999999999999995 < F < 0.900000000000000022Initial program 99.6%
distribute-lft-neg-in99.6%
+-commutative99.6%
cancel-sign-sub-inv99.6%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
Taylor expanded in F around 0 99.1%
associate-/l*99.1%
Simplified99.1%
if 0.900000000000000022 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
cancel-sign-sub-inv56.6%
Simplified68.3%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-udef68.4%
Simplified68.4%
associate-*r/68.4%
sqrt-div68.4%
metadata-eval68.4%
un-div-inv68.5%
Applied egg-rr68.5%
Taylor expanded in F around inf 98.8%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ (sqrt 0.5) (/ (sin B) F)) (/ x B))))
(if (<= F -0.98)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F -7.2e-144)
t_1
(if (<= F 4.9e-194)
(/ (- x) (tan B))
(if (<= F 0.0145) t_1 (- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (sqrt(0.5) / (sin(B) / F)) - (x / B);
double tmp;
if (F <= -0.98) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= -7.2e-144) {
tmp = t_1;
} else if (F <= 4.9e-194) {
tmp = -x / tan(B);
} else if (F <= 0.0145) {
tmp = t_1;
} else {
tmp = ((F / (F + (1.0 / F))) / 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (sqrt(0.5d0) / (sin(b) / f)) - (x / b)
if (f <= (-0.98d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= (-7.2d-144)) then
tmp = t_1
else if (f <= 4.9d-194) then
tmp = -x / tan(b)
else if (f <= 0.0145d0) then
tmp = t_1
else
tmp = ((f / (f + (1.0d0 / f))) / 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 t_1 = (Math.sqrt(0.5) / (Math.sin(B) / F)) - (x / B);
double tmp;
if (F <= -0.98) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= -7.2e-144) {
tmp = t_1;
} else if (F <= 4.9e-194) {
tmp = -x / Math.tan(B);
} else if (F <= 0.0145) {
tmp = t_1;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (math.sqrt(0.5) / (math.sin(B) / F)) - (x / B) tmp = 0 if F <= -0.98: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= -7.2e-144: tmp = t_1 elif F <= 4.9e-194: tmp = -x / math.tan(B) elif F <= 0.0145: tmp = t_1 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - Float64(x / B)) tmp = 0.0 if (F <= -0.98) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= -7.2e-144) tmp = t_1; elseif (F <= 4.9e-194) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.0145) tmp = t_1; else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (sqrt(0.5) / (sin(B) / F)) - (x / B); tmp = 0.0; if (F <= -0.98) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= -7.2e-144) tmp = t_1; elseif (F <= 4.9e-194) tmp = -x / tan(B); elseif (F <= 0.0145) tmp = t_1; else tmp = ((F / (F + (1.0 / F))) / sin(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[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.98], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -7.2e-144], t$95$1, If[LessEqual[F, 4.9e-194], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0145], t$95$1, N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.98:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -7.2 \cdot 10^{-144}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{-194}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.0145:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.97999999999999998Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
associate-*r/85.7%
sqrt-div85.7%
metadata-eval85.7%
un-div-inv85.8%
Applied egg-rr85.8%
Taylor expanded in F around -inf 99.4%
sub-neg99.4%
unpow299.4%
metadata-eval99.4%
Simplified99.4%
if -0.97999999999999998 < F < -7.2000000000000001e-144 or 4.90000000000000004e-194 < F < 0.0145000000000000007Initial program 99.6%
*-commutative99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
un-div-inv99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.4%
Taylor expanded in B around 0 74.6%
Taylor expanded in x around 0 74.6%
if -7.2000000000000001e-144 < F < 4.90000000000000004e-194Initial program 99.6%
Taylor expanded in F around -inf 30.6%
Taylor expanded in x around inf 85.3%
mul-1-neg85.3%
associate-/l*85.3%
distribute-neg-frac85.3%
Simplified85.3%
tan-quot85.5%
expm1-log1p-u69.3%
expm1-udef33.2%
Applied egg-rr33.2%
expm1-def69.3%
expm1-log1p85.5%
Simplified85.5%
if 0.0145000000000000007 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
cancel-sign-sub-inv56.6%
Simplified68.3%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-udef68.4%
Simplified68.4%
associate-*r/68.4%
sqrt-div68.4%
metadata-eval68.4%
un-div-inv68.5%
Applied egg-rr68.5%
Taylor expanded in F around inf 98.8%
Final simplification90.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (sqrt 0.5) (/ (sin B) F)) (/ x B))) (t_1 (/ x (tan B))))
(if (<= F -0.4)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_1)
(if (<= F -7.8e-144)
t_0
(if (<= F 3.1e-192)
(/ (- x) (tan B))
(if (<= F 0.405) t_0 (- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (sqrt(0.5) / (sin(B) / F)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.4) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1;
} else if (F <= -7.8e-144) {
tmp = t_0;
} else if (F <= 3.1e-192) {
tmp = -x / tan(B);
} else if (F <= 0.405) {
tmp = t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (sqrt(0.5d0) / (sin(b) / f)) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.4d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_1
else if (f <= (-7.8d-144)) then
tmp = t_0
else if (f <= 3.1d-192) then
tmp = -x / tan(b)
else if (f <= 0.405d0) then
tmp = t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.sqrt(0.5) / (Math.sin(B) / F)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.4) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_1;
} else if (F <= -7.8e-144) {
tmp = t_0;
} else if (F <= 3.1e-192) {
tmp = -x / Math.tan(B);
} else if (F <= 0.405) {
tmp = t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt(0.5) / (math.sin(B) / F)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.4: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_1 elif F <= -7.8e-144: tmp = t_0 elif F <= 3.1e-192: tmp = -x / math.tan(B) elif F <= 0.405: tmp = t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.4) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_1); elseif (F <= -7.8e-144) tmp = t_0; elseif (F <= 3.1e-192) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.405) tmp = t_0; else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (sqrt(0.5) / (sin(B) / F)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.4) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1; elseif (F <= -7.8e-144) tmp = t_0; elseif (F <= 3.1e-192) tmp = -x / tan(B); elseif (F <= 0.405) tmp = t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.4], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -7.8e-144], t$95$0, If[LessEqual[F, 3.1e-192], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.405], t$95$0, N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.4:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -7.8 \cdot 10^{-144}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-192}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.405:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.40000000000000002Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
associate-*r/85.7%
sqrt-div85.7%
metadata-eval85.7%
un-div-inv85.8%
Applied egg-rr85.8%
Taylor expanded in F around -inf 99.4%
mul-1-neg99.4%
Simplified99.4%
if -0.40000000000000002 < F < -7.8000000000000003e-144 or 3.1e-192 < F < 0.40500000000000003Initial program 99.6%
*-commutative99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
un-div-inv99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.4%
Taylor expanded in B around 0 74.6%
Taylor expanded in x around 0 74.6%
if -7.8000000000000003e-144 < F < 3.1e-192Initial program 99.6%
Taylor expanded in F around -inf 30.6%
Taylor expanded in x around inf 85.3%
mul-1-neg85.3%
associate-/l*85.3%
distribute-neg-frac85.3%
Simplified85.3%
tan-quot85.5%
expm1-log1p-u69.3%
expm1-udef33.2%
Applied egg-rr33.2%
expm1-def69.3%
expm1-log1p85.5%
Simplified85.5%
if 0.40500000000000003 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
cancel-sign-sub-inv56.6%
Simplified68.3%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-udef68.4%
Simplified68.4%
associate-*r/68.4%
sqrt-div68.4%
metadata-eval68.4%
un-div-inv68.5%
Applied egg-rr68.5%
Taylor expanded in F around inf 98.8%
Final simplification90.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00075)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F -6.4e-142)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 1.5e-195)
(/ (- x) (tan B))
(if (<= F 0.182)
(- (/ (sqrt 0.5) (/ (sin B) F)) (/ x B))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.00075) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= -6.4e-142) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.5e-195) {
tmp = -x / tan(B);
} else if (F <= 0.182) {
tmp = (sqrt(0.5) / (sin(B) / F)) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.00075d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= (-6.4d-142)) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 1.5d-195) then
tmp = -x / tan(b)
else if (f <= 0.182d0) then
tmp = (sqrt(0.5d0) / (sin(b) / f)) - (x / b)
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.00075) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= -6.4e-142) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.5e-195) {
tmp = -x / Math.tan(B);
} else if (F <= 0.182) {
tmp = (Math.sqrt(0.5) / (Math.sin(B) / F)) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.00075: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= -6.4e-142: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 1.5e-195: tmp = -x / math.tan(B) elif F <= 0.182: tmp = (math.sqrt(0.5) / (math.sin(B) / F)) - (x / B) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00075) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= -6.4e-142) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 1.5e-195) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.182) tmp = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - Float64(x / B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.00075) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= -6.4e-142) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 1.5e-195) tmp = -x / tan(B); elseif (F <= 0.182) tmp = (sqrt(0.5) / (sin(B) / F)) - (x / B); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00075], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -6.4e-142], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e-195], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.182], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00075:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-142}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-195}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.182:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.5000000000000002e-4Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
associate-*r/85.7%
sqrt-div85.7%
metadata-eval85.7%
un-div-inv85.8%
Applied egg-rr85.8%
Taylor expanded in F around -inf 99.4%
mul-1-neg99.4%
Simplified99.4%
if -7.5000000000000002e-4 < F < -6.3999999999999997e-142Initial program 99.5%
*-commutative99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
clear-num99.5%
un-div-inv99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 75.2%
Taylor expanded in B around inf 75.3%
if -6.3999999999999997e-142 < F < 1.5e-195Initial program 99.6%
Taylor expanded in F around -inf 30.6%
Taylor expanded in x around inf 85.3%
mul-1-neg85.3%
associate-/l*85.3%
distribute-neg-frac85.3%
Simplified85.3%
tan-quot85.5%
expm1-log1p-u69.3%
expm1-udef33.2%
Applied egg-rr33.2%
expm1-def69.3%
expm1-log1p85.5%
Simplified85.5%
if 1.5e-195 < F < 0.182Initial program 99.6%
*-commutative99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
un-div-inv99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 97.8%
Taylor expanded in B around 0 74.2%
Taylor expanded in x around 0 74.2%
if 0.182 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
cancel-sign-sub-inv56.6%
Simplified68.3%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-udef68.4%
Simplified68.4%
associate-*r/68.4%
sqrt-div68.4%
metadata-eval68.4%
un-div-inv68.5%
Applied egg-rr68.5%
Taylor expanded in F around inf 98.8%
Final simplification90.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0062)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.0053)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0062) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.0053) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.0062d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.0053d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.0062) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.0053) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0062: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.0053: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0062) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.0053) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0062) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.0053) tmp = (x * (-1.0 / tan(B))) + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0062], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0053], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0062:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0053:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.00619999999999999978Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
associate-*r/85.7%
sqrt-div85.7%
metadata-eval85.7%
un-div-inv85.8%
Applied egg-rr85.8%
Taylor expanded in F around -inf 99.4%
mul-1-neg99.4%
Simplified99.4%
if -0.00619999999999999978 < F < 0.00530000000000000002Initial program 99.6%
*-commutative99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
un-div-inv99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.4%
Taylor expanded in B around 0 83.1%
if 0.00530000000000000002 < F Initial program 57.2%
distribute-lft-neg-in57.2%
+-commutative57.2%
cancel-sign-sub-inv57.2%
Simplified68.7%
Taylor expanded in x around 0 68.8%
associate-*l/68.8%
*-lft-identity68.8%
+-commutative68.8%
unpow268.8%
fma-udef68.8%
Simplified68.8%
associate-*r/68.9%
sqrt-div68.8%
metadata-eval68.8%
un-div-inv68.9%
Applied egg-rr68.9%
Taylor expanded in F around inf 97.7%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (sqrt 0.5) (/ (sin B) F)) (/ x B))) (t_1 (/ x (tan B))))
(if (<= F -0.000156)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.8e-142)
t_0
(if (<= F 5.4e-196)
(/ (- x) (tan B))
(if (<= F 0.46) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (sqrt(0.5) / (sin(B) / F)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.000156) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.8e-142) {
tmp = t_0;
} else if (F <= 5.4e-196) {
tmp = -x / tan(B);
} else if (F <= 0.46) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (sqrt(0.5d0) / (sin(b) / f)) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.000156d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-5.8d-142)) then
tmp = t_0
else if (f <= 5.4d-196) then
tmp = -x / tan(b)
else if (f <= 0.46d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.sqrt(0.5) / (Math.sin(B) / F)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.000156) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -5.8e-142) {
tmp = t_0;
} else if (F <= 5.4e-196) {
tmp = -x / Math.tan(B);
} else if (F <= 0.46) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt(0.5) / (math.sin(B) / F)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.000156: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -5.8e-142: tmp = t_0 elif F <= 5.4e-196: tmp = -x / math.tan(B) elif F <= 0.46: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000156) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.8e-142) tmp = t_0; elseif (F <= 5.4e-196) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.46) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (sqrt(0.5) / (sin(B) / F)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.000156) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -5.8e-142) tmp = t_0; elseif (F <= 5.4e-196) tmp = -x / tan(B); elseif (F <= 0.46) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000156], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.8e-142], t$95$0, If[LessEqual[F, 5.4e-196], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.46], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000156:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{-142}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-196}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.46:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1.56e-4Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
Taylor expanded in F around -inf 99.0%
if -1.56e-4 < F < -5.7999999999999998e-142 or 5.39999999999999963e-196 < F < 0.46000000000000002Initial program 99.6%
*-commutative99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
un-div-inv99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.4%
Taylor expanded in B around 0 74.6%
Taylor expanded in x around 0 74.6%
if -5.7999999999999998e-142 < F < 5.39999999999999963e-196Initial program 99.6%
Taylor expanded in F around -inf 30.6%
Taylor expanded in x around inf 85.3%
mul-1-neg85.3%
associate-/l*85.3%
distribute-neg-frac85.3%
Simplified85.3%
tan-quot85.5%
expm1-log1p-u69.3%
expm1-udef33.2%
Applied egg-rr33.2%
expm1-def69.3%
expm1-log1p85.5%
Simplified85.5%
if 0.46000000000000002 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
cancel-sign-sub-inv56.6%
Simplified68.3%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-udef68.4%
Simplified68.4%
Taylor expanded in F around inf 98.7%
Final simplification89.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ (sqrt 0.5) (/ (sin B) F)) (/ x B))))
(if (<= F -0.15)
(- (/ (+ -1.0 (/ 1.0 (* F F))) (sin B)) t_0)
(if (<= F -1.06e-142)
t_1
(if (<= F 3.9e-197)
(/ (- x) (tan B))
(if (<= F 0.06) t_1 (- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (sqrt(0.5) / (sin(B) / F)) - (x / B);
double tmp;
if (F <= -0.15) {
tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0;
} else if (F <= -1.06e-142) {
tmp = t_1;
} else if (F <= 3.9e-197) {
tmp = -x / tan(B);
} else if (F <= 0.06) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (sqrt(0.5d0) / (sin(b) / f)) - (x / b)
if (f <= (-0.15d0)) then
tmp = (((-1.0d0) + (1.0d0 / (f * f))) / sin(b)) - t_0
else if (f <= (-1.06d-142)) then
tmp = t_1
else if (f <= 3.9d-197) then
tmp = -x / tan(b)
else if (f <= 0.06d0) then
tmp = t_1
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 t_1 = (Math.sqrt(0.5) / (Math.sin(B) / F)) - (x / B);
double tmp;
if (F <= -0.15) {
tmp = ((-1.0 + (1.0 / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= -1.06e-142) {
tmp = t_1;
} else if (F <= 3.9e-197) {
tmp = -x / Math.tan(B);
} else if (F <= 0.06) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (math.sqrt(0.5) / (math.sin(B) / F)) - (x / B) tmp = 0 if F <= -0.15: tmp = ((-1.0 + (1.0 / (F * F))) / math.sin(B)) - t_0 elif F <= -1.06e-142: tmp = t_1 elif F <= 3.9e-197: tmp = -x / math.tan(B) elif F <= 0.06: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(sqrt(0.5) / Float64(sin(B) / F)) - Float64(x / B)) tmp = 0.0 if (F <= -0.15) tmp = Float64(Float64(Float64(-1.0 + Float64(1.0 / Float64(F * F))) / sin(B)) - t_0); elseif (F <= -1.06e-142) tmp = t_1; elseif (F <= 3.9e-197) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.06) tmp = t_1; 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); t_1 = (sqrt(0.5) / (sin(B) / F)) - (x / B); tmp = 0.0; if (F <= -0.15) tmp = ((-1.0 + (1.0 / (F * F))) / sin(B)) - t_0; elseif (F <= -1.06e-142) tmp = t_1; elseif (F <= 3.9e-197) tmp = -x / tan(B); elseif (F <= 0.06) tmp = t_1; 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]}, Block[{t$95$1 = N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.15], N[(N[(N[(-1.0 + N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.06e-142], t$95$1, If[LessEqual[F, 3.9e-197], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.06], t$95$1, 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}\\
t_1 := \frac{\sqrt{0.5}}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.15:\\
\;\;\;\;\frac{-1 + \frac{1}{F \cdot F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -1.06 \cdot 10^{-142}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{-197}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.06:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.149999999999999994Initial program 65.8%
distribute-lft-neg-in65.8%
+-commutative65.8%
cancel-sign-sub-inv65.8%
Simplified85.7%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-udef85.7%
Simplified85.7%
associate-*r/85.7%
sqrt-div85.7%
metadata-eval85.7%
un-div-inv85.8%
Applied egg-rr85.8%
Taylor expanded in F around -inf 99.4%
sub-neg99.4%
unpow299.4%
metadata-eval99.4%
Simplified99.4%
if -0.149999999999999994 < F < -1.05999999999999999e-142 or 3.8999999999999999e-197 < F < 0.059999999999999998Initial program 99.6%
*-commutative99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
clear-num99.6%
un-div-inv99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 98.4%
Taylor expanded in B around 0 74.6%
Taylor expanded in x around 0 74.6%
if -1.05999999999999999e-142 < F < 3.8999999999999999e-197Initial program 99.6%
Taylor expanded in F around -inf 30.6%
Taylor expanded in x around inf 85.3%
mul-1-neg85.3%
associate-/l*85.3%
distribute-neg-frac85.3%
Simplified85.3%
tan-quot85.5%
expm1-log1p-u69.3%
expm1-udef33.2%
Applied egg-rr33.2%
expm1-def69.3%
expm1-log1p85.5%
Simplified85.5%
if 0.059999999999999998 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
cancel-sign-sub-inv56.6%
Simplified68.3%
Taylor expanded in x around 0 68.4%
associate-*l/68.4%
*-lft-identity68.4%
+-commutative68.4%
unpow268.4%
fma-udef68.4%
Simplified68.4%
Taylor expanded in F around inf 98.7%
Final simplification89.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.1e-22)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5e-41) (/ (- 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 <= -2.1e-22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5e-41) {
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 <= (-2.1d-22)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d-41) 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 <= -2.1e-22) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5e-41) {
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 <= -2.1e-22: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5e-41: 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 <= -2.1e-22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5e-41) 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 <= -2.1e-22) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5e-41) 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, -2.1e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e-41], 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.1 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-41}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.10000000000000008e-22Initial program 67.9%
distribute-lft-neg-in67.9%
+-commutative67.9%
cancel-sign-sub-inv67.9%
Simplified86.5%
Taylor expanded in x around 0 86.5%
associate-*l/86.5%
*-lft-identity86.5%
+-commutative86.5%
unpow286.5%
fma-udef86.5%
Simplified86.5%
Taylor expanded in F around -inf 94.9%
if -2.10000000000000008e-22 < F < 1.49999999999999994e-41Initial program 99.6%
Taylor expanded in F around -inf 32.9%
Taylor expanded in x around inf 71.4%
mul-1-neg71.4%
associate-/l*71.5%
distribute-neg-frac71.5%
Simplified71.5%
tan-quot71.6%
expm1-log1p-u58.0%
expm1-udef26.3%
Applied egg-rr26.3%
expm1-def58.0%
expm1-log1p71.6%
Simplified71.6%
if 1.49999999999999994e-41 < F Initial program 62.6%
distribute-lft-neg-in62.6%
+-commutative62.6%
cancel-sign-sub-inv62.6%
Simplified72.6%
Taylor expanded in x around 0 72.6%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-udef72.7%
Simplified72.7%
Taylor expanded in F around inf 90.7%
Final simplification84.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.95e-28)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.1e-17)
(/ (- x) (tan B))
(if (<= F 6e+85)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.95e-28) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.1e-17) {
tmp = -x / tan(B);
} else if (F <= 6e+85) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.95d-28)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.1d-17) then
tmp = -x / tan(b)
else if (f <= 6d+85) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.95e-28) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.1e-17) {
tmp = -x / Math.tan(B);
} else if (F <= 6e+85) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.95e-28: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.1e-17: tmp = -x / math.tan(B) elif F <= 6e+85: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.95e-28) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.1e-17) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 6e+85) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.95e-28) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.1e-17) tmp = -x / tan(B); elseif (F <= 6e+85) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.95e-28], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.1e-17], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+85], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / 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}\\
\mathbf{if}\;F \leq -3.95 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 5.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+85}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.9499999999999999e-28Initial program 67.9%
distribute-lft-neg-in67.9%
+-commutative67.9%
cancel-sign-sub-inv67.9%
Simplified86.5%
Taylor expanded in x around 0 86.5%
associate-*l/86.5%
*-lft-identity86.5%
+-commutative86.5%
unpow286.5%
fma-udef86.5%
Simplified86.5%
Taylor expanded in F around -inf 94.9%
if -3.9499999999999999e-28 < F < 5.1000000000000003e-17Initial program 99.6%
Taylor expanded in F around -inf 34.8%
Taylor expanded in x around inf 71.2%
mul-1-neg71.2%
associate-/l*71.3%
distribute-neg-frac71.3%
Simplified71.3%
tan-quot71.4%
expm1-log1p-u58.5%
expm1-udef28.5%
Applied egg-rr28.5%
expm1-def58.5%
expm1-log1p71.4%
Simplified71.4%
if 5.1000000000000003e-17 < F < 6.0000000000000001e85Initial program 96.2%
Taylor expanded in F around inf 75.2%
Taylor expanded in B around 0 72.3%
if 6.0000000000000001e85 < F Initial program 39.6%
distribute-lft-neg-in39.6%
+-commutative39.6%
cancel-sign-sub-inv39.6%
Simplified54.5%
Taylor expanded in F around inf 99.4%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 71.6%
Final simplification77.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -9e+213)
t_0
(if (<= F -1.85e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.45e-17)
t_0
(if (<= F 6.2e+86)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (F <= -9e+213) {
tmp = t_0;
} else if (F <= -1.85e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.45e-17) {
tmp = t_0;
} else if (F <= 6.2e+86) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-9d+213)) then
tmp = t_0
else if (f <= (-1.85d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.45d-17) then
tmp = t_0
else if (f <= 6.2d+86) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double tmp;
if (F <= -9e+213) {
tmp = t_0;
} else if (F <= -1.85e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.45e-17) {
tmp = t_0;
} else if (F <= 6.2e+86) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) tmp = 0 if F <= -9e+213: tmp = t_0 elif F <= -1.85e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.45e-17: tmp = t_0 elif F <= 6.2e+86: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -9e+213) tmp = t_0; elseif (F <= -1.85e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.45e-17) tmp = t_0; elseif (F <= 6.2e+86) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); tmp = 0.0; if (F <= -9e+213) tmp = t_0; elseif (F <= -1.85e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.45e-17) tmp = t_0; elseif (F <= 6.2e+86) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9e+213], t$95$0, If[LessEqual[F, -1.85e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e-17], t$95$0, If[LessEqual[F, 6.2e+86], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{+213}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.85 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{-17}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{+86}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.0000000000000003e213 or -1.84999999999999994e-13 < F < 2.45000000000000006e-17Initial program 92.9%
Taylor expanded in F around -inf 45.8%
Taylor expanded in x around inf 72.8%
mul-1-neg72.8%
associate-/l*72.8%
distribute-neg-frac72.8%
Simplified72.8%
tan-quot72.9%
expm1-log1p-u60.1%
expm1-udef32.5%
Applied egg-rr32.5%
expm1-def60.1%
expm1-log1p72.9%
Simplified72.9%
if -9.0000000000000003e213 < F < -1.84999999999999994e-13Initial program 71.1%
Taylor expanded in F around -inf 94.0%
Taylor expanded in B around 0 81.2%
if 2.45000000000000006e-17 < F < 6.2000000000000004e86Initial program 96.2%
Taylor expanded in F around inf 75.2%
Taylor expanded in B around 0 72.3%
if 6.2000000000000004e86 < F Initial program 39.6%
distribute-lft-neg-in39.6%
+-commutative39.6%
cancel-sign-sub-inv39.6%
Simplified54.5%
Taylor expanded in F around inf 99.4%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 71.6%
Final simplification73.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -7e+192)
t_0
(if (<= F -1.2e-10)
(+
(/ (- -1.0 x) B)
(* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (or (<= F 60000000000000.0)
(and (not (<= F 3.1e+223)) (<= F 4.3e+288)))
t_0
(/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (F <= -7e+192) {
tmp = t_0;
} else if (F <= -1.2e-10) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if ((F <= 60000000000000.0) || (!(F <= 3.1e+223) && (F <= 4.3e+288))) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-7d+192)) then
tmp = t_0
else if (f <= (-1.2d-10)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if ((f <= 60000000000000.0d0) .or. (.not. (f <= 3.1d+223)) .and. (f <= 4.3d+288)) then
tmp = t_0
else
tmp = (1.0d0 - x) / 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 <= -7e+192) {
tmp = t_0;
} else if (F <= -1.2e-10) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if ((F <= 60000000000000.0) || (!(F <= 3.1e+223) && (F <= 4.3e+288))) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) tmp = 0 if F <= -7e+192: tmp = t_0 elif F <= -1.2e-10: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif (F <= 60000000000000.0) or (not (F <= 3.1e+223) and (F <= 4.3e+288)): tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -7e+192) tmp = t_0; elseif (F <= -1.2e-10) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif ((F <= 60000000000000.0) || (!(F <= 3.1e+223) && (F <= 4.3e+288))) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); tmp = 0.0; if (F <= -7e+192) tmp = t_0; elseif (F <= -1.2e-10) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif ((F <= 60000000000000.0) || (~((F <= 3.1e+223)) && (F <= 4.3e+288))) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7e+192], t$95$0, If[LessEqual[F, -1.2e-10], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 60000000000000.0], And[N[Not[LessEqual[F, 3.1e+223]], $MachinePrecision], LessEqual[F, 4.3e+288]]], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{+192}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 60000000000000 \lor \neg \left(F \leq 3.1 \cdot 10^{+223}\right) \land F \leq 4.3 \cdot 10^{+288}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.99999999999999965e192 or -1.2e-10 < F < 6e13 or 3.09999999999999982e223 < F < 4.3000000000000002e288Initial program 88.1%
Taylor expanded in F around -inf 46.6%
Taylor expanded in x around inf 67.8%
mul-1-neg67.8%
associate-/l*67.8%
distribute-neg-frac67.8%
Simplified67.8%
tan-quot68.0%
expm1-log1p-u56.2%
expm1-udef31.3%
Applied egg-rr31.3%
expm1-def56.2%
expm1-log1p68.0%
Simplified68.0%
if -6.99999999999999965e192 < F < -1.2e-10Initial program 75.4%
Taylor expanded in F around -inf 95.7%
Taylor expanded in B around 0 41.3%
if 6e13 < F < 3.09999999999999982e223 or 4.3000000000000002e288 < F Initial program 54.5%
distribute-lft-neg-in54.5%
+-commutative54.5%
cancel-sign-sub-inv54.5%
Simplified68.3%
Taylor expanded in F around inf 99.4%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in B around 0 58.7%
Final simplification62.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -8.5e+191)
t_0
(if (<= F -1.2e-10)
(+
(/ (- -1.0 x) B)
(* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 1.6e-44) t_0 (- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (F <= -8.5e+191) {
tmp = t_0;
} else if (F <= -1.2e-10) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.6e-44) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-8.5d+191)) then
tmp = t_0
else if (f <= (-1.2d-10)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 1.6d-44) then
tmp = t_0
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double tmp;
if (F <= -8.5e+191) {
tmp = t_0;
} else if (F <= -1.2e-10) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.6e-44) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) tmp = 0 if F <= -8.5e+191: tmp = t_0 elif F <= -1.2e-10: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 1.6e-44: tmp = t_0 else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -8.5e+191) tmp = t_0; elseif (F <= -1.2e-10) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 1.6e-44) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); tmp = 0.0; if (F <= -8.5e+191) tmp = t_0; elseif (F <= -1.2e-10) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 1.6e-44) tmp = t_0; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.5e+191], t$95$0, If[LessEqual[F, -1.2e-10], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-44], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -8.5 \cdot 10^{+191}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-44}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.4999999999999999e191 or -1.2e-10 < F < 1.59999999999999997e-44Initial program 90.6%
Taylor expanded in F around -inf 46.2%
Taylor expanded in x around inf 71.9%
mul-1-neg71.9%
associate-/l*71.9%
distribute-neg-frac71.9%
Simplified71.9%
tan-quot72.0%
expm1-log1p-u59.1%
expm1-udef30.5%
Applied egg-rr30.5%
expm1-def59.1%
expm1-log1p72.0%
Simplified72.0%
if -8.4999999999999999e191 < F < -1.2e-10Initial program 75.4%
Taylor expanded in F around -inf 95.7%
Taylor expanded in B around 0 41.3%
if 1.59999999999999997e-44 < F Initial program 62.6%
distribute-lft-neg-in62.6%
+-commutative62.6%
cancel-sign-sub-inv62.6%
Simplified72.6%
Taylor expanded in F around inf 90.4%
associate-/r*90.5%
Simplified90.5%
Taylor expanded in B around 0 62.8%
Final simplification64.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -9e+213)
t_0
(if (<= F -1.7e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.2e-45) t_0 (- (/ 1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (F <= -9e+213) {
tmp = t_0;
} else if (F <= -1.7e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.2e-45) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-9d+213)) then
tmp = t_0
else if (f <= (-1.7d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.2d-45) then
tmp = t_0
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double tmp;
if (F <= -9e+213) {
tmp = t_0;
} else if (F <= -1.7e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.2e-45) {
tmp = t_0;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) tmp = 0 if F <= -9e+213: tmp = t_0 elif F <= -1.7e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.2e-45: tmp = t_0 else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -9e+213) tmp = t_0; elseif (F <= -1.7e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.2e-45) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); tmp = 0.0; if (F <= -9e+213) tmp = t_0; elseif (F <= -1.7e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.2e-45) tmp = t_0; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9e+213], t$95$0, If[LessEqual[F, -1.7e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-45], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -9 \cdot 10^{+213}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-45}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.0000000000000003e213 or -1.70000000000000008e-13 < F < 3.20000000000000007e-45Initial program 92.6%
Taylor expanded in F around -inf 44.8%
Taylor expanded in x around inf 73.0%
mul-1-neg73.0%
associate-/l*73.0%
distribute-neg-frac73.0%
Simplified73.0%
tan-quot73.2%
expm1-log1p-u59.8%
expm1-udef30.9%
Applied egg-rr30.9%
expm1-def59.8%
expm1-log1p73.2%
Simplified73.2%
if -9.0000000000000003e213 < F < -1.70000000000000008e-13Initial program 71.1%
Taylor expanded in F around -inf 94.0%
Taylor expanded in B around 0 81.2%
if 3.20000000000000007e-45 < F Initial program 62.6%
distribute-lft-neg-in62.6%
+-commutative62.6%
cancel-sign-sub-inv62.6%
Simplified72.6%
Taylor expanded in F around inf 90.4%
associate-/r*90.5%
Simplified90.5%
Taylor expanded in B around 0 62.8%
Final simplification70.9%
(FPCore (F B x) :precision binary64 (if (<= F -4.8e-74) (/ (- -1.0 x) B) (if (<= F 1.25e-42) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-74) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.25e-42) {
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 <= (-4.8d-74)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.25d-42) 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 <= -4.8e-74) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.25e-42) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-74: tmp = (-1.0 - x) / B elif F <= 1.25e-42: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-74) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.25e-42) tmp = Float64(Float64(-x) / 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 <= -4.8e-74) tmp = (-1.0 - x) / B; elseif (F <= 1.25e-42) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-74], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.25e-42], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-42}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.7999999999999998e-74Initial program 72.5%
Taylor expanded in F around -inf 85.5%
Taylor expanded in B around 0 39.4%
associate-*r/39.4%
distribute-lft-in39.4%
metadata-eval39.4%
neg-mul-139.4%
Simplified39.4%
if -4.7999999999999998e-74 < F < 1.25000000000000001e-42Initial program 99.6%
Taylor expanded in F around -inf 33.2%
Taylor expanded in B around 0 23.8%
associate-*r/23.8%
distribute-lft-in23.8%
metadata-eval23.8%
neg-mul-123.8%
Simplified23.8%
Taylor expanded in x around inf 44.3%
mul-1-neg44.3%
distribute-neg-frac44.3%
Simplified44.3%
if 1.25000000000000001e-42 < F Initial program 62.6%
distribute-lft-neg-in62.6%
+-commutative62.6%
cancel-sign-sub-inv62.6%
Simplified72.6%
Taylor expanded in F around inf 90.4%
associate-/r*90.5%
Simplified90.5%
Taylor expanded in B around 0 45.3%
Final simplification43.2%
(FPCore (F B x) :precision binary64 (if (<= F 1.65e-42) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.65e-42) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.65d-42) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.65e-42) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.65e-42: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.65e-42) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.65e-42) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.65e-42], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.65 \cdot 10^{-42}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.6500000000000001e-42Initial program 87.4%
Taylor expanded in F around -inf 56.7%
Taylor expanded in B around 0 30.8%
associate-*r/30.8%
distribute-lft-in30.8%
metadata-eval30.8%
neg-mul-130.8%
Simplified30.8%
Taylor expanded in x around inf 33.9%
mul-1-neg33.9%
distribute-neg-frac33.9%
Simplified33.9%
if 1.6500000000000001e-42 < F Initial program 62.6%
distribute-lft-neg-in62.6%
+-commutative62.6%
cancel-sign-sub-inv62.6%
Simplified72.6%
Taylor expanded in F around inf 90.4%
associate-/r*90.5%
Simplified90.5%
Taylor expanded in B around 0 45.3%
Final simplification37.8%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 79.0%
Taylor expanded in F around -inf 50.5%
Taylor expanded in B around 0 27.8%
associate-*r/27.8%
distribute-lft-in27.8%
metadata-eval27.8%
neg-mul-127.8%
Simplified27.8%
Taylor expanded in x around inf 30.0%
mul-1-neg30.0%
distribute-neg-frac30.0%
Simplified30.0%
Final simplification30.0%
(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.0%
Taylor expanded in F around -inf 50.5%
Taylor expanded in B around 0 27.8%
associate-*r/27.8%
distribute-lft-in27.8%
metadata-eval27.8%
neg-mul-127.8%
Simplified27.8%
Taylor expanded in x around 0 8.9%
Final simplification8.9%
herbie shell --seed 2023279
(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))))))