
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.5e+40)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.3e+29)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.5e+40) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.3e+29) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7.5d+40)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.3d+29) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.5e+40) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.3e+29) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.5e+40: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.3e+29: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.5e+40) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.3e+29) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.5e+40) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.3e+29) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e+40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.3e+29], 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[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{+29}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.4999999999999996e40Initial program 51.2%
Taylor expanded in F around -inf 98.0%
div-inv99.8%
expm1-log1p-u66.9%
expm1-udef66.9%
Applied egg-rr66.9%
expm1-def66.9%
expm1-log1p99.8%
Simplified99.8%
if -7.4999999999999996e40 < F < 1.3e29Initial program 99.5%
if 1.3e29 < F Initial program 65.0%
+-commutative65.0%
unsub-neg65.0%
associate-*l/80.4%
associate-*r/80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in x around 0 80.4%
associate-*l/80.4%
*-lft-identity80.4%
unpow280.4%
fma-udef80.4%
Simplified80.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.4)
(- (/ -1.0 (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 <= -1.4) {
tmp = (-1.0 / 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 <= (-1.4d0)) then
tmp = ((-1.0d0) / 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 <= -1.4) {
tmp = (-1.0 / 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 <= -1.4: tmp = (-1.0 / 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 <= -1.4) tmp = Float64(Float64(-1.0 / 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 <= -1.4) tmp = (-1.0 / 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, -1.4], N[(N[(-1.0 / N[Sin[B], $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 -1.4:\\
\;\;\;\;\frac{-1}{\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 < -1.3999999999999999Initial program 55.2%
Taylor expanded in F around -inf 97.8%
div-inv99.5%
expm1-log1p-u64.7%
expm1-udef64.7%
Applied egg-rr64.7%
expm1-def64.7%
expm1-log1p99.5%
Simplified99.5%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
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 99.1%
associate-/l*99.1%
associate-/r/99.0%
Simplified99.0%
if 1.3999999999999999 < F Initial program 68.9%
+-commutative68.9%
unsub-neg68.9%
associate-*l/82.5%
associate-*r/82.5%
*-commutative82.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around inf 99.3%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (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 <= -1.4) {
tmp = (-1.0 / 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 <= (-1.4d0)) then
tmp = ((-1.0d0) / 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 <= -1.4) {
tmp = (-1.0 / 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 <= -1.4: tmp = (-1.0 / 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 <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * 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.4) tmp = (-1.0 / 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, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F * N[Sqrt[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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 55.2%
Taylor expanded in F around -inf 97.8%
div-inv99.5%
expm1-log1p-u64.7%
expm1-udef64.7%
Applied egg-rr64.7%
expm1-def64.7%
expm1-log1p99.5%
Simplified99.5%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
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 99.1%
if 1.3999999999999999 < F Initial program 68.9%
+-commutative68.9%
unsub-neg68.9%
associate-*l/82.5%
associate-*r/82.5%
*-commutative82.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around inf 99.3%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* (/ F (sin B)) (sqrt 0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F / sin(B)) * sqrt(0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = ((F / sin(B)) * sqrt(0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[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 -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 55.2%
Taylor expanded in F around -inf 97.8%
div-inv99.5%
expm1-log1p-u64.7%
expm1-udef64.7%
Applied egg-rr64.7%
expm1-def64.7%
expm1-log1p99.5%
Simplified99.5%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
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 99.1%
*-un-lft-identity99.1%
times-frac99.1%
Applied egg-rr99.1%
if 1.3999999999999999 < F Initial program 68.9%
+-commutative68.9%
unsub-neg68.9%
associate-*l/82.5%
associate-*r/82.5%
*-commutative82.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around inf 99.3%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.72e-9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.2e-74)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -4.3e-97)
(- (/ -1.0 B) t_0)
(if (<= F -3.8e-172)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 7e-32)
(/ (* (- x) (cos B)) (sin B))
(- (/ 1.0 (sin B)) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.72e-9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.2e-74) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -4.3e-97) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.8e-172) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 7e-32) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.72d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.2d-74)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-4.3d-97)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3.8d-172)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 7d-32) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.72e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.2e-74) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -4.3e-97) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.8e-172) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 7e-32) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.72e-9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.2e-74: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -4.3e-97: tmp = (-1.0 / B) - t_0 elif F <= -3.8e-172: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 7e-32: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.72e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.2e-74) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -4.3e-97) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3.8e-172) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 7e-32) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.72e-9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.2e-74) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -4.3e-97) tmp = (-1.0 / B) - t_0; elseif (F <= -3.8e-172) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 7e-32) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.72e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-74], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.3e-97], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.8e-172], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 7e-32], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[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.72 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-74}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -4.3 \cdot 10^{-97}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{-172}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-32}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.72000000000000006e-9Initial program 57.3%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 81.7%
if -1.72000000000000006e-9 < F < -2.2000000000000001e-74Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/98.9%
associate-*r/99.2%
*-commutative99.2%
Simplified99.3%
Taylor expanded in x around 0 99.1%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.0%
Taylor expanded in F around inf 68.1%
*-commutative68.1%
associate-*r/68.3%
Simplified68.3%
if -2.2000000000000001e-74 < F < -4.3e-97Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.7%
associate-*r/99.7%
*-commutative99.7%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-*l/100.0%
*-lft-identity100.0%
unpow2100.0%
fma-udef100.0%
Simplified100.0%
Taylor expanded in B around 0 100.0%
associate-*r/100.0%
*-rgt-identity100.0%
unpow2100.0%
fma-udef100.0%
unpow1/2100.0%
rem-exp-log100.0%
exp-neg100.0%
exp-prod100.0%
*-commutative100.0%
neg-mul-1100.0%
associate-*r*100.0%
metadata-eval100.0%
log-pow100.0%
rem-exp-log100.0%
Simplified100.0%
Taylor expanded in F around -inf 100.0%
if -4.3e-97 < F < -3.79999999999999987e-172Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.9%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.2%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.9%
Taylor expanded in B around 0 75.7%
if -3.79999999999999987e-172 < F < 6.9999999999999997e-32Initial program 99.6%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 74.3%
associate-*r/74.3%
*-commutative74.3%
associate-*r*74.3%
neg-mul-174.3%
Simplified74.3%
if 6.9999999999999997e-32 < F Initial program 70.7%
+-commutative70.7%
unsub-neg70.7%
associate-*l/83.5%
associate-*r/83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in x around 0 83.6%
associate-*l/83.5%
*-lft-identity83.5%
unpow283.5%
fma-udef83.5%
Simplified83.5%
Taylor expanded in F around inf 95.1%
Final simplification83.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.56e-9)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8.6e-76)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -2.3e-86)
(- (/ -1.0 B) t_0)
(if (<= F -9e-173)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.85e-34)
(/ (* (- x) (cos B)) (sin B))
(- (/ 1.0 (sin B)) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.56e-9) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8.6e-76) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -2.3e-86) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -9e-173) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.85e-34) {
tmp = (-x * cos(B)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.56d-9)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8.6d-76)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-2.3d-86)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-9d-173)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.85d-34) then
tmp = (-x * cos(b)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.56e-9) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8.6e-76) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -2.3e-86) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -9e-173) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.85e-34) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.56e-9: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8.6e-76: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -2.3e-86: tmp = (-1.0 / B) - t_0 elif F <= -9e-173: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.85e-34: tmp = (-x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.56e-9) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8.6e-76) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -2.3e-86) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -9e-173) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.85e-34) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.56e-9) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8.6e-76) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -2.3e-86) tmp = (-1.0 / B) - t_0; elseif (F <= -9e-173) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.85e-34) tmp = (-x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.56e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.6e-76], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.3e-86], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -9e-173], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.85e-34], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[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.56 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -8.6 \cdot 10^{-76}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-173}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-34}:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.56e-9Initial program 57.3%
Taylor expanded in F around -inf 96.5%
div-inv98.2%
expm1-log1p-u63.3%
expm1-udef63.3%
Applied egg-rr63.3%
expm1-def63.3%
expm1-log1p98.2%
Simplified98.2%
if -1.56e-9 < F < -8.5999999999999998e-76Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/98.9%
associate-*r/99.2%
*-commutative99.2%
Simplified99.3%
Taylor expanded in x around 0 99.1%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.0%
Taylor expanded in F around inf 68.1%
*-commutative68.1%
associate-*r/68.3%
Simplified68.3%
if -8.5999999999999998e-76 < F < -2.29999999999999996e-86Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.7%
associate-*r/99.7%
*-commutative99.7%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-*l/100.0%
*-lft-identity100.0%
unpow2100.0%
fma-udef100.0%
Simplified100.0%
Taylor expanded in B around 0 100.0%
associate-*r/100.0%
*-rgt-identity100.0%
unpow2100.0%
fma-udef100.0%
unpow1/2100.0%
rem-exp-log100.0%
exp-neg100.0%
exp-prod100.0%
*-commutative100.0%
neg-mul-1100.0%
associate-*r*100.0%
metadata-eval100.0%
log-pow100.0%
rem-exp-log100.0%
Simplified100.0%
Taylor expanded in F around -inf 100.0%
if -2.29999999999999996e-86 < F < -9.00000000000000037e-173Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.9%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.2%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.9%
Taylor expanded in B around 0 75.7%
if -9.00000000000000037e-173 < F < 1.84999999999999994e-34Initial program 99.6%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 74.3%
associate-*r/74.3%
*-commutative74.3%
associate-*r*74.3%
neg-mul-174.3%
Simplified74.3%
if 1.84999999999999994e-34 < F Initial program 70.7%
+-commutative70.7%
unsub-neg70.7%
associate-*l/83.5%
associate-*r/83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in x around 0 83.6%
associate-*l/83.5%
*-lft-identity83.5%
unpow283.5%
fma-udef83.5%
Simplified83.5%
Taylor expanded in F around inf 95.1%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.72e-9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.2e-75)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -2.2e-86)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -4e-172)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 3900.0)
(- (/ (cos B) (/ (sin B) x)))
(if (<= F 5.6e+95)
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.72e-9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.2e-75) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -2.2e-86) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -4e-172) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 3900.0) {
tmp = -(cos(B) / (sin(B) / x));
} else if (F <= 5.6e+95) {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.72d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.2d-75)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-2.2d-86)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-4d-172)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 3900.0d0) then
tmp = -(cos(b) / (sin(b) / x))
else if (f <= 5.6d+95) then
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.72e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.2e-75) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -2.2e-86) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -4e-172) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 3900.0) {
tmp = -(Math.cos(B) / (Math.sin(B) / x));
} else if (F <= 5.6e+95) {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.72e-9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.2e-75: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -2.2e-86: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -4e-172: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 3900.0: tmp = -(math.cos(B) / (math.sin(B) / x)) elif F <= 5.6e+95: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.72e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.2e-75) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -2.2e-86) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -4e-172) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 3900.0) tmp = Float64(-Float64(cos(B) / Float64(sin(B) / x))); elseif (F <= 5.6e+95) tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.72e-9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.2e-75) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -2.2e-86) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -4e-172) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 3900.0) tmp = -(cos(B) / (sin(B) / x)); elseif (F <= 5.6e+95) tmp = (F / (sin(B) / (1.0 / F))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.72e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.2e-75], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-86], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4e-172], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3900.0], (-N[(N[Cos[B], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 5.6e+95], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.72 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-75}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-172}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 3900:\\
\;\;\;\;-\frac{\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{+95}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.72000000000000006e-9Initial program 57.3%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 81.7%
if -1.72000000000000006e-9 < F < -1.2000000000000001e-75Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/98.9%
associate-*r/99.2%
*-commutative99.2%
Simplified99.3%
Taylor expanded in x around 0 99.1%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.0%
Taylor expanded in F around inf 68.1%
*-commutative68.1%
associate-*r/68.3%
Simplified68.3%
if -1.2000000000000001e-75 < F < -2.2000000000000002e-86Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.7%
associate-*r/99.7%
*-commutative99.7%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-*l/100.0%
*-lft-identity100.0%
unpow2100.0%
fma-udef100.0%
Simplified100.0%
Taylor expanded in B around 0 100.0%
associate-*r/100.0%
*-rgt-identity100.0%
unpow2100.0%
fma-udef100.0%
unpow1/2100.0%
rem-exp-log100.0%
exp-neg100.0%
exp-prod100.0%
*-commutative100.0%
neg-mul-1100.0%
associate-*r*100.0%
metadata-eval100.0%
log-pow100.0%
rem-exp-log100.0%
Simplified100.0%
Taylor expanded in F around -inf 100.0%
if -2.2000000000000002e-86 < F < -4.0000000000000002e-172Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.9%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.2%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.9%
Taylor expanded in B around 0 75.7%
if -4.0000000000000002e-172 < F < 3900Initial program 99.6%
Taylor expanded in F around -inf 31.7%
div-inv31.8%
expm1-log1p-u10.8%
expm1-udef10.8%
Applied egg-rr10.8%
expm1-def10.8%
expm1-log1p31.8%
Simplified31.8%
Taylor expanded in x around inf 71.3%
mul-1-neg71.3%
associate-/l*71.3%
Simplified71.3%
if 3900 < F < 5.5999999999999995e95Initial program 93.0%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-/l*99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 98.3%
Taylor expanded in B around 0 88.0%
if 5.5999999999999995e95 < F Initial program 55.1%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 82.6%
Final simplification78.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.72e-9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.02e-75)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -1.48e-86)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -5.4e-173)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 3900.0)
(/ (* (- x) (cos B)) (sin B))
(if (<= F 2.1e+96)
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.72e-9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.02e-75) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -1.48e-86) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -5.4e-173) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 3900.0) {
tmp = (-x * cos(B)) / sin(B);
} else if (F <= 2.1e+96) {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.72d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.02d-75)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-1.48d-86)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-5.4d-173)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 3900.0d0) then
tmp = (-x * cos(b)) / sin(b)
else if (f <= 2.1d+96) then
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.72e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.02e-75) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -1.48e-86) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -5.4e-173) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 3900.0) {
tmp = (-x * Math.cos(B)) / Math.sin(B);
} else if (F <= 2.1e+96) {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.72e-9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.02e-75: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -1.48e-86: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -5.4e-173: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 3900.0: tmp = (-x * math.cos(B)) / math.sin(B) elif F <= 2.1e+96: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.72e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.02e-75) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -1.48e-86) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -5.4e-173) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 3900.0) tmp = Float64(Float64(Float64(-x) * cos(B)) / sin(B)); elseif (F <= 2.1e+96) tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.72e-9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.02e-75) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -1.48e-86) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -5.4e-173) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 3900.0) tmp = (-x * cos(B)) / sin(B); elseif (F <= 2.1e+96) tmp = (F / (sin(B) / (1.0 / F))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.72e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.02e-75], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.48e-86], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.4e-173], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3900.0], N[(N[((-x) * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e+96], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.72 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.02 \cdot 10^{-75}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -1.48 \cdot 10^{-86}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-173}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 3900:\\
\;\;\;\;\frac{\left(-x\right) \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{+96}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.72000000000000006e-9Initial program 57.3%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 81.7%
if -1.72000000000000006e-9 < F < -1.01999999999999997e-75Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/98.9%
associate-*r/99.2%
*-commutative99.2%
Simplified99.3%
Taylor expanded in x around 0 99.1%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.0%
Taylor expanded in F around inf 68.1%
*-commutative68.1%
associate-*r/68.3%
Simplified68.3%
if -1.01999999999999997e-75 < F < -1.4800000000000001e-86Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.7%
associate-*r/99.7%
*-commutative99.7%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-*l/100.0%
*-lft-identity100.0%
unpow2100.0%
fma-udef100.0%
Simplified100.0%
Taylor expanded in B around 0 100.0%
associate-*r/100.0%
*-rgt-identity100.0%
unpow2100.0%
fma-udef100.0%
unpow1/2100.0%
rem-exp-log100.0%
exp-neg100.0%
exp-prod100.0%
*-commutative100.0%
neg-mul-1100.0%
associate-*r*100.0%
metadata-eval100.0%
log-pow100.0%
rem-exp-log100.0%
Simplified100.0%
Taylor expanded in F around -inf 100.0%
if -1.4800000000000001e-86 < F < -5.3999999999999999e-173Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.9%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.2%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.9%
Taylor expanded in B around 0 75.7%
if -5.3999999999999999e-173 < F < 3900Initial program 99.6%
Taylor expanded in F around -inf 31.7%
Taylor expanded in x around inf 71.3%
associate-*r/71.3%
*-commutative71.3%
associate-*r*71.3%
neg-mul-171.3%
Simplified71.3%
if 3900 < F < 2.1000000000000001e96Initial program 93.0%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-/l*99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 98.3%
Taylor expanded in B around 0 88.0%
if 2.1000000000000001e96 < F Initial program 55.1%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 82.6%
Final simplification78.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.12)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.49) (- (* (sqrt 0.5) (/ F 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.12) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.49) {
tmp = (sqrt(0.5) * (F / 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.12d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.49d0) then
tmp = (sqrt(0.5d0) * (f / 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.12) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.49) {
tmp = (Math.sqrt(0.5) * (F / 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.12: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.49: tmp = (math.sqrt(0.5) * (F / 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.12) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.49) tmp = Float64(Float64(sqrt(0.5) * Float64(F / 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.12) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.49) tmp = (sqrt(0.5) * (F / 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.12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.49], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / 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.12:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.49:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.12Initial program 55.2%
Taylor expanded in F around -inf 97.8%
div-inv99.5%
expm1-log1p-u64.7%
expm1-udef64.7%
Applied egg-rr64.7%
expm1-def64.7%
expm1-log1p99.5%
Simplified99.5%
if -0.12 < F < 0.48999999999999999Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
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 B around 0 81.9%
associate-*r/81.9%
*-rgt-identity81.9%
unpow281.9%
fma-udef81.9%
unpow1/281.9%
rem-exp-log81.9%
exp-neg81.9%
exp-prod81.9%
*-commutative81.9%
neg-mul-181.9%
associate-*r*81.9%
metadata-eval81.9%
log-pow81.9%
rem-exp-log81.9%
Simplified81.9%
Taylor expanded in F around 0 81.5%
*-lft-identity81.5%
times-frac81.5%
/-rgt-identity81.5%
Simplified81.5%
if 0.48999999999999999 < F Initial program 68.9%
+-commutative68.9%
unsub-neg68.9%
associate-*l/82.5%
associate-*r/82.5%
*-commutative82.5%
Simplified82.6%
Taylor expanded in x around 0 82.6%
associate-*l/82.6%
*-lft-identity82.6%
unpow282.6%
fma-udef82.6%
Simplified82.6%
Taylor expanded in F around inf 99.3%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.42e-9)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.7e-75)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -6.5e-99)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 0.49)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 2.3e+95)
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e-9) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.7e-75) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -6.5e-99) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 0.49) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 2.3e+95) {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.42d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.7d-75)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-6.5d-99)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 0.49d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 2.3d+95) then
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.7e-75) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -6.5e-99) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 0.49) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 2.3e+95) {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.42e-9: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.7e-75: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -6.5e-99: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 0.49: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 2.3e+95: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.42e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.7e-75) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -6.5e-99) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 0.49) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 2.3e+95) tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.42e-9) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.7e-75) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -6.5e-99) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 0.49) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 2.3e+95) tmp = (F / (sin(B) / (1.0 / F))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.42e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-75], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.5e-99], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.49], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.3e+95], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.42 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-75}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.49:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+95}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.4200000000000001e-9Initial program 57.3%
Taylor expanded in F around -inf 96.5%
Taylor expanded in B around 0 81.7%
if -1.4200000000000001e-9 < F < -3.70000000000000024e-75Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/98.9%
associate-*r/99.2%
*-commutative99.2%
Simplified99.3%
Taylor expanded in x around 0 99.1%
associate-*l/99.3%
*-lft-identity99.3%
unpow299.3%
fma-udef99.3%
Simplified99.3%
Taylor expanded in F around 0 99.0%
Taylor expanded in F around inf 68.1%
*-commutative68.1%
associate-*r/68.3%
Simplified68.3%
if -3.70000000000000024e-75 < F < -6.50000000000000033e-99Initial program 99.7%
+-commutative99.7%
unsub-neg99.7%
associate-*l/99.7%
associate-*r/99.7%
*-commutative99.7%
Simplified100.0%
Taylor expanded in x around 0 100.0%
associate-*l/100.0%
*-lft-identity100.0%
unpow2100.0%
fma-udef100.0%
Simplified100.0%
Taylor expanded in B around 0 100.0%
associate-*r/100.0%
*-rgt-identity100.0%
unpow2100.0%
fma-udef100.0%
unpow1/2100.0%
rem-exp-log100.0%
exp-neg100.0%
exp-prod100.0%
*-commutative100.0%
neg-mul-1100.0%
associate-*r*100.0%
metadata-eval100.0%
log-pow100.0%
rem-exp-log100.0%
Simplified100.0%
Taylor expanded in F around -inf 100.0%
if -6.50000000000000033e-99 < F < 0.48999999999999999Initial program 99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 58.4%
if 0.48999999999999999 < F < 2.29999999999999997e95Initial program 93.3%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-/l*99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 98.3%
Taylor expanded in B around 0 85.2%
if 2.29999999999999997e95 < F Initial program 55.1%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 82.6%
Final simplification73.6%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00023)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.15)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 4.5e+95)
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00023) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.15) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 4.5e+95) {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00023d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.15d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 4.5d+95) then
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00023) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.15) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 4.5e+95) {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00023: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.15: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 4.5e+95: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00023) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.15) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 4.5e+95) tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00023) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.15) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 4.5e+95) tmp = (F / (sin(B) / (1.0 / F))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00023], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.15], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.5e+95], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00023:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.15:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{+95}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e-4Initial program 55.9%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 82.6%
if -2.3000000000000001e-4 < F < 0.149999999999999994Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
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 99.1%
Taylor expanded in B around 0 55.0%
if 0.149999999999999994 < F < 4.50000000000000017e95Initial program 93.3%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-/l*99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 98.3%
Taylor expanded in B around 0 85.2%
if 4.50000000000000017e95 < F Initial program 55.1%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 82.6%
Final simplification70.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1600000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.21)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.3e+96)
(- (/ F (/ (sin B) (/ 1.0 F))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1600000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.21) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.3e+96) {
tmp = (F / (sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.21d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.3d+96) then
tmp = (f / (sin(b) / (1.0d0 / f))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1600000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.21) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.3e+96) {
tmp = (F / (Math.sin(B) / (1.0 / F))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1600000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.21: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.3e+96: tmp = (F / (math.sin(B) / (1.0 / F))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.21) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.3e+96) tmp = Float64(Float64(F / Float64(sin(B) / Float64(1.0 / F))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1600000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.21) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.3e+96) tmp = (F / (sin(B) / (1.0 / F))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.21], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.3e+96], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1600000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.21:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{+96}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\frac{1}{F}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.6e6Initial program 54.4%
Taylor expanded in F around -inf 97.8%
Taylor expanded in B around 0 83.6%
if -1.6e6 < F < 0.209999999999999992Initial program 99.5%
Taylor expanded in F around 0 99.0%
Taylor expanded in B around 0 55.0%
if 0.209999999999999992 < F < 1.3e96Initial program 93.3%
associate-*l/99.6%
+-commutative99.6%
*-commutative99.6%
fma-udef99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
associate-/l*99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in F around inf 98.3%
Taylor expanded in B around 0 85.2%
if 1.3e96 < F Initial program 55.1%
Taylor expanded in F around inf 73.1%
Taylor expanded in B around 0 82.6%
Final simplification70.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -5.4e-88)
t_0
(if (<= F 6000.0)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1e+154) (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -5.4e-88) {
tmp = t_0;
} else if (F <= 6000.0) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1e+154) {
tmp = 1.0 / sin(B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-5.4d-88)) then
tmp = t_0
else if (f <= 6000.0d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1d+154) then
tmp = 1.0d0 / sin(b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -5.4e-88) {
tmp = t_0;
} else if (F <= 6000.0) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1e+154) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -5.4e-88: tmp = t_0 elif F <= 6000.0: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1e+154: tmp = 1.0 / math.sin(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -5.4e-88) tmp = t_0; elseif (F <= 6000.0) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1e+154) tmp = Float64(1.0 / sin(B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -5.4e-88) tmp = t_0; elseif (F <= 6000.0) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1e+154) tmp = 1.0 / sin(B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.4e-88], t$95$0, If[LessEqual[F, 6000.0], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e+154], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.4 \cdot 10^{-88}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6000:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if F < -5.39999999999999989e-88 or 1.00000000000000004e154 < F Initial program 61.5%
+-commutative61.5%
unsub-neg61.5%
associate-*l/74.6%
associate-*r/74.5%
*-commutative74.5%
Simplified74.6%
Taylor expanded in x around 0 74.6%
associate-*l/74.6%
*-lft-identity74.6%
unpow274.6%
fma-udef74.6%
Simplified74.6%
Taylor expanded in B around 0 63.4%
associate-*r/63.4%
*-rgt-identity63.4%
unpow263.4%
fma-udef63.4%
unpow1/263.4%
rem-exp-log62.8%
exp-neg62.8%
exp-prod62.8%
*-commutative62.8%
neg-mul-162.8%
associate-*r*62.8%
metadata-eval62.8%
log-pow62.8%
rem-exp-log63.4%
Simplified63.4%
Taylor expanded in F around -inf 63.9%
if -5.39999999999999989e-88 < F < 6e3Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 57.9%
if 6e3 < F < 1.00000000000000004e154Initial program 90.3%
+-commutative90.3%
unsub-neg90.3%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
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 inf 98.8%
Taylor expanded in x around 0 69.6%
Final simplification62.6%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00023)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 8200.0)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 2.05e+154) (/ 1.0 (sin B)) (- (/ -1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00023) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8200.0) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 2.05e+154) {
tmp = 1.0 / sin(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.00023d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8200.0d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 2.05d+154) then
tmp = 1.0d0 / sin(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.00023) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8200.0) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 2.05e+154) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00023: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8200.0: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 2.05e+154: tmp = 1.0 / math.sin(B) else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00023) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8200.0) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 2.05e+154) tmp = Float64(1.0 / sin(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.00023) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8200.0) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 2.05e+154) tmp = 1.0 / sin(B); else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00023], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8200.0], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e+154], N[(1.0 / N[Sin[B], $MachinePrecision]), $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.00023:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8200:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e-4Initial program 55.9%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 82.6%
if -2.3000000000000001e-4 < F < 8200Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
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 99.1%
Taylor expanded in B around 0 54.6%
if 8200 < F < 2.05e154Initial program 90.3%
+-commutative90.3%
unsub-neg90.3%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
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 inf 98.8%
Taylor expanded in x around 0 69.6%
if 2.05e154 < F Initial program 46.2%
+-commutative46.2%
unsub-neg46.2%
associate-*l/64.6%
associate-*r/64.6%
*-commutative64.6%
Simplified64.8%
Taylor expanded in x around 0 64.8%
associate-*l/64.8%
*-lft-identity64.8%
unpow264.8%
fma-udef64.8%
Simplified64.8%
Taylor expanded in B around 0 64.8%
associate-*r/64.8%
*-rgt-identity64.8%
unpow264.8%
fma-udef64.8%
unpow1/264.8%
rem-exp-log64.8%
exp-neg64.8%
exp-prod64.8%
*-commutative64.8%
neg-mul-164.8%
associate-*r*64.8%
metadata-eval64.8%
log-pow64.8%
rem-exp-log64.8%
Simplified64.8%
Taylor expanded in F around -inf 64.5%
Final simplification65.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00023)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.45e-76)
(/ (- (* F (sqrt 0.5)) x) B)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00023) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.45e-76) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00023d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.45d-76) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00023) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.45e-76) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00023: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.45e-76: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00023) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.45e-76) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00023) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.45e-76) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00023], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e-76], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00023:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{-76}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.3000000000000001e-4Initial program 55.9%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 82.6%
if -2.3000000000000001e-4 < F < 2.44999999999999986e-76Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
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 99.6%
Taylor expanded in B around 0 57.0%
if 2.44999999999999986e-76 < F Initial program 73.5%
Taylor expanded in F around inf 76.1%
Taylor expanded in B around 0 72.9%
Final simplification69.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.3e-48) (not (<= x 2.5e-17))) (- (/ -1.0 B) (/ x (tan B))) (/ 1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-48) || !(x <= 2.5e-17)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-3.3d-48)) .or. (.not. (x <= 2.5d-17))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-48) || !(x <= 2.5e-17)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.3e-48) or not (x <= 2.5e-17): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.3e-48) || !(x <= 2.5e-17)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.3e-48) || ~((x <= 2.5e-17))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.3e-48], N[Not[LessEqual[x, 2.5e-17]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-48} \lor \neg \left(x \leq 2.5 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if x < -3.3e-48 or 2.4999999999999999e-17 < x Initial program 84.3%
+-commutative84.3%
unsub-neg84.3%
associate-*l/95.9%
associate-*r/95.9%
*-commutative95.9%
Simplified96.1%
Taylor expanded in x around 0 96.1%
associate-*l/96.1%
*-lft-identity96.1%
unpow296.1%
fma-udef96.1%
Simplified96.1%
Taylor expanded in B around 0 94.8%
associate-*r/94.8%
*-rgt-identity94.8%
unpow294.8%
fma-udef94.8%
unpow1/294.8%
rem-exp-log94.6%
exp-neg94.6%
exp-prod94.6%
*-commutative94.6%
neg-mul-194.6%
associate-*r*94.6%
metadata-eval94.6%
log-pow94.6%
rem-exp-log94.8%
Simplified94.8%
Taylor expanded in F around -inf 90.8%
if -3.3e-48 < x < 2.4999999999999999e-17Initial program 75.3%
+-commutative75.3%
unsub-neg75.3%
associate-*l/80.1%
associate-*r/79.9%
*-commutative79.9%
Simplified80.0%
Taylor expanded in x around 0 80.0%
associate-*l/80.0%
*-lft-identity80.0%
unpow280.0%
fma-udef80.0%
Simplified80.0%
Taylor expanded in F around inf 29.4%
Taylor expanded in x around 0 29.4%
Final simplification57.2%
(FPCore (F B x)
:precision binary64
(if (<= F -5.2e-37)
(/ (- -1.0 x) B)
(if (<= F 0.004)
(/ (- x) B)
(if (<= F 1.2e+153)
(/ 1.0 (sin B))
(+ (* 0.3333333333333333 (* x B)) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-37) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.004) {
tmp = -x / B;
} else if (F <= 1.2e+153) {
tmp = 1.0 / sin(B);
} else {
tmp = (0.3333333333333333 * (x * B)) + ((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.2d-37)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 0.004d0) then
tmp = -x / b
else if (f <= 1.2d+153) then
tmp = 1.0d0 / sin(b)
else
tmp = (0.3333333333333333d0 * (x * b)) + ((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.2e-37) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.004) {
tmp = -x / B;
} else if (F <= 1.2e+153) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e-37: tmp = (-1.0 - x) / B elif F <= 0.004: tmp = -x / B elif F <= 1.2e+153: tmp = 1.0 / math.sin(B) else: tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e-37) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 0.004) tmp = Float64(Float64(-x) / B); elseif (F <= 1.2e+153) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(0.3333333333333333 * Float64(x * B)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.2e-37) tmp = (-1.0 - x) / B; elseif (F <= 0.004) tmp = -x / B; elseif (F <= 1.2e+153) tmp = 1.0 / sin(B); else tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e-37], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.004], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 1.2e+153], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 0.004:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot B\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.19999999999999959e-37Initial program 61.9%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 50.6%
associate-*r/50.6%
distribute-lft-in50.6%
metadata-eval50.6%
neg-mul-150.6%
Simplified50.6%
Taylor expanded in x around 0 50.6%
sub-neg50.6%
mul-1-neg50.6%
+-commutative50.6%
distribute-neg-frac50.6%
metadata-eval50.6%
sub-neg50.6%
div-sub50.6%
Simplified50.6%
if -5.19999999999999959e-37 < F < 0.0040000000000000001Initial program 99.6%
Taylor expanded in F around -inf 30.8%
Taylor expanded in B around 0 19.7%
associate-*r/19.7%
distribute-lft-in19.7%
metadata-eval19.7%
neg-mul-119.7%
Simplified19.7%
Taylor expanded in x around inf 37.8%
associate-*r/37.8%
neg-mul-137.8%
Simplified37.8%
if 0.0040000000000000001 < F < 1.19999999999999996e153Initial program 92.8%
+-commutative92.8%
unsub-neg92.8%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
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 inf 96.7%
Taylor expanded in x around 0 65.8%
if 1.19999999999999996e153 < F Initial program 45.2%
associate-*l/65.5%
+-commutative65.5%
*-commutative65.5%
fma-udef65.5%
fma-def65.5%
metadata-eval65.5%
metadata-eval65.5%
associate-/l*65.5%
fma-def65.5%
fma-udef65.5%
*-commutative65.5%
fma-def65.5%
fma-def65.5%
Applied egg-rr65.5%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 84.9%
Taylor expanded in B around 0 56.7%
associate--l+56.7%
div-sub56.7%
Simplified56.7%
Final simplification48.8%
(FPCore (F B x)
:precision binary64
(if (<= F -4.3e-38)
(/ (- -1.0 x) B)
(if (<= F 1.42e-120)
(/ (- x) B)
(+ (* 0.3333333333333333 (* x B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.3e-38) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.42e-120) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.3d-38)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.42d-120) then
tmp = -x / b
else
tmp = (0.3333333333333333d0 * (x * b)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.3e-38) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.42e-120) {
tmp = -x / B;
} else {
tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.3e-38: tmp = (-1.0 - x) / B elif F <= 1.42e-120: tmp = -x / B else: tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.3e-38) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.42e-120) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(0.3333333333333333 * Float64(x * B)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.3e-38) tmp = (-1.0 - x) / B; elseif (F <= 1.42e-120) tmp = -x / B; else tmp = (0.3333333333333333 * (x * B)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.3e-38], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.42e-120], N[((-x) / B), $MachinePrecision], N[(N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.3 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.42 \cdot 10^{-120}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(x \cdot B\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.3000000000000002e-38Initial program 61.9%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 50.6%
associate-*r/50.6%
distribute-lft-in50.6%
metadata-eval50.6%
neg-mul-150.6%
Simplified50.6%
Taylor expanded in x around 0 50.6%
sub-neg50.6%
mul-1-neg50.6%
+-commutative50.6%
distribute-neg-frac50.6%
metadata-eval50.6%
sub-neg50.6%
div-sub50.6%
Simplified50.6%
if -4.3000000000000002e-38 < F < 1.42e-120Initial program 99.5%
Taylor expanded in F around -inf 28.6%
Taylor expanded in B around 0 18.5%
associate-*r/18.5%
distribute-lft-in18.5%
metadata-eval18.5%
neg-mul-118.5%
Simplified18.5%
Taylor expanded in x around inf 40.1%
associate-*r/40.1%
neg-mul-140.1%
Simplified40.1%
if 1.42e-120 < F Initial program 74.6%
associate-*l/85.7%
+-commutative85.7%
*-commutative85.7%
fma-udef85.7%
fma-def85.7%
metadata-eval85.7%
metadata-eval85.7%
associate-/l*85.7%
fma-def85.7%
fma-udef85.7%
*-commutative85.7%
fma-def85.7%
fma-def85.7%
Applied egg-rr85.7%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 70.0%
Taylor expanded in B around 0 47.2%
associate--l+47.2%
div-sub47.2%
Simplified47.2%
Final simplification45.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.8e-40) (/ (- -1.0 x) B) (if (<= F 1.4e-120) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.4e-120) {
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 <= (-2.8d-40)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.4d-120) 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 <= -2.8e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.4e-120) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.8e-40: tmp = (-1.0 - x) / B elif F <= 1.4e-120: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.8e-40) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.4e-120) 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 <= -2.8e-40) tmp = (-1.0 - x) / B; elseif (F <= 1.4e-120) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.8e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.4e-120], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-120}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.8e-40Initial program 61.9%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 50.6%
associate-*r/50.6%
distribute-lft-in50.6%
metadata-eval50.6%
neg-mul-150.6%
Simplified50.6%
Taylor expanded in x around 0 50.6%
sub-neg50.6%
mul-1-neg50.6%
+-commutative50.6%
distribute-neg-frac50.6%
metadata-eval50.6%
sub-neg50.6%
div-sub50.6%
Simplified50.6%
if -2.8e-40 < F < 1.39999999999999997e-120Initial program 99.5%
Taylor expanded in F around -inf 28.6%
Taylor expanded in B around 0 18.5%
associate-*r/18.5%
distribute-lft-in18.5%
metadata-eval18.5%
neg-mul-118.5%
Simplified18.5%
Taylor expanded in x around inf 40.1%
associate-*r/40.1%
neg-mul-140.1%
Simplified40.1%
if 1.39999999999999997e-120 < F Initial program 74.6%
associate-*l/85.7%
+-commutative85.7%
*-commutative85.7%
fma-udef85.7%
fma-def85.7%
metadata-eval85.7%
metadata-eval85.7%
associate-/l*85.7%
fma-def85.7%
fma-udef85.7%
*-commutative85.7%
fma-def85.7%
fma-def85.7%
Applied egg-rr85.7%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 70.0%
Taylor expanded in B around 0 46.8%
Final simplification45.6%
(FPCore (F B x) :precision binary64 (if (<= F -1.9e-39) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-39) {
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.9d-39)) 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.9e-39) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e-39: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e-39) 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.9e-39) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-39], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-39}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.9000000000000001e-39Initial program 61.9%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 50.6%
associate-*r/50.6%
distribute-lft-in50.6%
metadata-eval50.6%
neg-mul-150.6%
Simplified50.6%
Taylor expanded in x around 0 50.6%
sub-neg50.6%
mul-1-neg50.6%
+-commutative50.6%
distribute-neg-frac50.6%
metadata-eval50.6%
sub-neg50.6%
div-sub50.6%
Simplified50.6%
if -1.9000000000000001e-39 < F Initial program 86.2%
Taylor expanded in F around -inf 38.0%
Taylor expanded in B around 0 21.4%
associate-*r/21.4%
distribute-lft-in21.4%
metadata-eval21.4%
neg-mul-121.4%
Simplified21.4%
Taylor expanded in x around inf 31.8%
associate-*r/31.8%
neg-mul-131.8%
Simplified31.8%
Final simplification37.1%
(FPCore (F B x) :precision binary64 (if (<= F -4.2e+115) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e+115) {
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 <= (-4.2d+115)) 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 <= -4.2e+115) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e+115: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e+115) 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 <= -4.2e+115) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e+115], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -4.20000000000000007e115Initial program 40.9%
Taylor expanded in F around -inf 97.5%
Taylor expanded in B around 0 48.7%
associate-*r/48.7%
distribute-lft-in48.7%
metadata-eval48.7%
neg-mul-148.7%
Simplified48.7%
Taylor expanded in x around 0 31.0%
if -4.20000000000000007e115 < F Initial program 87.2%
Taylor expanded in F around -inf 43.4%
Taylor expanded in B around 0 25.8%
associate-*r/25.8%
distribute-lft-in25.8%
metadata-eval25.8%
neg-mul-125.8%
Simplified25.8%
Taylor expanded in x around inf 32.8%
associate-*r/32.8%
neg-mul-132.8%
Simplified32.8%
Final simplification32.5%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 79.4%
Taylor expanded in F around -inf 52.5%
Taylor expanded in B around 0 29.6%
associate-*r/29.6%
distribute-lft-in29.6%
metadata-eval29.6%
neg-mul-129.6%
Simplified29.6%
Taylor expanded in x around 0 9.4%
Final simplification9.4%
herbie shell --seed 2023182
(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))))))