
(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 19 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 -4e+48)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 55000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e+48) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 55000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e+48) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 55000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 55000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+48}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 55000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.00000000000000018e48Initial program 44.5%
distribute-lft-neg-in44.5%
+-commutative44.5%
associate-*l/65.9%
associate-/l*65.8%
fma-define65.8%
/-rgt-identity65.8%
remove-double-neg65.8%
fma-neg65.8%
Simplified66.0%
Taylor expanded in x around 0 74.3%
associate-*l/74.3%
*-lft-identity74.3%
+-commutative74.3%
unpow274.3%
fma-undefine74.3%
Simplified74.3%
Taylor expanded in F around -inf 99.9%
if -4.00000000000000018e48 < F < 5.5e7Initial program 75.8%
distribute-lft-neg-in75.8%
+-commutative75.8%
associate-*l/75.9%
associate-/l*75.9%
fma-define75.9%
/-rgt-identity75.9%
remove-double-neg75.9%
fma-neg75.9%
Simplified76.0%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
if 5.5e7 < F Initial program 52.9%
distribute-lft-neg-in52.9%
+-commutative52.9%
associate-*l/76.2%
associate-/l*76.1%
fma-define76.0%
/-rgt-identity76.0%
remove-double-neg76.0%
fma-neg76.1%
Simplified76.2%
Taylor expanded in x around 0 83.5%
associate-*l/83.4%
*-lft-identity83.4%
+-commutative83.4%
unpow283.4%
fma-undefine83.4%
Simplified83.4%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+83)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 55000000.0)
(- (/ (* F (pow (fma F F 2.0) -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 <= -5e+83) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 55000000.0) {
tmp = ((F * pow(fma(F, F, 2.0), -0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+83) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 55000000.0) tmp = Float64(Float64(Float64(F * (fma(F, F, 2.0) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+83], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 55000000.0], N[(N[(N[(F * N[Power[N[(F * F + 2.0), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+83}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 55000000:\\
\;\;\;\;\frac{F \cdot {\left(\mathsf{fma}\left(F, F, 2\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.00000000000000029e83Initial program 40.5%
distribute-lft-neg-in40.5%
+-commutative40.5%
associate-*l/64.4%
associate-/l*64.3%
fma-define64.3%
/-rgt-identity64.3%
remove-double-neg64.3%
fma-neg64.3%
Simplified64.4%
Taylor expanded in x around 0 71.5%
associate-*l/71.5%
*-lft-identity71.5%
+-commutative71.5%
unpow271.5%
fma-undefine71.5%
Simplified71.5%
Taylor expanded in F around -inf 100.0%
if -5.00000000000000029e83 < F < 5.5e7Initial program 75.9%
distribute-lft-neg-in75.9%
+-commutative75.9%
associate-*l/76.0%
associate-/l*76.0%
fma-define76.0%
/-rgt-identity76.0%
remove-double-neg76.0%
fma-neg76.0%
Simplified76.1%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.6%
inv-pow99.6%
sqrt-pow199.6%
metadata-eval99.6%
Applied egg-rr99.6%
if 5.5e7 < F Initial program 52.9%
distribute-lft-neg-in52.9%
+-commutative52.9%
associate-*l/76.2%
associate-/l*76.1%
fma-define76.0%
/-rgt-identity76.0%
remove-double-neg76.0%
fma-neg76.1%
Simplified76.2%
Taylor expanded in x around 0 83.5%
associate-*l/83.4%
*-lft-identity83.4%
+-commutative83.4%
unpow283.4%
fma-undefine83.4%
Simplified83.4%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 47.9%
distribute-lft-neg-in47.9%
+-commutative47.9%
associate-*l/66.6%
associate-/l*66.5%
fma-define66.5%
/-rgt-identity66.5%
remove-double-neg66.5%
fma-neg66.5%
Simplified66.6%
Taylor expanded in x around 0 77.5%
associate-*l/77.6%
*-lft-identity77.6%
+-commutative77.6%
unpow277.6%
fma-undefine77.6%
Simplified77.6%
Taylor expanded in F around -inf 97.4%
if -1.4199999999999999 < F < 1.44999999999999996Initial program 75.9%
distribute-lft-neg-in75.9%
+-commutative75.9%
associate-*l/75.9%
associate-/l*75.9%
fma-define75.9%
/-rgt-identity75.9%
remove-double-neg75.9%
fma-neg75.9%
Simplified76.0%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 97.9%
if 1.44999999999999996 < F Initial program 53.6%
distribute-lft-neg-in53.6%
+-commutative53.6%
associate-*l/76.5%
associate-/l*76.4%
fma-define76.4%
/-rgt-identity76.4%
remove-double-neg76.4%
fma-neg76.4%
Simplified76.5%
Taylor expanded in x around 0 83.7%
associate-*l/83.6%
*-lft-identity83.6%
+-commutative83.6%
unpow283.6%
fma-undefine83.6%
Simplified83.6%
Taylor expanded in F around inf 98.7%
Final simplification98.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -5.7e-68)
t_0
(if (<= F 56000000.0)
(/ (- x) (tan B))
(if (<= F 4.3e+51)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(if (<= F 2.3e+92)
(fabs t_0)
(if (<= F 6.5e+154) (/ 1.0 (sin B)) (/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -5.7e-68) {
tmp = t_0;
} else if (F <= 56000000.0) {
tmp = -x / tan(B);
} else if (F <= 4.3e+51) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else if (F <= 2.3e+92) {
tmp = fabs(t_0);
} else if (F <= 6.5e+154) {
tmp = 1.0 / sin(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) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-5.7d-68)) then
tmp = t_0
else if (f <= 56000000.0d0) then
tmp = -x / tan(b)
else if (f <= 4.3d+51) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else if (f <= 2.3d+92) then
tmp = abs(t_0)
else if (f <= 6.5d+154) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -5.7e-68) {
tmp = t_0;
} else if (F <= 56000000.0) {
tmp = -x / Math.tan(B);
} else if (F <= 4.3e+51) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else if (F <= 2.3e+92) {
tmp = Math.abs(t_0);
} else if (F <= 6.5e+154) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -5.7e-68: tmp = t_0 elif F <= 56000000.0: tmp = -x / math.tan(B) elif F <= 4.3e+51: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) elif F <= 2.3e+92: tmp = math.fabs(t_0) elif F <= 6.5e+154: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -5.7e-68) tmp = t_0; elseif (F <= 56000000.0) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 4.3e+51) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); elseif (F <= 2.3e+92) tmp = abs(t_0); elseif (F <= 6.5e+154) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -5.7e-68) tmp = t_0; elseif (F <= 56000000.0) tmp = -x / tan(B); elseif (F <= 4.3e+51) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); elseif (F <= 2.3e+92) tmp = abs(t_0); elseif (F <= 6.5e+154) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.7e-68], t$95$0, If[LessEqual[F, 56000000.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.3e+51], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e+92], N[Abs[t$95$0], $MachinePrecision], If[LessEqual[F, 6.5e+154], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.7 \cdot 10^{-68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 56000000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+51}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+92}:\\
\;\;\;\;\left|t\_0\right|\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.7000000000000002e-68Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 77.7%
if -5.7000000000000002e-68 < F < 5.6e7Initial program 76.2%
distribute-lft-neg-in76.2%
+-commutative76.2%
fma-define76.2%
+-commutative76.2%
*-commutative76.2%
fma-define76.2%
fma-define76.2%
metadata-eval76.2%
metadata-eval76.2%
associate-*r/76.3%
*-rgt-identity76.3%
Simplified76.3%
Taylor expanded in F around 0 76.4%
mul-1-neg76.4%
associate-/l*76.4%
Simplified76.4%
clear-num76.3%
tan-quot76.3%
div-inv76.4%
Applied egg-rr76.4%
if 5.6e7 < F < 4.2999999999999997e51Initial program 74.2%
Taylor expanded in B around 0 71.4%
Taylor expanded in F around inf 96.6%
if 4.2999999999999997e51 < F < 2.29999999999999998e92Initial program 39.7%
distribute-lft-neg-in39.7%
+-commutative39.7%
associate-*l/40.0%
associate-/l*40.0%
fma-define40.0%
/-rgt-identity40.0%
remove-double-neg40.0%
fma-neg40.0%
Simplified39.7%
Taylor expanded in F around -inf 79.6%
associate-/r*79.6%
Simplified79.6%
Taylor expanded in B around 0 79.6%
add-sqr-sqrt40.0%
sqrt-unprod46.9%
pow246.9%
Applied egg-rr46.9%
unpow246.9%
rem-sqrt-square46.9%
Simplified46.9%
if 2.29999999999999998e92 < F < 6.5000000000000005e154Initial program 79.6%
distribute-lft-neg-in79.6%
+-commutative79.6%
associate-*l/99.7%
associate-/l*99.4%
fma-define99.3%
/-rgt-identity99.3%
remove-double-neg99.3%
fma-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
associate-*l/99.3%
*-lft-identity99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
Taylor expanded in F around inf 99.8%
Taylor expanded in x around 0 73.2%
if 6.5000000000000005e154 < F Initial program 34.6%
distribute-lft-neg-in34.6%
+-commutative34.6%
associate-*l/68.5%
associate-/l*68.5%
fma-define68.5%
/-rgt-identity68.5%
remove-double-neg68.5%
fma-neg68.5%
Simplified68.8%
Taylor expanded in x around 0 68.8%
associate-*l/68.8%
*-lft-identity68.8%
+-commutative68.8%
unpow268.8%
fma-undefine68.8%
Simplified68.8%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 70.6%
Final simplification75.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7e-68)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 57000000.0)
(/ (- x) (tan B))
(if (<= F 4.2e+51)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(if (<= F 3.1e+90)
(fabs (- (/ -1.0 B) t_0))
(if (<= F 4.2e+153) (/ 1.0 (sin B)) (/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7e-68) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 57000000.0) {
tmp = -x / tan(B);
} else if (F <= 4.2e+51) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else if (F <= 3.1e+90) {
tmp = fabs(((-1.0 / B) - t_0));
} else if (F <= 4.2e+153) {
tmp = 1.0 / sin(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) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7d-68)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 57000000.0d0) then
tmp = -x / tan(b)
else if (f <= 4.2d+51) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else if (f <= 3.1d+90) then
tmp = abs((((-1.0d0) / b) - t_0))
else if (f <= 4.2d+153) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7e-68) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 57000000.0) {
tmp = -x / Math.tan(B);
} else if (F <= 4.2e+51) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else if (F <= 3.1e+90) {
tmp = Math.abs(((-1.0 / B) - t_0));
} else if (F <= 4.2e+153) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7e-68: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 57000000.0: tmp = -x / math.tan(B) elif F <= 4.2e+51: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) elif F <= 3.1e+90: tmp = math.fabs(((-1.0 / B) - t_0)) elif F <= 4.2e+153: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7e-68) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 57000000.0) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 4.2e+51) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); elseif (F <= 3.1e+90) tmp = abs(Float64(Float64(-1.0 / B) - t_0)); elseif (F <= 4.2e+153) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7e-68) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 57000000.0) tmp = -x / tan(B); elseif (F <= 4.2e+51) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); elseif (F <= 3.1e+90) tmp = abs(((-1.0 / B) - t_0)); elseif (F <= 4.2e+153) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7e-68], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 57000000.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e+51], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e+90], N[Abs[N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[F, 4.2e+153], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 57000000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{+51}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{+90}:\\
\;\;\;\;\left|\frac{-1}{B} - t\_0\right|\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.00000000000000026e-68Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in x around 0 81.7%
associate-*l/81.8%
*-lft-identity81.8%
+-commutative81.8%
unpow281.8%
fma-undefine81.8%
Simplified81.8%
Taylor expanded in F around -inf 91.3%
if -7.00000000000000026e-68 < F < 5.7e7Initial program 76.2%
distribute-lft-neg-in76.2%
+-commutative76.2%
fma-define76.2%
+-commutative76.2%
*-commutative76.2%
fma-define76.2%
fma-define76.2%
metadata-eval76.2%
metadata-eval76.2%
associate-*r/76.3%
*-rgt-identity76.3%
Simplified76.3%
Taylor expanded in F around 0 76.4%
mul-1-neg76.4%
associate-/l*76.4%
Simplified76.4%
clear-num76.3%
tan-quot76.3%
div-inv76.4%
Applied egg-rr76.4%
if 5.7e7 < F < 4.2000000000000002e51Initial program 74.2%
Taylor expanded in B around 0 71.4%
Taylor expanded in F around inf 96.6%
if 4.2000000000000002e51 < F < 3.09999999999999988e90Initial program 39.7%
distribute-lft-neg-in39.7%
+-commutative39.7%
associate-*l/40.0%
associate-/l*40.0%
fma-define40.0%
/-rgt-identity40.0%
remove-double-neg40.0%
fma-neg40.0%
Simplified39.7%
Taylor expanded in F around -inf 79.6%
associate-/r*79.6%
Simplified79.6%
Taylor expanded in B around 0 79.6%
add-sqr-sqrt40.0%
sqrt-unprod46.9%
pow246.9%
Applied egg-rr46.9%
unpow246.9%
rem-sqrt-square46.9%
Simplified46.9%
if 3.09999999999999988e90 < F < 4.20000000000000033e153Initial program 79.6%
distribute-lft-neg-in79.6%
+-commutative79.6%
associate-*l/99.7%
associate-/l*99.4%
fma-define99.3%
/-rgt-identity99.3%
remove-double-neg99.3%
fma-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
associate-*l/99.3%
*-lft-identity99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
Taylor expanded in F around inf 99.8%
Taylor expanded in x around 0 73.2%
if 4.20000000000000033e153 < F Initial program 34.6%
distribute-lft-neg-in34.6%
+-commutative34.6%
associate-*l/68.5%
associate-/l*68.5%
fma-define68.5%
/-rgt-identity68.5%
remove-double-neg68.5%
fma-neg68.5%
Simplified68.8%
Taylor expanded in x around 0 68.8%
associate-*l/68.8%
*-lft-identity68.8%
+-commutative68.8%
unpow268.8%
fma-undefine68.8%
Simplified68.8%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 70.6%
Final simplification79.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.15e-6)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.09)
(- (* F (* (sqrt 0.5) (/ 1.0 B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.15e-6) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.15d-6)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.09d0) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.15e-6) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.09) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.15e-6: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.09: tmp = (F * (math.sqrt(0.5) * (1.0 / B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.15e-6) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.09) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.15e-6) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.09) tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.15e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.09], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / 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 -3.15 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.09:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.14999999999999991e-6Initial program 49.7%
distribute-lft-neg-in49.7%
+-commutative49.7%
associate-*l/67.8%
associate-/l*67.7%
fma-define67.7%
/-rgt-identity67.7%
remove-double-neg67.7%
fma-neg67.7%
Simplified67.8%
Taylor expanded in x around 0 78.2%
associate-*l/78.3%
*-lft-identity78.3%
+-commutative78.3%
unpow278.3%
fma-undefine78.3%
Simplified78.3%
Taylor expanded in F around -inf 94.4%
if -3.14999999999999991e-6 < F < 0.089999999999999997Initial program 75.9%
distribute-lft-neg-in75.9%
+-commutative75.9%
associate-*l/76.0%
associate-/l*76.0%
fma-define76.0%
/-rgt-identity76.0%
remove-double-neg76.0%
fma-neg76.0%
Simplified76.1%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in B around 0 88.6%
+-commutative88.6%
unpow288.6%
fma-undefine88.6%
Simplified88.6%
Taylor expanded in F around 0 87.8%
if 0.089999999999999997 < F Initial program 53.4%
distribute-lft-neg-in53.4%
+-commutative53.4%
associate-*l/75.8%
associate-/l*75.6%
fma-define75.6%
/-rgt-identity75.6%
remove-double-neg75.6%
fma-neg75.6%
Simplified75.8%
Taylor expanded in x around 0 84.1%
associate-*l/84.1%
*-lft-identity84.1%
+-commutative84.1%
unpow284.1%
fma-undefine84.1%
Simplified84.1%
Taylor expanded in F around inf 97.6%
Final simplification92.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e-73)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.25e-69) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45e-73) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.25e-69) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d-73)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.25d-69) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45e-73) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.25e-69) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45e-73: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.25e-69: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e-73) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.25e-69) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45e-73) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.25e-69) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-73], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.25e-69], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-73}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.25 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.45e-73Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in x around 0 81.7%
associate-*l/81.8%
*-lft-identity81.8%
+-commutative81.8%
unpow281.8%
fma-undefine81.8%
Simplified81.8%
Taylor expanded in F around -inf 91.3%
if -1.45e-73 < F < 4.25000000000000023e-69Initial program 76.8%
distribute-lft-neg-in76.8%
+-commutative76.8%
fma-define76.8%
+-commutative76.8%
*-commutative76.8%
fma-define76.8%
fma-define76.8%
metadata-eval76.8%
metadata-eval76.8%
associate-*r/76.9%
*-rgt-identity76.9%
Simplified76.9%
Taylor expanded in F around 0 80.4%
mul-1-neg80.4%
associate-/l*80.5%
Simplified80.5%
clear-num80.4%
tan-quot80.3%
div-inv80.5%
Applied egg-rr80.5%
if 4.25000000000000023e-69 < F Initial program 56.8%
distribute-lft-neg-in56.8%
+-commutative56.8%
associate-*l/75.3%
associate-/l*75.2%
fma-define75.2%
/-rgt-identity75.2%
remove-double-neg75.2%
fma-neg75.2%
Simplified75.3%
Taylor expanded in x around 0 86.9%
associate-*l/86.8%
*-lft-identity86.8%
+-commutative86.8%
unpow286.8%
fma-undefine86.8%
Simplified86.8%
Taylor expanded in F around inf 90.7%
Final simplification86.8%
(FPCore (F B x)
:precision binary64
(if (<= F -3.7e-68)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 85000000.0)
(/ (- x) (tan B))
(if (<= F 1.6e+126)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+
(/ (- 1.0 x) B)
(* B (+ 0.16666666666666666 (* x 0.3333333333333333))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-68) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 85000000.0) {
tmp = -x / tan(B);
} else if (F <= 1.6e+126) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.7d-68)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 85000000.0d0) then
tmp = -x / tan(b)
else if (f <= 1.6d+126) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = ((1.0d0 - x) / b) + (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.7e-68) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 85000000.0) {
tmp = -x / Math.tan(B);
} else if (F <= 1.6e+126) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.7e-68: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 85000000.0: tmp = -x / math.tan(B) elif F <= 1.6e+126: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.7e-68) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 85000000.0) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.6e+126) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.7e-68) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 85000000.0) tmp = -x / tan(B); elseif (F <= 1.6e+126) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.7e-68], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 85000000.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e+126], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.7 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 85000000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+126}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -3.70000000000000002e-68Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 77.7%
if -3.70000000000000002e-68 < F < 8.5e7Initial program 76.2%
distribute-lft-neg-in76.2%
+-commutative76.2%
fma-define76.2%
+-commutative76.2%
*-commutative76.2%
fma-define76.2%
fma-define76.2%
metadata-eval76.2%
metadata-eval76.2%
associate-*r/76.3%
*-rgt-identity76.3%
Simplified76.3%
Taylor expanded in F around 0 76.4%
mul-1-neg76.4%
associate-/l*76.4%
Simplified76.4%
clear-num76.3%
tan-quot76.3%
div-inv76.4%
Applied egg-rr76.4%
if 8.5e7 < F < 1.5999999999999999e126Initial program 70.5%
Taylor expanded in B around 0 57.3%
Taylor expanded in F around inf 74.1%
if 1.5999999999999999e126 < F Initial program 42.2%
distribute-lft-neg-in42.2%
+-commutative42.2%
associate-*l/74.3%
associate-/l*74.1%
fma-define74.1%
/-rgt-identity74.1%
remove-double-neg74.1%
fma-neg74.1%
Simplified74.4%
Taylor expanded in x around 0 74.4%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
fma-undefine74.4%
Simplified74.4%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 67.0%
associate--l+67.0%
*-commutative67.0%
div-sub67.0%
Simplified67.0%
Final simplification74.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-73)
(/ (- -1.0 x) B)
(if (<= F 0.58)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(if (<= F 2.05e+154) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-73) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.58) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else if (F <= 2.05e+154) {
tmp = 1.0 / sin(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.35d-73)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 0.58d0) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (x / b)
else if (f <= 2.05d+154) then
tmp = 1.0d0 / sin(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.35e-73) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.58) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else if (F <= 2.05e+154) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-73: tmp = (-1.0 - x) / B elif F <= 0.58: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) elif F <= 2.05e+154: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-73) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 0.58) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); elseif (F <= 2.05e+154) tmp = Float64(1.0 / sin(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.35e-73) tmp = (-1.0 - x) / B; elseif (F <= 0.58) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); elseif (F <= 2.05e+154) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-73], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.58], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e+154], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-73}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 0.58:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.34999999999999997e-73Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 52.4%
associate-*r/52.4%
mul-1-neg52.4%
Simplified52.4%
if -1.34999999999999997e-73 < F < 0.57999999999999996Initial program 75.6%
distribute-lft-neg-in75.6%
+-commutative75.6%
fma-define75.6%
+-commutative75.6%
*-commutative75.6%
fma-define75.6%
fma-define75.6%
metadata-eval75.6%
metadata-eval75.6%
associate-*r/75.7%
*-rgt-identity75.7%
Simplified75.7%
Taylor expanded in F around 0 77.4%
mul-1-neg77.4%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in B around 0 36.8%
if 0.57999999999999996 < F < 2.05e154Initial program 74.4%
distribute-lft-neg-in74.4%
+-commutative74.4%
associate-*l/85.4%
associate-/l*85.1%
fma-define85.0%
/-rgt-identity85.0%
remove-double-neg85.0%
fma-neg85.1%
Simplified85.1%
Taylor expanded in x around 0 99.5%
associate-*l/99.3%
*-lft-identity99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
Taylor expanded in F around inf 95.1%
Taylor expanded in x around 0 56.5%
if 2.05e154 < F Initial program 34.6%
distribute-lft-neg-in34.6%
+-commutative34.6%
associate-*l/68.5%
associate-/l*68.5%
fma-define68.5%
/-rgt-identity68.5%
remove-double-neg68.5%
fma-neg68.5%
Simplified68.8%
Taylor expanded in x around 0 68.8%
associate-*l/68.8%
*-lft-identity68.8%
+-commutative68.8%
unpow268.8%
fma-undefine68.8%
Simplified68.8%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 70.6%
Final simplification48.4%
(FPCore (F B x)
:precision binary64
(if (<= F -2.7e-69)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 2.7e+90)
(/ (- x) (tan B))
(if (<= F 6e+154) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e-69) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.7e+90) {
tmp = -x / tan(B);
} else if (F <= 6e+154) {
tmp = 1.0 / sin(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 <= (-2.7d-69)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.7d+90) then
tmp = -x / tan(b)
else if (f <= 6d+154) then
tmp = 1.0d0 / sin(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 <= -2.7e-69) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.7e+90) {
tmp = -x / Math.tan(B);
} else if (F <= 6e+154) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.7e-69: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.7e+90: tmp = -x / math.tan(B) elif F <= 6e+154: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.7e-69) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.7e+90) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 6e+154) tmp = Float64(1.0 / sin(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 <= -2.7e-69) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.7e+90) tmp = -x / tan(B); elseif (F <= 6e+154) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.7e-69], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e+90], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+154], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.7 \cdot 10^{-69}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{+90}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.6999999999999997e-69Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 77.7%
if -2.6999999999999997e-69 < F < 2.7e90Initial program 74.7%
distribute-lft-neg-in74.7%
+-commutative74.7%
fma-define74.7%
+-commutative74.7%
*-commutative74.7%
fma-define74.7%
fma-define74.7%
metadata-eval74.7%
metadata-eval74.7%
associate-*r/74.8%
*-rgt-identity74.8%
Simplified74.8%
Taylor expanded in F around 0 74.3%
mul-1-neg74.3%
associate-/l*74.4%
Simplified74.4%
clear-num74.3%
tan-quot74.3%
div-inv74.4%
Applied egg-rr74.4%
if 2.7e90 < F < 6.00000000000000052e154Initial program 79.6%
distribute-lft-neg-in79.6%
+-commutative79.6%
associate-*l/99.7%
associate-/l*99.4%
fma-define99.3%
/-rgt-identity99.3%
remove-double-neg99.3%
fma-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
associate-*l/99.3%
*-lft-identity99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
Taylor expanded in F around inf 99.8%
Taylor expanded in x around 0 73.2%
if 6.00000000000000052e154 < F Initial program 34.6%
distribute-lft-neg-in34.6%
+-commutative34.6%
associate-*l/68.5%
associate-/l*68.5%
fma-define68.5%
/-rgt-identity68.5%
remove-double-neg68.5%
fma-neg68.5%
Simplified68.8%
Taylor expanded in x around 0 68.8%
associate-*l/68.8%
*-lft-identity68.8%
+-commutative68.8%
unpow268.8%
fma-undefine68.8%
Simplified68.8%
Taylor expanded in F around inf 99.9%
Taylor expanded in B around 0 70.6%
Final simplification74.7%
(FPCore (F B x) :precision binary64 (if (or (<= x -6.2e-118) (not (<= x 2.75e-227))) (/ (- x) (tan B)) (/ 1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -6.2e-118) || !(x <= 2.75e-227)) {
tmp = -x / tan(B);
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-6.2d-118)) .or. (.not. (x <= 2.75d-227))) then
tmp = -x / tan(b)
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -6.2e-118) || !(x <= 2.75e-227)) {
tmp = -x / Math.tan(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -6.2e-118) or not (x <= 2.75e-227): tmp = -x / math.tan(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -6.2e-118) || !(x <= 2.75e-227)) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -6.2e-118) || ~((x <= 2.75e-227))) tmp = -x / tan(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -6.2e-118], N[Not[LessEqual[x, 2.75e-227]], $MachinePrecision]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-118} \lor \neg \left(x \leq 2.75 \cdot 10^{-227}\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if x < -6.2000000000000002e-118 or 2.75e-227 < x Initial program 61.0%
distribute-lft-neg-in61.0%
+-commutative61.0%
fma-define61.0%
+-commutative61.0%
*-commutative61.0%
fma-define61.0%
fma-define61.0%
metadata-eval61.0%
metadata-eval61.0%
associate-*r/61.1%
*-rgt-identity61.1%
Simplified61.1%
Taylor expanded in F around 0 82.2%
mul-1-neg82.2%
associate-/l*82.2%
Simplified82.2%
clear-num82.1%
tan-quot82.1%
div-inv82.3%
Applied egg-rr82.3%
if -6.2000000000000002e-118 < x < 2.75e-227Initial program 72.0%
distribute-lft-neg-in72.0%
+-commutative72.0%
associate-*l/75.3%
associate-/l*75.1%
fma-define75.1%
/-rgt-identity75.1%
remove-double-neg75.1%
fma-neg75.1%
Simplified75.2%
Taylor expanded in x around 0 75.2%
associate-*l/75.2%
*-lft-identity75.2%
+-commutative75.2%
unpow275.2%
fma-undefine75.2%
Simplified75.2%
Taylor expanded in F around inf 33.9%
Taylor expanded in x around 0 33.9%
Final simplification70.2%
(FPCore (F B x)
:precision binary64
(if (<= F -7e-68)
(/ (- -1.0 x) B)
(if (<= F 4.2e-70)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-70) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (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 <= (-7d-68)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.2d-70) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (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 <= -7e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-70) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7e-68: tmp = (-1.0 - x) / B elif F <= 4.2e-70: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7e-68) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.2e-70) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - 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 <= -7e-68) tmp = (-1.0 - x) / B; elseif (F <= 4.2e-70) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e-70], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-70}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.00000000000000026e-68Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 52.4%
associate-*r/52.4%
mul-1-neg52.4%
Simplified52.4%
if -7.00000000000000026e-68 < F < 4.2000000000000002e-70Initial program 77.3%
distribute-lft-neg-in77.3%
+-commutative77.3%
fma-define77.3%
+-commutative77.3%
*-commutative77.3%
fma-define77.3%
fma-define77.3%
metadata-eval77.3%
metadata-eval77.3%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
Taylor expanded in F around 0 80.0%
mul-1-neg80.0%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in B around 0 38.9%
if 4.2000000000000002e-70 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
associate-*l/74.7%
associate-/l*74.6%
fma-define74.6%
/-rgt-identity74.6%
remove-double-neg74.6%
fma-neg74.6%
Simplified74.7%
Taylor expanded in x around 0 87.1%
associate-*l/87.0%
*-lft-identity87.0%
+-commutative87.0%
unpow287.0%
fma-undefine87.0%
Simplified87.0%
Taylor expanded in F around inf 89.3%
Taylor expanded in B around 0 49.8%
Final simplification46.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= F -3.4e+220)
t_0
(if (<= F -5e-8) (/ -1.0 B) (if (<= F 4.3e-69) t_0 (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -3.4e+220) {
tmp = t_0;
} else if (F <= -5e-8) {
tmp = -1.0 / B;
} else if (F <= 4.3e-69) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / b
if (f <= (-3.4d+220)) then
tmp = t_0
else if (f <= (-5d-8)) then
tmp = (-1.0d0) / b
else if (f <= 4.3d-69) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -3.4e+220) {
tmp = t_0;
} else if (F <= -5e-8) {
tmp = -1.0 / B;
} else if (F <= 4.3e-69) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if F <= -3.4e+220: tmp = t_0 elif F <= -5e-8: tmp = -1.0 / B elif F <= 4.3e-69: tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / B) tmp = 0.0 if (F <= -3.4e+220) tmp = t_0; elseif (F <= -5e-8) tmp = Float64(-1.0 / B); elseif (F <= 4.3e-69) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / B; tmp = 0.0; if (F <= -3.4e+220) tmp = t_0; elseif (F <= -5e-8) tmp = -1.0 / B; elseif (F <= 4.3e-69) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -3.4e+220], t$95$0, If[LessEqual[F, -5e-8], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 4.3e-69], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;F \leq -3.4 \cdot 10^{+220}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{-69}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.4e220 or -4.9999999999999998e-8 < F < 4.3e-69Initial program 71.4%
distribute-lft-neg-in71.4%
+-commutative71.4%
fma-define71.4%
+-commutative71.4%
*-commutative71.4%
fma-define71.4%
fma-define71.4%
metadata-eval71.4%
metadata-eval71.4%
associate-*r/71.5%
*-rgt-identity71.5%
Simplified71.5%
Taylor expanded in F around 0 79.7%
mul-1-neg79.7%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in B around 0 38.2%
if -3.4e220 < F < -4.9999999999999998e-8Initial program 56.2%
distribute-lft-neg-in56.2%
+-commutative56.2%
associate-*l/66.9%
associate-/l*66.8%
fma-define66.8%
/-rgt-identity66.8%
remove-double-neg66.8%
fma-neg66.8%
Simplified66.9%
Taylor expanded in F around -inf 90.6%
associate-/r*90.6%
Simplified90.6%
Taylor expanded in B around 0 74.8%
Taylor expanded in x around 0 36.4%
if 4.3e-69 < F Initial program 56.8%
distribute-lft-neg-in56.8%
+-commutative56.8%
associate-*l/75.3%
associate-/l*75.2%
fma-define75.2%
/-rgt-identity75.2%
remove-double-neg75.2%
fma-neg75.2%
Simplified75.3%
Taylor expanded in x around 0 86.9%
associate-*l/86.8%
*-lft-identity86.8%
+-commutative86.8%
unpow286.8%
fma-undefine86.8%
Simplified86.8%
Taylor expanded in F around inf 90.7%
Taylor expanded in B around 0 50.8%
Final simplification42.2%
(FPCore (F B x)
:precision binary64
(if (<= F -5.7e+219)
(* x (/ -1.0 B))
(if (<= F -4.8e-8)
(/ -1.0 B)
(if (<= F 6.8e-69) (/ (- x) B) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.7e+219) {
tmp = x * (-1.0 / B);
} else if (F <= -4.8e-8) {
tmp = -1.0 / B;
} else if (F <= 6.8e-69) {
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 <= (-5.7d+219)) then
tmp = x * ((-1.0d0) / b)
else if (f <= (-4.8d-8)) then
tmp = (-1.0d0) / b
else if (f <= 6.8d-69) 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 <= -5.7e+219) {
tmp = x * (-1.0 / B);
} else if (F <= -4.8e-8) {
tmp = -1.0 / B;
} else if (F <= 6.8e-69) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.7e+219: tmp = x * (-1.0 / B) elif F <= -4.8e-8: tmp = -1.0 / B elif F <= 6.8e-69: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.7e+219) tmp = Float64(x * Float64(-1.0 / B)); elseif (F <= -4.8e-8) tmp = Float64(-1.0 / B); elseif (F <= 6.8e-69) 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 <= -5.7e+219) tmp = x * (-1.0 / B); elseif (F <= -4.8e-8) tmp = -1.0 / B; elseif (F <= 6.8e-69) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.7e+219], N[(x * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.8e-8], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 6.8e-69], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.7 \cdot 10^{+219}:\\
\;\;\;\;x \cdot \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.70000000000000026e219Initial program 30.9%
distribute-lft-neg-in30.9%
+-commutative30.9%
fma-define30.9%
+-commutative30.9%
*-commutative30.9%
fma-define30.9%
fma-define30.9%
metadata-eval30.9%
metadata-eval30.9%
associate-*r/31.2%
*-rgt-identity31.2%
Simplified31.2%
Taylor expanded in F around 0 73.4%
mul-1-neg73.4%
associate-/l*73.2%
Simplified73.2%
Taylor expanded in B around 0 51.5%
if -5.70000000000000026e219 < F < -4.79999999999999997e-8Initial program 56.2%
distribute-lft-neg-in56.2%
+-commutative56.2%
associate-*l/66.9%
associate-/l*66.8%
fma-define66.8%
/-rgt-identity66.8%
remove-double-neg66.8%
fma-neg66.8%
Simplified66.9%
Taylor expanded in F around -inf 90.6%
associate-/r*90.6%
Simplified90.6%
Taylor expanded in B around 0 74.8%
Taylor expanded in x around 0 36.4%
if -4.79999999999999997e-8 < F < 6.80000000000000016e-69Initial program 76.1%
distribute-lft-neg-in76.1%
+-commutative76.1%
fma-define76.1%
+-commutative76.1%
*-commutative76.1%
fma-define76.1%
fma-define76.1%
metadata-eval76.1%
metadata-eval76.1%
associate-*r/76.2%
*-rgt-identity76.2%
Simplified76.2%
Taylor expanded in F around 0 80.4%
mul-1-neg80.4%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in B around 0 36.7%
if 6.80000000000000016e-69 < F Initial program 56.8%
distribute-lft-neg-in56.8%
+-commutative56.8%
associate-*l/75.3%
associate-/l*75.2%
fma-define75.2%
/-rgt-identity75.2%
remove-double-neg75.2%
fma-neg75.2%
Simplified75.3%
Taylor expanded in x around 0 86.9%
associate-*l/86.8%
*-lft-identity86.8%
+-commutative86.8%
unpow286.8%
fma-undefine86.8%
Simplified86.8%
Taylor expanded in F around inf 90.7%
Taylor expanded in B around 0 50.8%
Final simplification42.2%
(FPCore (F B x)
:precision binary64
(if (<= F -6.8e-68)
(/ (- -1.0 x) B)
(if (<= F 1.16e-69)
(- (/ (- x) B) (* -0.3333333333333333 (* B x)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.8e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.16e-69) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} 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 <= (-6.8d-68)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.16d-69) then
tmp = (-x / b) - ((-0.3333333333333333d0) * (b * x))
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 <= -6.8e-68) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.16e-69) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.8e-68: tmp = (-1.0 - x) / B elif F <= 1.16e-69: tmp = (-x / B) - (-0.3333333333333333 * (B * x)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.8e-68) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.16e-69) tmp = Float64(Float64(Float64(-x) / B) - Float64(-0.3333333333333333 * Float64(B * x))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.8e-68) tmp = (-1.0 - x) / B; elseif (F <= 1.16e-69) tmp = (-x / B) - (-0.3333333333333333 * (B * x)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.8e-68], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.16e-69], N[(N[((-x) / B), $MachinePrecision] - N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.8 \cdot 10^{-68}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{B} - -0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.80000000000000037e-68Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 52.4%
associate-*r/52.4%
mul-1-neg52.4%
Simplified52.4%
if -6.80000000000000037e-68 < F < 1.15999999999999989e-69Initial program 77.3%
distribute-lft-neg-in77.3%
+-commutative77.3%
fma-define77.3%
+-commutative77.3%
*-commutative77.3%
fma-define77.3%
fma-define77.3%
metadata-eval77.3%
metadata-eval77.3%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
Taylor expanded in F around 0 80.0%
mul-1-neg80.0%
associate-/l*80.1%
Simplified80.1%
add-cube-cbrt78.9%
pow379.0%
clear-num78.9%
tan-quot79.0%
Applied egg-rr79.0%
Taylor expanded in B around 0 38.9%
if 1.15999999999999989e-69 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
associate-*l/74.7%
associate-/l*74.6%
fma-define74.6%
/-rgt-identity74.6%
remove-double-neg74.6%
fma-neg74.6%
Simplified74.7%
Taylor expanded in x around 0 87.1%
associate-*l/87.0%
*-lft-identity87.0%
+-commutative87.0%
unpow287.0%
fma-undefine87.0%
Simplified87.0%
Taylor expanded in F around inf 89.3%
Taylor expanded in B around 0 49.8%
Final simplification46.3%
(FPCore (F B x)
:precision binary64
(if (<= F -5.7e-75)
(/ (- -1.0 x) B)
(if (<= F 2.2e-70)
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.7e-75) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.2e-70) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} 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 <= (-5.7d-75)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.2d-70) then
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
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 <= -5.7e-75) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.2e-70) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.7e-75: tmp = (-1.0 - x) / B elif F <= 2.2e-70: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.7e-75) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.2e-70) tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.7e-75) tmp = (-1.0 - x) / B; elseif (F <= 2.2e-70) tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.7e-75], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.2e-70], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.7 \cdot 10^{-75}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-70}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.69999999999999966e-75Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 52.4%
associate-*r/52.4%
mul-1-neg52.4%
Simplified52.4%
if -5.69999999999999966e-75 < F < 2.1999999999999999e-70Initial program 77.3%
distribute-lft-neg-in77.3%
+-commutative77.3%
fma-define77.3%
+-commutative77.3%
*-commutative77.3%
fma-define77.3%
fma-define77.3%
metadata-eval77.3%
metadata-eval77.3%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
Taylor expanded in F around 0 80.0%
mul-1-neg80.0%
associate-/l*80.1%
Simplified80.1%
Taylor expanded in B around 0 38.8%
if 2.1999999999999999e-70 < F Initial program 56.6%
distribute-lft-neg-in56.6%
+-commutative56.6%
associate-*l/74.7%
associate-/l*74.6%
fma-define74.6%
/-rgt-identity74.6%
remove-double-neg74.6%
fma-neg74.6%
Simplified74.7%
Taylor expanded in x around 0 87.1%
associate-*l/87.0%
*-lft-identity87.0%
+-commutative87.0%
unpow287.0%
fma-undefine87.0%
Simplified87.0%
Taylor expanded in F around inf 89.3%
Taylor expanded in B around 0 49.8%
Final simplification46.2%
(FPCore (F B x) :precision binary64 (if (<= F -8e-72) (/ (- -1.0 x) B) (if (<= F 5e-69) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8e-72) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-69) {
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 <= (-8d-72)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5d-69) 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 <= -8e-72) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-69) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8e-72: tmp = (-1.0 - x) / B elif F <= 5e-69: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8e-72) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5e-69) 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 <= -8e-72) tmp = (-1.0 - x) / B; elseif (F <= 5e-69) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8e-72], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5e-69], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{-72}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.9999999999999997e-72Initial program 53.3%
distribute-lft-neg-in53.3%
+-commutative53.3%
associate-*l/68.5%
associate-/l*68.4%
fma-define68.4%
/-rgt-identity68.4%
remove-double-neg68.4%
fma-neg68.4%
Simplified68.6%
Taylor expanded in F around -inf 91.1%
associate-/r*91.0%
Simplified91.0%
Taylor expanded in B around 0 52.4%
associate-*r/52.4%
mul-1-neg52.4%
Simplified52.4%
if -7.9999999999999997e-72 < F < 5.00000000000000033e-69Initial program 76.8%
distribute-lft-neg-in76.8%
+-commutative76.8%
fma-define76.8%
+-commutative76.8%
*-commutative76.8%
fma-define76.8%
fma-define76.8%
metadata-eval76.8%
metadata-eval76.8%
associate-*r/76.9%
*-rgt-identity76.9%
Simplified76.9%
Taylor expanded in F around 0 80.4%
mul-1-neg80.4%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in B around 0 38.1%
if 5.00000000000000033e-69 < F Initial program 56.8%
distribute-lft-neg-in56.8%
+-commutative56.8%
associate-*l/75.3%
associate-/l*75.2%
fma-define75.2%
/-rgt-identity75.2%
remove-double-neg75.2%
fma-neg75.2%
Simplified75.3%
Taylor expanded in x around 0 86.9%
associate-*l/86.8%
*-lft-identity86.8%
+-commutative86.8%
unpow286.8%
fma-undefine86.8%
Simplified86.8%
Taylor expanded in F around inf 90.7%
Taylor expanded in B around 0 50.8%
Final simplification46.2%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 63.8%
distribute-lft-neg-in63.8%
+-commutative63.8%
fma-define63.8%
+-commutative63.8%
*-commutative63.8%
fma-define63.8%
fma-define63.8%
metadata-eval63.8%
metadata-eval63.8%
associate-*r/63.9%
*-rgt-identity63.9%
Simplified63.9%
Taylor expanded in F around 0 64.7%
mul-1-neg64.7%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in B around 0 34.0%
Final simplification34.0%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 63.8%
distribute-lft-neg-in63.8%
+-commutative63.8%
associate-*l/74.1%
associate-/l*74.0%
fma-define74.0%
/-rgt-identity74.0%
remove-double-neg74.0%
fma-neg74.0%
Simplified74.2%
Taylor expanded in F around -inf 57.5%
associate-/r*57.4%
Simplified57.4%
Taylor expanded in B around 0 62.2%
Taylor expanded in x around 0 9.4%
Final simplification9.4%
herbie shell --seed 2024062
(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))))))