
(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 26 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 -200000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 9500.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 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 <= -200000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 9500.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -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 <= (-200000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 9500.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-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 <= -200000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 9500.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -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 <= -200000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 9500.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -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 <= -200000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 9500.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -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 <= -200000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 9500.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -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, -200000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9500.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $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 -200000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 9500:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2e8Initial program 63.3%
+-commutative63.3%
unsub-neg63.3%
associate-*l/73.7%
associate-*r/73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in x around 0 73.6%
associate-*l/73.6%
*-lft-identity73.6%
unpow273.6%
fma-udef73.6%
Simplified73.6%
Taylor expanded in F around -inf 99.7%
if -2e8 < F < 9500Initial program 99.5%
div-inv99.6%
expm1-log1p-u70.4%
expm1-udef51.7%
Applied egg-rr51.7%
expm1-def70.4%
expm1-log1p99.6%
Simplified99.6%
if 9500 < F Initial program 48.1%
+-commutative48.1%
unsub-neg48.1%
associate-*l/74.2%
associate-*r/74.2%
*-commutative74.2%
Simplified74.4%
Taylor expanded in x around 0 74.5%
associate-*l/74.4%
*-lft-identity74.4%
unpow274.4%
fma-udef74.4%
Simplified74.4%
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 -0.92)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 1.65)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 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 <= -0.92) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 1.65) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= (-0.92d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 1.65d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / 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 <= -0.92) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 1.65) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= -0.92: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 1.65: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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 <= -0.92) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 1.65) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / 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 <= -0.92) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 1.65) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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, -0.92], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.65], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $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 -0.92:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.65:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/75.1%
associate-*r/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 74.9%
associate-*l/74.9%
*-lft-identity74.9%
unpow274.9%
fma-udef74.9%
Simplified74.9%
sqrt-div74.9%
metadata-eval74.9%
Applied egg-rr74.9%
Taylor expanded in F around -inf 98.9%
mul-1-neg98.9%
Simplified98.9%
if -0.92000000000000004 < F < 1.6499999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 98.1%
if 1.6499999999999999 < F Initial program 48.9%
+-commutative48.9%
unsub-neg48.9%
associate-*l/74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 98.7%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.92) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.92d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.92) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.92: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.92) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.92) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.92], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/75.1%
associate-*r/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 74.9%
associate-*l/74.9%
*-lft-identity74.9%
unpow274.9%
fma-udef74.9%
Simplified74.9%
sqrt-div74.9%
metadata-eval74.9%
Applied egg-rr74.9%
Taylor expanded in F around -inf 98.9%
mul-1-neg98.9%
Simplified98.9%
if -0.92000000000000004 < F < 1.3999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 98.1%
if 1.3999999999999999 < F Initial program 48.9%
+-commutative48.9%
unsub-neg48.9%
associate-*l/74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 98.7%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.165)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.092)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 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 <= -0.165) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.092) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.165d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.092d0) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.165) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.092) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.165: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.092: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.165) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.092) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.165) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.092) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.165], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.092], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $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 -0.165:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.092:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.165000000000000008Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/75.1%
associate-*r/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 74.9%
associate-*l/74.9%
*-lft-identity74.9%
unpow274.9%
fma-udef74.9%
Simplified74.9%
Taylor expanded in F around -inf 98.8%
if -0.165000000000000008 < F < 0.091999999999999998Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in B around 0 87.4%
unpow287.4%
+-commutative87.4%
fma-def87.4%
Simplified87.4%
Taylor expanded in F around 0 86.2%
if 0.091999999999999998 < F Initial program 48.9%
+-commutative48.9%
unsub-neg48.9%
associate-*l/74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 98.7%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.35)
(- (* F (/ (/ 1.0 (- (/ -1.0 F) F)) (sin B))) t_0)
(if (<= F 0.33)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 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 <= -0.35) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0;
} else if (F <= 0.33) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.35d0)) then
tmp = (f * ((1.0d0 / (((-1.0d0) / f) - f)) / sin(b))) - t_0
else if (f <= 0.33d0) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.35) {
tmp = (F * ((1.0 / ((-1.0 / F) - F)) / Math.sin(B))) - t_0;
} else if (F <= 0.33) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.35: tmp = (F * ((1.0 / ((-1.0 / F) - F)) / math.sin(B))) - t_0 elif F <= 0.33: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.35) tmp = Float64(Float64(F * Float64(Float64(1.0 / Float64(Float64(-1.0 / F) - F)) / sin(B))) - t_0); elseif (F <= 0.33) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.35) tmp = (F * ((1.0 / ((-1.0 / F) - F)) / sin(B))) - t_0; elseif (F <= 0.33) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.35], N[(N[(F * N[(N[(1.0 / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.33], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $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 -0.35:\\
\;\;\;\;F \cdot \frac{\frac{1}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.33:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.34999999999999998Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/75.1%
associate-*r/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 74.9%
associate-*l/74.9%
*-lft-identity74.9%
unpow274.9%
fma-udef74.9%
Simplified74.9%
sqrt-div74.9%
metadata-eval74.9%
Applied egg-rr74.9%
Taylor expanded in F around -inf 98.9%
mul-1-neg98.9%
Simplified98.9%
if -0.34999999999999998 < F < 0.330000000000000016Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in B around 0 87.4%
unpow287.4%
+-commutative87.4%
fma-def87.4%
Simplified87.4%
Taylor expanded in F around 0 86.2%
if 0.330000000000000016 < F Initial program 48.9%
+-commutative48.9%
unsub-neg48.9%
associate-*l/74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 98.7%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.25e-47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.9e-99)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.0033)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.25e-47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.9e-99) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.0033) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.25d-47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.9d-99) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.0033d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.25e-47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.9e-99) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.0033) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.25e-47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.9e-99: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.0033: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.25e-47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.9e-99) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.0033) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.25e-47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.9e-99) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.0033) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.25e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.9e-99], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0033], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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.25 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-99}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.0033:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.25000000000000003e-47Initial program 69.5%
+-commutative69.5%
unsub-neg69.5%
associate-*l/78.0%
associate-*r/78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x around 0 77.8%
associate-*l/77.7%
*-lft-identity77.7%
unpow277.7%
fma-udef77.7%
Simplified77.7%
Taylor expanded in F around -inf 93.3%
if -1.25000000000000003e-47 < F < 1.8999999999999998e-99Initial program 99.5%
Taylor expanded in F around inf 30.5%
Taylor expanded in B around 0 50.4%
Taylor expanded in x around inf 76.6%
associate-*r/76.6%
*-commutative76.6%
associate-*r*76.6%
neg-mul-176.6%
Simplified76.6%
if 1.8999999999999998e-99 < F < 0.0033Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.3%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 97.3%
Taylor expanded in B around 0 68.2%
if 0.0033 < F Initial program 48.9%
+-commutative48.9%
unsub-neg48.9%
associate-*l/74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 98.7%
Final simplification87.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.43)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.066)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.43) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.066) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.43d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.066d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.43) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.066) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.43: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.066: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.43) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.066) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.43) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.066) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.43], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.066], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.43:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.066:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.429999999999999993Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/75.1%
associate-*r/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 74.9%
associate-*l/74.9%
*-lft-identity74.9%
unpow274.9%
fma-udef74.9%
Simplified74.9%
Taylor expanded in F around -inf 98.8%
if -0.429999999999999993 < F < 0.066000000000000003Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 98.1%
Taylor expanded in B around 0 86.1%
associate-/l*86.1%
associate-/r/86.0%
Simplified86.0%
if 0.066000000000000003 < F Initial program 48.9%
+-commutative48.9%
unsub-neg48.9%
associate-*l/74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 98.7%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.115)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.34) (- (/ (sqrt 0.5) (/ B F)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.115) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.34) {
tmp = (sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.115d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.34d0) then
tmp = (sqrt(0.5d0) / (b / f)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.115) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.34) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.115: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.34: tmp = (math.sqrt(0.5) / (B / F)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.115) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.34) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.115) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.34) tmp = (sqrt(0.5) / (B / F)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.115], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.34], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.115:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.34:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.115000000000000005Initial program 65.4%
+-commutative65.4%
unsub-neg65.4%
associate-*l/75.1%
associate-*r/75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in x around 0 74.9%
associate-*l/74.9%
*-lft-identity74.9%
unpow274.9%
fma-udef74.9%
Simplified74.9%
Taylor expanded in F around -inf 98.8%
if -0.115000000000000005 < F < 0.340000000000000024Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 98.1%
Taylor expanded in B around 0 86.1%
associate-/l*86.1%
Simplified86.1%
if 0.340000000000000024 < F Initial program 48.9%
+-commutative48.9%
unsub-neg48.9%
associate-*l/74.6%
associate-*r/74.6%
*-commutative74.6%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
unpow274.8%
fma-udef74.8%
Simplified74.8%
Taylor expanded in F around inf 98.7%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.25e+190)
(- (+ (* 0.5 (/ (* (/ x F) (/ 2.0 F)) B)) (/ -1.0 B)) t_0)
(if (<= F -8.2e+29)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.25e-124)
(/ (- (cos B)) (/ (sin B) x))
(if (<= F 1.95) (/ (- (* F (sqrt 0.5)) 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 <= -2.25e+190) {
tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0;
} else if (F <= -8.2e+29) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.25e-124) {
tmp = -cos(B) / (sin(B) / x);
} else if (F <= 1.95) {
tmp = ((F * sqrt(0.5)) - 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 <= (-2.25d+190)) then
tmp = ((0.5d0 * (((x / f) * (2.0d0 / f)) / b)) + ((-1.0d0) / b)) - t_0
else if (f <= (-8.2d+29)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.25d-124) then
tmp = -cos(b) / (sin(b) / x)
else if (f <= 1.95d0) then
tmp = ((f * sqrt(0.5d0)) - 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 <= -2.25e+190) {
tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0;
} else if (F <= -8.2e+29) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.25e-124) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else if (F <= 1.95) {
tmp = ((F * Math.sqrt(0.5)) - 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 <= -2.25e+190: tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0 elif F <= -8.2e+29: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.25e-124: tmp = -math.cos(B) / (math.sin(B) / x) elif F <= 1.95: tmp = ((F * math.sqrt(0.5)) - 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 <= -2.25e+190) tmp = Float64(Float64(Float64(0.5 * Float64(Float64(Float64(x / F) * Float64(2.0 / F)) / B)) + Float64(-1.0 / B)) - t_0); elseif (F <= -8.2e+29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.25e-124) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); elseif (F <= 1.95) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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 <= -2.25e+190) tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0; elseif (F <= -8.2e+29) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.25e-124) tmp = -cos(B) / (sin(B) / x); elseif (F <= 1.95) tmp = ((F * sqrt(0.5)) - 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, -2.25e+190], N[(N[(N[(0.5 * N[(N[(N[(x / F), $MachinePrecision] * N[(2.0 / F), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.2e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-124], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.95], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -2.25 \cdot 10^{+190}:\\
\;\;\;\;\left(0.5 \cdot \frac{\frac{x}{F} \cdot \frac{2}{F}}{B} + \frac{-1}{B}\right) - t_0\\
\mathbf{elif}\;F \leq -8.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-124}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq 1.95:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.25e190Initial program 43.1%
+-commutative43.1%
unsub-neg43.1%
associate-*l/57.6%
associate-*r/57.6%
*-commutative57.6%
Simplified57.7%
Taylor expanded in B around 0 57.7%
unpow257.7%
+-commutative57.7%
fma-def57.7%
Simplified57.7%
Taylor expanded in F around -inf 84.7%
associate-/r*84.7%
+-commutative84.7%
fma-def84.7%
unpow284.7%
Simplified84.7%
Taylor expanded in x around inf 84.7%
associate-*r/84.7%
*-commutative84.7%
unpow284.7%
times-frac84.7%
Simplified84.7%
if -2.25e190 < F < -8.2000000000000007e29Initial program 74.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 83.3%
if -8.2000000000000007e29 < F < 1.2500000000000001e-124Initial program 99.5%
Taylor expanded in F around -inf 39.0%
Taylor expanded in x around inf 73.2%
mul-1-neg73.2%
associate-/l*73.1%
distribute-neg-frac73.1%
Simplified73.1%
if 1.2500000000000001e-124 < F < 1.94999999999999996Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.4%
Taylor expanded in x around 0 99.4%
associate-*l/99.4%
*-lft-identity99.4%
unpow299.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in F around 0 95.2%
Taylor expanded in B around 0 69.2%
if 1.94999999999999996 < F Initial program 48.1%
Taylor expanded in F around inf 69.1%
Taylor expanded in B around 0 41.8%
expm1-log1p-u17.5%
expm1-udef17.1%
div-inv17.1%
neg-mul-117.1%
fma-def17.1%
associate-*l/26.2%
pow126.2%
inv-pow26.2%
pow-prod-up26.2%
metadata-eval26.2%
metadata-eval26.2%
Applied egg-rr26.2%
expm1-def26.6%
expm1-log1p72.5%
fma-udef72.5%
neg-mul-172.5%
+-commutative72.5%
unsub-neg72.5%
Simplified72.5%
Final simplification75.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e+190)
(- (+ (* 0.5 (/ (* (/ x F) (/ 2.0 F)) B)) (/ -1.0 B)) t_0)
(if (<= F -8.2e+29)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5e-98)
(/ (* x (- (cos B))) (sin B))
(if (<= F 1.95) (/ (- (* F (sqrt 0.5)) 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 <= -3e+190) {
tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0;
} else if (F <= -8.2e+29) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5e-98) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 1.95) {
tmp = ((F * sqrt(0.5)) - 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 <= (-3d+190)) then
tmp = ((0.5d0 * (((x / f) * (2.0d0 / f)) / b)) + ((-1.0d0) / b)) - t_0
else if (f <= (-8.2d+29)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5d-98) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 1.95d0) then
tmp = ((f * sqrt(0.5d0)) - 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 <= -3e+190) {
tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0;
} else if (F <= -8.2e+29) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5e-98) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 1.95) {
tmp = ((F * Math.sqrt(0.5)) - 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 <= -3e+190: tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0 elif F <= -8.2e+29: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5e-98: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 1.95: tmp = ((F * math.sqrt(0.5)) - 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 <= -3e+190) tmp = Float64(Float64(Float64(0.5 * Float64(Float64(Float64(x / F) * Float64(2.0 / F)) / B)) + Float64(-1.0 / B)) - t_0); elseif (F <= -8.2e+29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5e-98) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 1.95) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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 <= -3e+190) tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0; elseif (F <= -8.2e+29) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5e-98) tmp = (x * -cos(B)) / sin(B); elseif (F <= 1.95) tmp = ((F * sqrt(0.5)) - 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, -3e+190], N[(N[(N[(0.5 * N[(N[(N[(x / F), $MachinePrecision] * N[(2.0 / F), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.2e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-98], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.95], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 \cdot 10^{+190}:\\
\;\;\;\;\left(0.5 \cdot \frac{\frac{x}{F} \cdot \frac{2}{F}}{B} + \frac{-1}{B}\right) - t_0\\
\mathbf{elif}\;F \leq -8.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-98}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.95:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.99999999999999982e190Initial program 43.1%
+-commutative43.1%
unsub-neg43.1%
associate-*l/57.6%
associate-*r/57.6%
*-commutative57.6%
Simplified57.7%
Taylor expanded in B around 0 57.7%
unpow257.7%
+-commutative57.7%
fma-def57.7%
Simplified57.7%
Taylor expanded in F around -inf 84.7%
associate-/r*84.7%
+-commutative84.7%
fma-def84.7%
unpow284.7%
Simplified84.7%
Taylor expanded in x around inf 84.7%
associate-*r/84.7%
*-commutative84.7%
unpow284.7%
times-frac84.7%
Simplified84.7%
if -2.99999999999999982e190 < F < -8.2000000000000007e29Initial program 74.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 83.3%
if -8.2000000000000007e29 < F < 5.00000000000000018e-98Initial program 99.5%
Taylor expanded in F around inf 34.9%
Taylor expanded in B around 0 51.3%
Taylor expanded in x around inf 73.8%
associate-*r/73.8%
*-commutative73.8%
associate-*r*73.8%
neg-mul-173.8%
Simplified73.8%
if 5.00000000000000018e-98 < F < 1.94999999999999996Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.3%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 94.0%
Taylor expanded in B around 0 65.6%
if 1.94999999999999996 < F Initial program 48.1%
Taylor expanded in F around inf 69.1%
Taylor expanded in B around 0 41.8%
expm1-log1p-u17.5%
expm1-udef17.1%
div-inv17.1%
neg-mul-117.1%
fma-def17.1%
associate-*l/26.2%
pow126.2%
inv-pow26.2%
pow-prod-up26.2%
metadata-eval26.2%
metadata-eval26.2%
Applied egg-rr26.2%
expm1-def26.6%
expm1-log1p72.5%
fma-udef72.5%
neg-mul-172.5%
+-commutative72.5%
unsub-neg72.5%
Simplified72.5%
Final simplification75.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e-47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5e-96)
(/ (* x (- (cos B))) (sin B))
(if (<= F 1.95) (/ (- (* F (sqrt 0.5)) 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 <= -1e-47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5e-96) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 1.95) {
tmp = ((F * sqrt(0.5)) - 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 <= (-1d-47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d-96) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 1.95d0) then
tmp = ((f * sqrt(0.5d0)) - 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 <= -1e-47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5e-96) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 1.95) {
tmp = ((F * Math.sqrt(0.5)) - 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 <= -1e-47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5e-96: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 1.95: tmp = ((F * math.sqrt(0.5)) - 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 <= -1e-47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5e-96) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 1.95) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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 <= -1e-47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5e-96) tmp = (x * -cos(B)) / sin(B); elseif (F <= 1.95) tmp = ((F * sqrt(0.5)) - 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, -1e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e-96], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.95], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -1 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-96}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.95:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -9.9999999999999997e-48Initial program 69.5%
+-commutative69.5%
unsub-neg69.5%
associate-*l/78.0%
associate-*r/78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in x around 0 77.8%
associate-*l/77.7%
*-lft-identity77.7%
unpow277.7%
fma-udef77.7%
Simplified77.7%
Taylor expanded in F around -inf 93.3%
if -9.9999999999999997e-48 < F < 1.5e-96Initial program 99.5%
Taylor expanded in F around inf 30.5%
Taylor expanded in B around 0 50.4%
Taylor expanded in x around inf 76.6%
associate-*r/76.6%
*-commutative76.6%
associate-*r*76.6%
neg-mul-176.6%
Simplified76.6%
if 1.5e-96 < F < 1.94999999999999996Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.3%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 94.0%
Taylor expanded in B around 0 65.6%
if 1.94999999999999996 < F Initial program 48.1%
Taylor expanded in F around inf 69.1%
Taylor expanded in B around 0 41.8%
expm1-log1p-u17.5%
expm1-udef17.1%
div-inv17.1%
neg-mul-117.1%
fma-def17.1%
associate-*l/26.2%
pow126.2%
inv-pow26.2%
pow-prod-up26.2%
metadata-eval26.2%
metadata-eval26.2%
Applied egg-rr26.2%
expm1-def26.6%
expm1-log1p72.5%
fma-udef72.5%
neg-mul-172.5%
+-commutative72.5%
unsub-neg72.5%
Simplified72.5%
Final simplification79.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (- (* F (/ -1.0 (* F B))) t_0))
(t_2 (/ (- (* F (sqrt 0.5)) x) B)))
(if (<= F -3.3e+190)
t_1
(if (<= F -1.6e+31)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7.8e-62)
t_1
(if (<= F -5e-261)
t_2
(if (<= F 1.9e-125)
(- (* (/ 1.0 F) (/ F B)) t_0)
(if (<= F 1.95) t_2 (- (/ 1.0 B) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (F * (-1.0 / (F * B))) - t_0;
double t_2 = ((F * sqrt(0.5)) - x) / B;
double tmp;
if (F <= -3.3e+190) {
tmp = t_1;
} else if (F <= -1.6e+31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7.8e-62) {
tmp = t_1;
} else if (F <= -5e-261) {
tmp = t_2;
} else if (F <= 1.9e-125) {
tmp = ((1.0 / F) * (F / B)) - t_0;
} else if (F <= 1.95) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (f * ((-1.0d0) / (f * b))) - t_0
t_2 = ((f * sqrt(0.5d0)) - x) / b
if (f <= (-3.3d+190)) then
tmp = t_1
else if (f <= (-1.6d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7.8d-62)) then
tmp = t_1
else if (f <= (-5d-261)) then
tmp = t_2
else if (f <= 1.9d-125) then
tmp = ((1.0d0 / f) * (f / b)) - t_0
else if (f <= 1.95d0) then
tmp = t_2
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 = (F * (-1.0 / (F * B))) - t_0;
double t_2 = ((F * Math.sqrt(0.5)) - x) / B;
double tmp;
if (F <= -3.3e+190) {
tmp = t_1;
} else if (F <= -1.6e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7.8e-62) {
tmp = t_1;
} else if (F <= -5e-261) {
tmp = t_2;
} else if (F <= 1.9e-125) {
tmp = ((1.0 / F) * (F / B)) - t_0;
} else if (F <= 1.95) {
tmp = t_2;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (F * (-1.0 / (F * B))) - t_0 t_2 = ((F * math.sqrt(0.5)) - x) / B tmp = 0 if F <= -3.3e+190: tmp = t_1 elif F <= -1.6e+31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7.8e-62: tmp = t_1 elif F <= -5e-261: tmp = t_2 elif F <= 1.9e-125: tmp = ((1.0 / F) * (F / B)) - t_0 elif F <= 1.95: tmp = t_2 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - t_0) t_2 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) tmp = 0.0 if (F <= -3.3e+190) tmp = t_1; elseif (F <= -1.6e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7.8e-62) tmp = t_1; elseif (F <= -5e-261) tmp = t_2; elseif (F <= 1.9e-125) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / B)) - t_0); elseif (F <= 1.95) tmp = t_2; 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 = (F * (-1.0 / (F * B))) - t_0; t_2 = ((F * sqrt(0.5)) - x) / B; tmp = 0.0; if (F <= -3.3e+190) tmp = t_1; elseif (F <= -1.6e+31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7.8e-62) tmp = t_1; elseif (F <= -5e-261) tmp = t_2; elseif (F <= 1.9e-125) tmp = ((1.0 / F) * (F / B)) - t_0; elseif (F <= 1.95) tmp = t_2; 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[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -3.3e+190], t$95$1, If[LessEqual[F, -1.6e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.8e-62], t$95$1, If[LessEqual[F, -5e-261], t$95$2, If[LessEqual[F, 1.9e-125], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.95], t$95$2, N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := F \cdot \frac{-1}{F \cdot B} - t_0\\
t_2 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{+190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.8 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-261}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-125}:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - t_0\\
\mathbf{elif}\;F \leq 1.95:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.3e190 or -1.6e31 < F < -7.8000000000000007e-62Initial program 69.1%
+-commutative69.1%
unsub-neg69.1%
associate-*l/76.9%
associate-*r/76.9%
*-commutative76.9%
Simplified77.0%
Taylor expanded in B around 0 70.6%
unpow270.6%
+-commutative70.6%
fma-def70.6%
Simplified70.6%
Taylor expanded in F around -inf 74.7%
if -3.3e190 < F < -1.6e31Initial program 74.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 83.3%
if -7.8000000000000007e-62 < F < -4.99999999999999981e-261 or 1.9000000000000001e-125 < F < 1.94999999999999996Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 97.6%
Taylor expanded in B around 0 67.0%
if -4.99999999999999981e-261 < F < 1.9000000000000001e-125Initial program 99.6%
Taylor expanded in F around inf 37.9%
Taylor expanded in B around 0 65.5%
div-inv99.9%
expm1-log1p-u70.6%
expm1-udef34.5%
Applied egg-rr19.1%
expm1-def70.6%
expm1-log1p99.9%
Simplified65.6%
if 1.94999999999999996 < F Initial program 48.1%
Taylor expanded in F around inf 69.1%
Taylor expanded in B around 0 41.8%
expm1-log1p-u17.5%
expm1-udef17.1%
div-inv17.1%
neg-mul-117.1%
fma-def17.1%
associate-*l/26.2%
pow126.2%
inv-pow26.2%
pow-prod-up26.2%
metadata-eval26.2%
metadata-eval26.2%
Applied egg-rr26.2%
expm1-def26.6%
expm1-log1p72.5%
fma-udef72.5%
neg-mul-172.5%
+-commutative72.5%
unsub-neg72.5%
Simplified72.5%
Final simplification72.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (/ (- (* F (sqrt 0.5)) x) B)))
(if (<= F -3.3e+190)
(- (+ (* 0.5 (/ (* (/ x F) (/ 2.0 F)) B)) (/ -1.0 B)) t_0)
(if (<= F -1.72e+30)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.2e-62)
(- (* F (/ -1.0 (* F B))) t_0)
(if (<= F -1.25e-261)
t_1
(if (<= F 2.05e-128)
(- (* (/ 1.0 F) (/ F B)) t_0)
(if (<= F 1.95) t_1 (- (/ 1.0 B) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = ((F * sqrt(0.5)) - x) / B;
double tmp;
if (F <= -3.3e+190) {
tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0;
} else if (F <= -1.72e+30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.2e-62) {
tmp = (F * (-1.0 / (F * B))) - t_0;
} else if (F <= -1.25e-261) {
tmp = t_1;
} else if (F <= 2.05e-128) {
tmp = ((1.0 / F) * (F / B)) - t_0;
} else if (F <= 1.95) {
tmp = t_1;
} 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 = ((f * sqrt(0.5d0)) - x) / b
if (f <= (-3.3d+190)) then
tmp = ((0.5d0 * (((x / f) * (2.0d0 / f)) / b)) + ((-1.0d0) / b)) - t_0
else if (f <= (-1.72d+30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.2d-62)) then
tmp = (f * ((-1.0d0) / (f * b))) - t_0
else if (f <= (-1.25d-261)) then
tmp = t_1
else if (f <= 2.05d-128) then
tmp = ((1.0d0 / f) * (f / b)) - t_0
else if (f <= 1.95d0) then
tmp = t_1
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 = ((F * Math.sqrt(0.5)) - x) / B;
double tmp;
if (F <= -3.3e+190) {
tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0;
} else if (F <= -1.72e+30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.2e-62) {
tmp = (F * (-1.0 / (F * B))) - t_0;
} else if (F <= -1.25e-261) {
tmp = t_1;
} else if (F <= 2.05e-128) {
tmp = ((1.0 / F) * (F / B)) - t_0;
} else if (F <= 1.95) {
tmp = t_1;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = ((F * math.sqrt(0.5)) - x) / B tmp = 0 if F <= -3.3e+190: tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0 elif F <= -1.72e+30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.2e-62: tmp = (F * (-1.0 / (F * B))) - t_0 elif F <= -1.25e-261: tmp = t_1 elif F <= 2.05e-128: tmp = ((1.0 / F) * (F / B)) - t_0 elif F <= 1.95: tmp = t_1 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) tmp = 0.0 if (F <= -3.3e+190) tmp = Float64(Float64(Float64(0.5 * Float64(Float64(Float64(x / F) * Float64(2.0 / F)) / B)) + Float64(-1.0 / B)) - t_0); elseif (F <= -1.72e+30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.2e-62) tmp = Float64(Float64(F * Float64(-1.0 / Float64(F * B))) - t_0); elseif (F <= -1.25e-261) tmp = t_1; elseif (F <= 2.05e-128) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / B)) - t_0); elseif (F <= 1.95) tmp = t_1; 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 = ((F * sqrt(0.5)) - x) / B; tmp = 0.0; if (F <= -3.3e+190) tmp = ((0.5 * (((x / F) * (2.0 / F)) / B)) + (-1.0 / B)) - t_0; elseif (F <= -1.72e+30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.2e-62) tmp = (F * (-1.0 / (F * B))) - t_0; elseif (F <= -1.25e-261) tmp = t_1; elseif (F <= 2.05e-128) tmp = ((1.0 / F) * (F / B)) - t_0; elseif (F <= 1.95) tmp = t_1; 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[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -3.3e+190], N[(N[(N[(0.5 * N[(N[(N[(x / F), $MachinePrecision] * N[(2.0 / F), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.72e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-62], N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.25e-261], t$95$1, If[LessEqual[F, 2.05e-128], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.95], t$95$1, 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{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{+190}:\\
\;\;\;\;\left(0.5 \cdot \frac{\frac{x}{F} \cdot \frac{2}{F}}{B} + \frac{-1}{B}\right) - t_0\\
\mathbf{elif}\;F \leq -1.72 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-62}:\\
\;\;\;\;F \cdot \frac{-1}{F \cdot B} - t_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-261}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-128}:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - t_0\\
\mathbf{elif}\;F \leq 1.95:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.3e190Initial program 43.1%
+-commutative43.1%
unsub-neg43.1%
associate-*l/57.6%
associate-*r/57.6%
*-commutative57.6%
Simplified57.7%
Taylor expanded in B around 0 57.7%
unpow257.7%
+-commutative57.7%
fma-def57.7%
Simplified57.7%
Taylor expanded in F around -inf 84.7%
associate-/r*84.7%
+-commutative84.7%
fma-def84.7%
unpow284.7%
Simplified84.7%
Taylor expanded in x around inf 84.7%
associate-*r/84.7%
*-commutative84.7%
unpow284.7%
times-frac84.7%
Simplified84.7%
if -3.3e190 < F < -1.7200000000000001e30Initial program 74.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 83.3%
if -1.7200000000000001e30 < F < -6.1999999999999999e-62Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.5%
Taylor expanded in B around 0 85.8%
unpow285.8%
+-commutative85.8%
fma-def85.8%
Simplified85.8%
Taylor expanded in F around -inf 63.1%
if -6.1999999999999999e-62 < F < -1.24999999999999995e-261 or 2.05e-128 < F < 1.94999999999999996Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 97.6%
Taylor expanded in B around 0 67.0%
if -1.24999999999999995e-261 < F < 2.05e-128Initial program 99.6%
Taylor expanded in F around inf 37.9%
Taylor expanded in B around 0 65.5%
div-inv99.9%
expm1-log1p-u70.6%
expm1-udef34.5%
Applied egg-rr19.1%
expm1-def70.6%
expm1-log1p99.9%
Simplified65.6%
if 1.94999999999999996 < F Initial program 48.1%
Taylor expanded in F around inf 69.1%
Taylor expanded in B around 0 41.8%
expm1-log1p-u17.5%
expm1-udef17.1%
div-inv17.1%
neg-mul-117.1%
fma-def17.1%
associate-*l/26.2%
pow126.2%
inv-pow26.2%
pow-prod-up26.2%
metadata-eval26.2%
metadata-eval26.2%
Applied egg-rr26.2%
expm1-def26.6%
expm1-log1p72.5%
fma-udef72.5%
neg-mul-172.5%
+-commutative72.5%
unsub-neg72.5%
Simplified72.5%
Final simplification72.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -2.6e+190)
t_0
(if (<= F -1.8e+31)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.5e-62)
t_0
(if (or (<= F 1.3e-282) (and (not (<= F 9e-126)) (<= F 1.95)))
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -2.6e+190) {
tmp = t_0;
} else if (F <= -1.8e+31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.5e-62) {
tmp = t_0;
} else if ((F <= 1.3e-282) || (!(F <= 9e-126) && (F <= 1.95))) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-2.6d+190)) then
tmp = t_0
else if (f <= (-1.8d+31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.5d-62)) then
tmp = t_0
else if ((f <= 1.3d-282) .or. (.not. (f <= 9d-126)) .and. (f <= 1.95d0)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -2.6e+190) {
tmp = t_0;
} else if (F <= -1.8e+31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.5e-62) {
tmp = t_0;
} else if ((F <= 1.3e-282) || (!(F <= 9e-126) && (F <= 1.95))) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -2.6e+190: tmp = t_0 elif F <= -1.8e+31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.5e-62: tmp = t_0 elif (F <= 1.3e-282) or (not (F <= 9e-126) and (F <= 1.95)): tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -2.6e+190) tmp = t_0; elseif (F <= -1.8e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.5e-62) tmp = t_0; elseif ((F <= 1.3e-282) || (!(F <= 9e-126) && (F <= 1.95))) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -2.6e+190) tmp = t_0; elseif (F <= -1.8e+31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.5e-62) tmp = t_0; elseif ((F <= 1.3e-282) || (~((F <= 9e-126)) && (F <= 1.95))) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.6e+190], t$95$0, If[LessEqual[F, -1.8e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-62], t$95$0, If[Or[LessEqual[F, 1.3e-282], And[N[Not[LessEqual[F, 9e-126]], $MachinePrecision], LessEqual[F, 1.95]]], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -2.6 \cdot 10^{+190}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.8 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-62}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-282} \lor \neg \left(F \leq 9 \cdot 10^{-126}\right) \land F \leq 1.95:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.60000000000000011e190 or -1.79999999999999998e31 < F < -4.50000000000000018e-62Initial program 69.1%
Taylor expanded in F around -inf 82.3%
Taylor expanded in B around 0 74.6%
if -2.60000000000000011e190 < F < -1.79999999999999998e31Initial program 74.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 83.3%
if -4.50000000000000018e-62 < F < 1.30000000000000006e-282 or 9.0000000000000005e-126 < F < 1.94999999999999996Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.0%
Taylor expanded in B around 0 63.3%
if 1.30000000000000006e-282 < F < 9.0000000000000005e-126 or 1.94999999999999996 < F Initial program 61.0%
Taylor expanded in F around inf 63.3%
Taylor expanded in B around 0 49.9%
expm1-log1p-u25.5%
expm1-udef18.8%
div-inv18.8%
neg-mul-118.8%
fma-def18.8%
associate-*l/25.5%
pow125.5%
inv-pow25.5%
pow-prod-up25.5%
metadata-eval25.5%
metadata-eval25.5%
Applied egg-rr25.5%
expm1-def31.2%
expm1-log1p71.8%
fma-udef71.8%
neg-mul-171.8%
+-commutative71.8%
unsub-neg71.8%
Simplified71.8%
Final simplification71.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (* F (/ -1.0 (* F B))) t_0)))
(if (<= F -3.2e+190)
t_1
(if (<= F -8.4e+29)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.4e-62)
t_1
(if (or (<= F 3.3e-285) (and (not (<= F 6e-126)) (<= F 1.95)))
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (F * (-1.0 / (F * B))) - t_0;
double tmp;
if (F <= -3.2e+190) {
tmp = t_1;
} else if (F <= -8.4e+29) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.4e-62) {
tmp = t_1;
} else if ((F <= 3.3e-285) || (!(F <= 6e-126) && (F <= 1.95))) {
tmp = ((F * sqrt(0.5)) - 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) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = (f * ((-1.0d0) / (f * b))) - t_0
if (f <= (-3.2d+190)) then
tmp = t_1
else if (f <= (-8.4d+29)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.4d-62)) then
tmp = t_1
else if ((f <= 3.3d-285) .or. (.not. (f <= 6d-126)) .and. (f <= 1.95d0)) then
tmp = ((f * sqrt(0.5d0)) - 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 t_1 = (F * (-1.0 / (F * B))) - t_0;
double tmp;
if (F <= -3.2e+190) {
tmp = t_1;
} else if (F <= -8.4e+29) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.4e-62) {
tmp = t_1;
} else if ((F <= 3.3e-285) || (!(F <= 6e-126) && (F <= 1.95))) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (F * (-1.0 / (F * B))) - t_0 tmp = 0 if F <= -3.2e+190: tmp = t_1 elif F <= -8.4e+29: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.4e-62: tmp = t_1 elif (F <= 3.3e-285) or (not (F <= 6e-126) and (F <= 1.95)): tmp = ((F * math.sqrt(0.5)) - x) / 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(F * Float64(-1.0 / Float64(F * B))) - t_0) tmp = 0.0 if (F <= -3.2e+190) tmp = t_1; elseif (F <= -8.4e+29) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.4e-62) tmp = t_1; elseif ((F <= 3.3e-285) || (!(F <= 6e-126) && (F <= 1.95))) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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); t_1 = (F * (-1.0 / (F * B))) - t_0; tmp = 0.0; if (F <= -3.2e+190) tmp = t_1; elseif (F <= -8.4e+29) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.4e-62) tmp = t_1; elseif ((F <= 3.3e-285) || (~((F <= 6e-126)) && (F <= 1.95))) tmp = ((F * sqrt(0.5)) - 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]}, Block[{t$95$1 = N[(N[(F * N[(-1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -3.2e+190], t$95$1, If[LessEqual[F, -8.4e+29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.4e-62], t$95$1, If[Or[LessEqual[F, 3.3e-285], And[N[Not[LessEqual[F, 6e-126]], $MachinePrecision], LessEqual[F, 1.95]]], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 := F \cdot \frac{-1}{F \cdot B} - t_0\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{+190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -8.4 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-285} \lor \neg \left(F \leq 6 \cdot 10^{-126}\right) \land F \leq 1.95:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.2000000000000001e190 or -8.4000000000000006e29 < F < -5.40000000000000039e-62Initial program 69.1%
+-commutative69.1%
unsub-neg69.1%
associate-*l/76.9%
associate-*r/76.9%
*-commutative76.9%
Simplified77.0%
Taylor expanded in B around 0 70.6%
unpow270.6%
+-commutative70.6%
fma-def70.6%
Simplified70.6%
Taylor expanded in F around -inf 74.7%
if -3.2000000000000001e190 < F < -8.4000000000000006e29Initial program 74.4%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 83.3%
if -5.40000000000000039e-62 < F < 3.29999999999999985e-285 or 6.0000000000000003e-126 < F < 1.94999999999999996Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 98.0%
Taylor expanded in B around 0 63.3%
if 3.29999999999999985e-285 < F < 6.0000000000000003e-126 or 1.94999999999999996 < F Initial program 61.0%
Taylor expanded in F around inf 63.3%
Taylor expanded in B around 0 49.9%
expm1-log1p-u25.5%
expm1-udef18.8%
div-inv18.8%
neg-mul-118.8%
fma-def18.8%
associate-*l/25.5%
pow125.5%
inv-pow25.5%
pow-prod-up25.5%
metadata-eval25.5%
metadata-eval25.5%
Applied egg-rr25.5%
expm1-def31.2%
expm1-log1p71.8%
fma-udef71.8%
neg-mul-171.8%
+-commutative71.8%
unsub-neg71.8%
Simplified71.8%
Final simplification71.3%
(FPCore (F B x)
:precision binary64
(if (<= F -0.27)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F 1.2e-279) (and (not (<= F 1.95e-128)) (<= F 1.95)))
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.27) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= 1.2e-279) || (!(F <= 1.95e-128) && (F <= 1.95))) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.27d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= 1.2d-279) .or. (.not. (f <= 1.95d-128)) .and. (f <= 1.95d0)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.27) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= 1.2e-279) || (!(F <= 1.95e-128) && (F <= 1.95))) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.27: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= 1.2e-279) or (not (F <= 1.95e-128) and (F <= 1.95)): tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.27) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= 1.2e-279) || (!(F <= 1.95e-128) && (F <= 1.95))) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.27) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= 1.2e-279) || (~((F <= 1.95e-128)) && (F <= 1.95))) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.27], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.2e-279], And[N[Not[LessEqual[F, 1.95e-128]], $MachinePrecision], LessEqual[F, 1.95]]], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.27:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-279} \lor \neg \left(F \leq 1.95 \cdot 10^{-128}\right) \land F \leq 1.95:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.27000000000000002Initial program 65.4%
Taylor expanded in F around -inf 98.8%
Taylor expanded in B around 0 71.3%
if -0.27000000000000002 < F < 1.19999999999999995e-279 or 1.94999999999999998e-128 < F < 1.94999999999999996Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 96.8%
Taylor expanded in B around 0 61.0%
if 1.19999999999999995e-279 < F < 1.94999999999999998e-128 or 1.94999999999999996 < F Initial program 61.0%
Taylor expanded in F around inf 63.3%
Taylor expanded in B around 0 49.9%
expm1-log1p-u25.5%
expm1-udef18.8%
div-inv18.8%
neg-mul-118.8%
fma-def18.8%
associate-*l/25.5%
pow125.5%
inv-pow25.5%
pow-prod-up25.5%
metadata-eval25.5%
metadata-eval25.5%
Applied egg-rr25.5%
expm1-def31.2%
expm1-log1p71.8%
fma-udef71.8%
neg-mul-171.8%
+-commutative71.8%
unsub-neg71.8%
Simplified71.8%
Final simplification67.6%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.65e-16) (not (<= x 6e-156))) (- (/ 1.0 B) (/ x (tan B))) (+ (/ -1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.65e-16) || !(x <= 6e-156)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (-1.0 / sin(B)) + (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.65d-16)) .or. (.not. (x <= 6d-156))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((-1.0d0) / sin(b)) + (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.65e-16) || !(x <= 6e-156)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (-1.0 / Math.sin(B)) + (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.65e-16) or not (x <= 6e-156): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (-1.0 / math.sin(B)) + (x / B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.65e-16) || !(x <= 6e-156)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.65e-16) || ~((x <= 6e-156))) tmp = (1.0 / B) - (x / tan(B)); else tmp = (-1.0 / sin(B)) + (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.65e-16], N[Not[LessEqual[x, 6e-156]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-16} \lor \neg \left(x \leq 6 \cdot 10^{-156}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{x}{B}\\
\end{array}
\end{array}
if x < -1.64999999999999994e-16 or 6e-156 < x Initial program 79.8%
Taylor expanded in F around inf 66.6%
Taylor expanded in B around 0 69.9%
expm1-log1p-u39.0%
expm1-udef33.5%
div-inv33.5%
neg-mul-133.5%
fma-def33.5%
associate-*l/38.7%
pow138.7%
inv-pow38.7%
pow-prod-up38.7%
metadata-eval38.7%
metadata-eval38.7%
Applied egg-rr38.7%
expm1-def44.1%
expm1-log1p86.2%
fma-udef86.2%
neg-mul-186.2%
+-commutative86.2%
unsub-neg86.2%
Simplified86.2%
if -1.64999999999999994e-16 < x < 6e-156Initial program 72.9%
Taylor expanded in F around -inf 30.6%
Taylor expanded in B around 0 30.6%
expm1-log1p-u14.9%
expm1-udef14.9%
add-sqr-sqrt4.0%
sqrt-unprod14.4%
sqr-neg14.4%
sqrt-unprod11.9%
add-sqr-sqrt14.9%
Applied egg-rr14.9%
expm1-def14.9%
expm1-log1p30.6%
+-commutative30.6%
Simplified30.6%
Final simplification60.8%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.1e-33) (not (<= x 2.35e-175))) (- (/ 1.0 B) (/ x (tan B))) (/ (- (* F (sqrt 0.5)) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.1e-33) || !(x <= 2.35e-175)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.1d-33)) .or. (.not. (x <= 2.35d-175))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.1e-33) || !(x <= 2.35e-175)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.1e-33) or not (x <= 2.35e-175): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.1e-33) || !(x <= 2.35e-175)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.1e-33) || ~((x <= 2.35e-175))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.1e-33], N[Not[LessEqual[x, 2.35e-175]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-33} \lor \neg \left(x \leq 2.35 \cdot 10^{-175}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if x < -2.1e-33 or 2.34999999999999999e-175 < x Initial program 79.8%
Taylor expanded in F around inf 62.9%
Taylor expanded in B around 0 67.4%
expm1-log1p-u38.4%
expm1-udef31.4%
div-inv31.4%
neg-mul-131.4%
fma-def31.4%
associate-*l/36.3%
pow136.3%
inv-pow36.3%
pow-prod-up36.3%
metadata-eval36.3%
metadata-eval36.3%
Applied egg-rr36.3%
expm1-def43.3%
expm1-log1p82.6%
fma-udef82.6%
neg-mul-182.6%
+-commutative82.6%
unsub-neg82.6%
Simplified82.6%
if -2.1e-33 < x < 2.34999999999999999e-175Initial program 72.2%
+-commutative72.2%
unsub-neg72.2%
associate-*l/74.2%
associate-*r/74.1%
*-commutative74.1%
Simplified74.2%
Taylor expanded in x around 0 74.2%
associate-*l/74.1%
*-lft-identity74.1%
unpow274.1%
fma-udef74.1%
Simplified74.1%
Taylor expanded in F around 0 55.2%
Taylor expanded in B around 0 35.3%
Final simplification62.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1.6e+26)
(+ (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.8e-102)
(/ (- x) B)
(+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e+26) {
tmp = (-1.0 / sin(B)) + (x / B);
} else if (F <= 4.8e-102) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((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.6d+26)) then
tmp = ((-1.0d0) / sin(b)) + (x / b)
else if (f <= 4.8d-102) then
tmp = -x / b
else
tmp = (0.3333333333333333d0 * (b * x)) + ((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.6e+26) {
tmp = (-1.0 / Math.sin(B)) + (x / B);
} else if (F <= 4.8e-102) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e+26: tmp = (-1.0 / math.sin(B)) + (x / B) elif F <= 4.8e-102: tmp = -x / B else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e+26) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x / B)); elseif (F <= 4.8e-102) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.6e+26) tmp = (-1.0 / sin(B)) + (x / B); elseif (F <= 4.8e-102) tmp = -x / B; else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-102], N[((-x) / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.6 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-102}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.60000000000000014e26Initial program 61.1%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 74.8%
expm1-log1p-u33.4%
expm1-udef33.3%
add-sqr-sqrt13.6%
sqrt-unprod30.0%
sqr-neg30.0%
sqrt-unprod21.6%
add-sqr-sqrt26.1%
Applied egg-rr26.1%
expm1-def26.2%
expm1-log1p57.8%
+-commutative57.8%
Simplified57.8%
if -1.60000000000000014e26 < F < 4.8e-102Initial program 99.5%
Taylor expanded in F around -inf 37.5%
Taylor expanded in B around 0 21.9%
associate-*r/21.9%
distribute-lft-in21.9%
metadata-eval21.9%
neg-mul-121.9%
Simplified21.9%
Taylor expanded in x around inf 39.8%
associate-*r/39.8%
neg-mul-139.8%
Simplified39.8%
if 4.8e-102 < F Initial program 62.2%
Taylor expanded in F around inf 60.8%
Taylor expanded in B around 0 42.5%
Taylor expanded in B around 0 48.7%
associate--l+48.7%
div-sub48.7%
Simplified48.7%
Final simplification47.5%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0105)
(- (* B -0.16666666666666666) (/ (+ x 1.0) B))
(if (<= F 1.9e-100)
(/ (- x) B)
(+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0105) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 1.9e-100) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((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 <= (-0.0105d0)) then
tmp = (b * (-0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 1.9d-100) then
tmp = -x / b
else
tmp = (0.3333333333333333d0 * (b * x)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0105) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 1.9e-100) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0105: tmp = (B * -0.16666666666666666) - ((x + 1.0) / B) elif F <= 1.9e-100: tmp = -x / B else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0105) tmp = Float64(Float64(B * -0.16666666666666666) - Float64(Float64(x + 1.0) / B)); elseif (F <= 1.9e-100) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0105) tmp = (B * -0.16666666666666666) - ((x + 1.0) / B); elseif (F <= 1.9e-100) tmp = -x / B; else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0105], N[(N[(B * -0.16666666666666666), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.9e-100], N[((-x) / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0105:\\
\;\;\;\;B \cdot -0.16666666666666666 - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-100}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.0105000000000000007Initial program 65.8%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 70.5%
Taylor expanded in B around 0 47.2%
+-commutative47.2%
mul-1-neg47.2%
unsub-neg47.2%
*-commutative47.2%
Simplified47.2%
if -0.0105000000000000007 < F < 1.89999999999999999e-100Initial program 99.5%
Taylor expanded in F around -inf 33.0%
Taylor expanded in B around 0 21.0%
associate-*r/21.0%
distribute-lft-in21.0%
metadata-eval21.0%
neg-mul-121.0%
Simplified21.0%
Taylor expanded in x around inf 41.3%
associate-*r/41.3%
neg-mul-141.3%
Simplified41.3%
if 1.89999999999999999e-100 < F Initial program 62.2%
Taylor expanded in F around inf 60.8%
Taylor expanded in B around 0 42.5%
Taylor expanded in B around 0 48.7%
associate--l+48.7%
div-sub48.7%
Simplified48.7%
Final simplification45.6%
(FPCore (F B x)
:precision binary64
(if (<= F -8.2e-67)
(+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B))
(if (<= F 2.3e-100)
(/ (- x) B)
(+ (* 0.3333333333333333 (* B x)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-67) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 2.3e-100) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((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 <= (-8.2d-67)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 2.3d-100) then
tmp = -x / b
else
tmp = (0.3333333333333333d0 * (b * x)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.2e-67) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 2.3e-100) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.2e-67: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 2.3e-100: tmp = -x / B else: tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.2e-67) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 2.3e-100) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.2e-67) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 2.3e-100) tmp = -x / B; else tmp = (0.3333333333333333 * (B * x)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.2e-67], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-100], N[((-x) / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.2 \cdot 10^{-67}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-100}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.1999999999999994e-67Initial program 71.5%
Taylor expanded in F around -inf 88.4%
Taylor expanded in B around 0 44.3%
if -8.1999999999999994e-67 < F < 2.29999999999999994e-100Initial program 99.5%
Taylor expanded in F around -inf 31.0%
Taylor expanded in B around 0 19.3%
associate-*r/19.3%
distribute-lft-in19.3%
metadata-eval19.3%
neg-mul-119.3%
Simplified19.3%
Taylor expanded in x around inf 43.6%
associate-*r/43.6%
neg-mul-143.6%
Simplified43.6%
if 2.29999999999999994e-100 < F Initial program 62.2%
Taylor expanded in F around inf 60.8%
Taylor expanded in B around 0 42.5%
Taylor expanded in B around 0 48.7%
associate--l+48.7%
div-sub48.7%
Simplified48.7%
Final simplification45.7%
(FPCore (F B x) :precision binary64 (if (<= F -0.0105) (- (* B -0.16666666666666666) (/ (+ x 1.0) B)) (if (<= F 2.2e-100) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0105) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 2.2e-100) {
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 <= (-0.0105d0)) then
tmp = (b * (-0.16666666666666666d0)) - ((x + 1.0d0) / b)
else if (f <= 2.2d-100) 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 <= -0.0105) {
tmp = (B * -0.16666666666666666) - ((x + 1.0) / B);
} else if (F <= 2.2e-100) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0105: tmp = (B * -0.16666666666666666) - ((x + 1.0) / B) elif F <= 2.2e-100: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0105) tmp = Float64(Float64(B * -0.16666666666666666) - Float64(Float64(x + 1.0) / B)); elseif (F <= 2.2e-100) 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 <= -0.0105) tmp = (B * -0.16666666666666666) - ((x + 1.0) / B); elseif (F <= 2.2e-100) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0105], N[(N[(B * -0.16666666666666666), $MachinePrecision] - N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-100], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0105:\\
\;\;\;\;B \cdot -0.16666666666666666 - \frac{x + 1}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-100}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.0105000000000000007Initial program 65.8%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 70.5%
Taylor expanded in B around 0 47.2%
+-commutative47.2%
mul-1-neg47.2%
unsub-neg47.2%
*-commutative47.2%
Simplified47.2%
if -0.0105000000000000007 < F < 2.19999999999999989e-100Initial program 99.5%
Taylor expanded in F around -inf 33.0%
Taylor expanded in B around 0 21.0%
associate-*r/21.0%
distribute-lft-in21.0%
metadata-eval21.0%
neg-mul-121.0%
Simplified21.0%
Taylor expanded in x around inf 41.3%
associate-*r/41.3%
neg-mul-141.3%
Simplified41.3%
if 2.19999999999999989e-100 < F Initial program 62.2%
Taylor expanded in F around inf 60.8%
Taylor expanded in B around 0 42.5%
Taylor expanded in B around 0 48.5%
Final simplification45.5%
(FPCore (F B x) :precision binary64 (if (or (<= F -7.6e+232) (and (not (<= F -2e+188)) (<= F -2.6e+26))) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if ((F <= -7.6e+232) || (!(F <= -2e+188) && (F <= -2.6e+26))) {
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 <= (-7.6d+232)) .or. (.not. (f <= (-2d+188))) .and. (f <= (-2.6d+26))) 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 <= -7.6e+232) || (!(F <= -2e+188) && (F <= -2.6e+26))) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -7.6e+232) or (not (F <= -2e+188) and (F <= -2.6e+26)): tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if ((F <= -7.6e+232) || (!(F <= -2e+188) && (F <= -2.6e+26))) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= -7.6e+232) || (~((F <= -2e+188)) && (F <= -2.6e+26))) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -7.6e+232], And[N[Not[LessEqual[F, -2e+188]], $MachinePrecision], LessEqual[F, -2.6e+26]]], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.6 \cdot 10^{+232} \lor \neg \left(F \leq -2 \cdot 10^{+188}\right) \land F \leq -2.6 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -7.6000000000000002e232 or -2e188 < F < -2.60000000000000002e26Initial program 64.2%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 48.5%
associate-*r/48.5%
distribute-lft-in48.5%
metadata-eval48.5%
neg-mul-148.5%
Simplified48.5%
Taylor expanded in x around 0 37.5%
if -7.6000000000000002e232 < F < -2e188 or -2.60000000000000002e26 < F Initial program 79.9%
Taylor expanded in F around -inf 44.5%
Taylor expanded in B around 0 27.9%
associate-*r/27.9%
distribute-lft-in27.9%
metadata-eval27.9%
neg-mul-127.9%
Simplified27.9%
Taylor expanded in x around inf 37.1%
associate-*r/37.1%
neg-mul-137.1%
Simplified37.1%
Final simplification37.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.52e-63) (/ (- -1.0 x) B) (if (<= F 2.3e-100) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.52e-63) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.3e-100) {
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.52d-63)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.3d-100) 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.52e-63) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.3e-100) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.52e-63: tmp = (-1.0 - x) / B elif F <= 2.3e-100: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.52e-63) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.3e-100) 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.52e-63) tmp = (-1.0 - x) / B; elseif (F <= 2.3e-100) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.52e-63], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.3e-100], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.52 \cdot 10^{-63}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-100}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.5200000000000001e-63Initial program 71.5%
Taylor expanded in F around -inf 88.4%
Taylor expanded in B around 0 43.4%
associate-*r/43.4%
distribute-lft-in43.4%
metadata-eval43.4%
neg-mul-143.4%
Simplified43.4%
Taylor expanded in x around 0 43.4%
sub-neg43.4%
mul-1-neg43.4%
+-commutative43.4%
distribute-neg-frac43.4%
metadata-eval43.4%
sub-neg43.4%
div-sub43.4%
Simplified43.4%
if -1.5200000000000001e-63 < F < 2.29999999999999994e-100Initial program 99.5%
Taylor expanded in F around -inf 31.0%
Taylor expanded in B around 0 19.3%
associate-*r/19.3%
distribute-lft-in19.3%
metadata-eval19.3%
neg-mul-119.3%
Simplified19.3%
Taylor expanded in x around inf 43.6%
associate-*r/43.6%
neg-mul-143.6%
Simplified43.6%
if 2.29999999999999994e-100 < F Initial program 62.2%
Taylor expanded in F around inf 60.8%
Taylor expanded in B around 0 42.5%
Taylor expanded in B around 0 48.5%
Final simplification45.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.36e-62) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.36e-62) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.36d-62)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.36e-62) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.36e-62: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.36e-62) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.36e-62) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.36e-62], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.36 \cdot 10^{-62}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.35999999999999999e-62Initial program 71.5%
Taylor expanded in F around -inf 88.4%
Taylor expanded in B around 0 43.4%
associate-*r/43.4%
distribute-lft-in43.4%
metadata-eval43.4%
neg-mul-143.4%
Simplified43.4%
Taylor expanded in x around 0 43.4%
sub-neg43.4%
mul-1-neg43.4%
+-commutative43.4%
distribute-neg-frac43.4%
metadata-eval43.4%
sub-neg43.4%
div-sub43.4%
Simplified43.4%
if -1.35999999999999999e-62 < F Initial program 79.3%
Taylor expanded in F around -inf 38.9%
Taylor expanded in B around 0 26.3%
associate-*r/26.3%
distribute-lft-in26.3%
metadata-eval26.3%
neg-mul-126.3%
Simplified26.3%
Taylor expanded in x around inf 37.8%
associate-*r/37.8%
neg-mul-137.8%
Simplified37.8%
Final simplification39.7%
(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 76.6%
Taylor expanded in F around -inf 55.9%
Taylor expanded in B around 0 32.1%
associate-*r/32.1%
distribute-lft-in32.1%
metadata-eval32.1%
neg-mul-132.1%
Simplified32.1%
Taylor expanded in x around 0 10.9%
Final simplification10.9%
herbie shell --seed 2023258
(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))))))