
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+66)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.55)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4e+66) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.55) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4e+66) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.55) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e+66], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.55], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4 \cdot 10^{+66}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.55:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.99999999999999978e66Initial program 46.6%
Simplified64.3%
Taylor expanded in x around 0 66.7%
associate-*l/66.5%
*-lft-identity66.5%
+-commutative66.5%
unpow266.5%
fma-undefine66.5%
Simplified66.5%
Taylor expanded in F around -inf 99.9%
if -3.99999999999999978e66 < F < 3.5499999999999998Initial program 73.5%
Simplified73.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
if 3.5499999999999998 < F Initial program 49.2%
Simplified61.5%
Taylor expanded in x around 0 72.5%
associate-*l/72.4%
*-lft-identity72.4%
+-commutative72.4%
unpow272.4%
fma-undefine72.4%
Simplified72.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 -1800000000.0)
(- (/ -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 <= -1800000000.0) {
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 <= (-1800000000.0d0)) 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 <= -1800000000.0) {
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 <= -1800000000.0: 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 <= -1800000000.0) 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 <= -1800000000.0) 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, -1800000000.0], 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 -1800000000:\\
\;\;\;\;\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.8e9Initial program 60.9%
Simplified73.8%
Taylor expanded in x around 0 75.6%
associate-*l/75.5%
*-lft-identity75.5%
+-commutative75.5%
unpow275.5%
fma-undefine75.5%
Simplified75.5%
Taylor expanded in F around -inf 99.8%
if -1.8e9 < F < 1.3999999999999999Initial program 70.1%
Simplified70.2%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.5%
if 1.3999999999999999 < F Initial program 49.2%
Simplified61.5%
Taylor expanded in x around 0 72.5%
associate-*l/72.4%
*-lft-identity72.4%
+-commutative72.4%
unpow272.4%
fma-undefine72.4%
Simplified72.4%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.9e-23)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.85e-26)
(- (/ (* F (sqrt 0.5)) B) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.9e-23) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.85e-26) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.9d-23)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.85d-26) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.9e-23) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.85e-26) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.9e-23: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.85e-26: tmp = ((F * math.sqrt(0.5)) / B) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.9e-23) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.85e-26) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.9e-23) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.85e-26) tmp = ((F * sqrt(0.5)) / B) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.9e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.85e-26], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $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 -9.9 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-26}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.90000000000000003e-23Initial program 63.2%
Simplified75.4%
Taylor expanded in x around 0 77.0%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around -inf 98.4%
if -9.90000000000000003e-23 < F < 1.8499999999999999e-26Initial program 70.4%
Simplified70.5%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 87.3%
if 1.8499999999999999e-26 < F Initial program 48.5%
Simplified60.0%
Taylor expanded in x around 0 74.5%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
fma-undefine74.4%
Simplified74.4%
Taylor expanded in F around inf 98.5%
Final simplification93.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.9e-23)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.85e-26)
(- (/ (/ F B) (sqrt 2.0)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.9e-23) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.85e-26) {
tmp = ((F / B) / sqrt(2.0)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.9d-23)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.85d-26) then
tmp = ((f / b) / sqrt(2.0d0)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.9e-23) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.85e-26) {
tmp = ((F / B) / Math.sqrt(2.0)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.9e-23: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.85e-26: tmp = ((F / B) / math.sqrt(2.0)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.9e-23) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.85e-26) tmp = Float64(Float64(Float64(F / B) / sqrt(2.0)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.9e-23) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.85e-26) tmp = ((F / B) / sqrt(2.0)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.9e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.85e-26], N[(N[(N[(F / B), $MachinePrecision] / N[Sqrt[2.0], $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 -9.9 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{F}{B}}{\sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.90000000000000003e-23Initial program 63.2%
Simplified75.4%
Taylor expanded in x around 0 77.0%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around -inf 98.4%
if -9.90000000000000003e-23 < F < 1.8499999999999999e-26Initial program 70.4%
Simplified70.5%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 87.3%
+-commutative87.3%
unpow287.3%
fma-undefine87.3%
Simplified87.3%
associate-*r*87.3%
sqrt-div87.3%
metadata-eval87.3%
un-div-inv87.3%
un-div-inv87.4%
Applied egg-rr87.4%
Taylor expanded in F around 0 87.4%
if 1.8499999999999999e-26 < F Initial program 48.5%
Simplified60.0%
Taylor expanded in x around 0 74.5%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
fma-undefine74.4%
Simplified74.4%
Taylor expanded in F around inf 98.5%
Final simplification93.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e-85)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.5e-44) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45e-85) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.5e-44) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d-85)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.5d-44) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45e-85) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.5e-44) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45e-85: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.5e-44: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e-85) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.5e-44) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45e-85) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.5e-44) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-85], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.5e-44], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-85}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-44}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4500000000000001e-85Initial program 64.9%
Simplified75.3%
Taylor expanded in x around 0 80.4%
associate-*l/80.3%
*-lft-identity80.3%
+-commutative80.3%
unpow280.3%
fma-undefine80.3%
Simplified80.3%
Taylor expanded in F around -inf 91.6%
if -1.4500000000000001e-85 < F < 4.4999999999999999e-44Initial program 68.5%
Taylor expanded in F around -inf 48.5%
Taylor expanded in x around inf 81.1%
associate-/l*80.9%
clear-num80.8%
tan-quot81.0%
div-inv81.2%
*-un-lft-identity81.2%
Applied egg-rr81.2%
*-lft-identity81.2%
Simplified81.2%
if 4.4999999999999999e-44 < F Initial program 51.9%
Simplified62.6%
Taylor expanded in x around 0 76.2%
associate-*l/76.1%
*-lft-identity76.1%
+-commutative76.1%
unpow276.1%
fma-undefine76.1%
Simplified76.1%
Taylor expanded in F around inf 93.6%
Final simplification88.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45e-85)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.38e-30) (/ (- x) (tan B)) (- (* F (/ (/ 1.0 F) B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45e-85) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.38e-30) {
tmp = -x / tan(B);
} else {
tmp = (F * ((1.0 / F) / B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d-85)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.38d-30) then
tmp = -x / tan(b)
else
tmp = (f * ((1.0d0 / f) / b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45e-85) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.38e-30) {
tmp = -x / Math.tan(B);
} else {
tmp = (F * ((1.0 / F) / B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45e-85: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.38e-30: tmp = -x / math.tan(B) else: tmp = (F * ((1.0 / F) / B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e-85) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.38e-30) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45e-85) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.38e-30) tmp = -x / tan(B); else tmp = (F * ((1.0 / F) / B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-85], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.38e-30], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-85}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.38 \cdot 10^{-30}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.4500000000000001e-85Initial program 64.9%
Simplified75.3%
Taylor expanded in x around 0 80.4%
associate-*l/80.3%
*-lft-identity80.3%
+-commutative80.3%
unpow280.3%
fma-undefine80.3%
Simplified80.3%
Taylor expanded in F around -inf 91.6%
if -1.4500000000000001e-85 < F < 1.38000000000000008e-30Initial program 69.9%
Taylor expanded in F around -inf 47.3%
Taylor expanded in x around inf 78.4%
associate-/l*78.3%
clear-num78.2%
tan-quot78.4%
div-inv78.6%
*-un-lft-identity78.6%
Applied egg-rr78.6%
*-lft-identity78.6%
Simplified78.6%
if 1.38000000000000008e-30 < F Initial program 48.5%
Simplified60.0%
Taylor expanded in x around 0 74.5%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
fma-undefine74.4%
Simplified74.4%
Taylor expanded in F around inf 98.1%
Taylor expanded in B around 0 78.7%
Final simplification82.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -2.4e+109)
t_0
(if (<= F -2e+40)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1800000000.0)
t_0
(if (<= F 4.4e-27)
(/ (- x) (tan B))
(if (<= F 4.9e+178)
(- (/ (/ F B) F) (/ x (tan B)))
(/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -2.4e+109) {
tmp = t_0;
} else if (F <= -2e+40) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1800000000.0) {
tmp = t_0;
} else if (F <= 4.4e-27) {
tmp = -x / tan(B);
} else if (F <= 4.9e+178) {
tmp = ((F / B) / F) - (x / tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-2.4d+109)) then
tmp = t_0
else if (f <= (-2d+40)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1800000000.0d0)) then
tmp = t_0
else if (f <= 4.4d-27) then
tmp = -x / tan(b)
else if (f <= 4.9d+178) then
tmp = ((f / b) / f) - (x / tan(b))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -2.4e+109) {
tmp = t_0;
} else if (F <= -2e+40) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1800000000.0) {
tmp = t_0;
} else if (F <= 4.4e-27) {
tmp = -x / Math.tan(B);
} else if (F <= 4.9e+178) {
tmp = ((F / B) / F) - (x / Math.tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -2.4e+109: tmp = t_0 elif F <= -2e+40: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1800000000.0: tmp = t_0 elif F <= 4.4e-27: tmp = -x / math.tan(B) elif F <= 4.9e+178: tmp = ((F / B) / F) - (x / math.tan(B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -2.4e+109) tmp = t_0; elseif (F <= -2e+40) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1800000000.0) tmp = t_0; elseif (F <= 4.4e-27) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 4.9e+178) tmp = Float64(Float64(Float64(F / B) / F) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -2.4e+109) tmp = t_0; elseif (F <= -2e+40) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1800000000.0) tmp = t_0; elseif (F <= 4.4e-27) tmp = -x / tan(B); elseif (F <= 4.9e+178) tmp = ((F / B) / F) - (x / tan(B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.4e+109], t$95$0, If[LessEqual[F, -2e+40], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1800000000.0], t$95$0, If[LessEqual[F, 4.4e-27], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.9e+178], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{+109}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2 \cdot 10^{+40}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1800000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-27}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{+178}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.39999999999999987e109 or -2.00000000000000006e40 < F < -1.8e9Initial program 51.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 84.9%
if -2.39999999999999987e109 < F < -2.00000000000000006e40Initial program 80.4%
Taylor expanded in F around -inf 99.5%
Taylor expanded in B around 0 90.1%
if -1.8e9 < F < 4.39999999999999974e-27Initial program 71.3%
Taylor expanded in F around -inf 48.8%
Taylor expanded in x around inf 75.8%
associate-/l*75.7%
clear-num75.6%
tan-quot75.7%
div-inv75.9%
*-un-lft-identity75.9%
Applied egg-rr75.9%
*-lft-identity75.9%
Simplified75.9%
if 4.39999999999999974e-27 < F < 4.9000000000000001e178Initial program 61.9%
Simplified69.3%
Taylor expanded in x around 0 89.8%
associate-*l/89.7%
*-lft-identity89.7%
+-commutative89.7%
unpow289.7%
fma-undefine89.7%
Simplified89.7%
Taylor expanded in B around 0 76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
associate-*r*68.6%
sqrt-div68.7%
metadata-eval68.7%
un-div-inv68.7%
un-div-inv68.7%
Applied egg-rr68.7%
Taylor expanded in F around inf 70.8%
if 4.9000000000000001e178 < F Initial program 15.7%
Simplified37.0%
Taylor expanded in x around 0 37.0%
associate-*l/37.0%
*-lft-identity37.0%
+-commutative37.0%
unpow237.0%
fma-undefine37.0%
Simplified37.0%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 70.8%
Final simplification77.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -7e+116)
t_0
(if (<= F -3.6e+37)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1800000000.0)
t_0
(if (<= F 3.15e-30)
(/ (- x) (tan B))
(- (* F (/ (/ 1.0 F) B)) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -7e+116) {
tmp = t_0;
} else if (F <= -3.6e+37) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1800000000.0) {
tmp = t_0;
} else if (F <= 3.15e-30) {
tmp = -x / tan(B);
} else {
tmp = (F * ((1.0 / F) / B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-7d+116)) then
tmp = t_0
else if (f <= (-3.6d+37)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1800000000.0d0)) then
tmp = t_0
else if (f <= 3.15d-30) then
tmp = -x / tan(b)
else
tmp = (f * ((1.0d0 / f) / b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -7e+116) {
tmp = t_0;
} else if (F <= -3.6e+37) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1800000000.0) {
tmp = t_0;
} else if (F <= 3.15e-30) {
tmp = -x / Math.tan(B);
} else {
tmp = (F * ((1.0 / F) / B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -7e+116: tmp = t_0 elif F <= -3.6e+37: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1800000000.0: tmp = t_0 elif F <= 3.15e-30: tmp = -x / math.tan(B) else: tmp = (F * ((1.0 / F) / B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -7e+116) tmp = t_0; elseif (F <= -3.6e+37) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1800000000.0) tmp = t_0; elseif (F <= 3.15e-30) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -7e+116) tmp = t_0; elseif (F <= -3.6e+37) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1800000000.0) tmp = t_0; elseif (F <= 3.15e-30) tmp = -x / tan(B); else tmp = (F * ((1.0 / F) / B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7e+116], t$95$0, If[LessEqual[F, -3.6e+37], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1800000000.0], t$95$0, If[LessEqual[F, 3.15e-30], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -7 \cdot 10^{+116}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{+37}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1800000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.15 \cdot 10^{-30}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.99999999999999993e116 or -3.59999999999999998e37 < F < -1.8e9Initial program 51.8%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 84.9%
if -6.99999999999999993e116 < F < -3.59999999999999998e37Initial program 80.4%
Taylor expanded in F around -inf 99.5%
Taylor expanded in B around 0 90.1%
if -1.8e9 < F < 3.14999999999999991e-30Initial program 71.3%
Taylor expanded in F around -inf 48.8%
Taylor expanded in x around inf 75.8%
associate-/l*75.7%
clear-num75.6%
tan-quot75.7%
div-inv75.9%
*-un-lft-identity75.9%
Applied egg-rr75.9%
*-lft-identity75.9%
Simplified75.9%
if 3.14999999999999991e-30 < F Initial program 48.5%
Simplified60.0%
Taylor expanded in x around 0 74.5%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
fma-undefine74.4%
Simplified74.4%
Taylor expanded in F around inf 98.1%
Taylor expanded in B around 0 78.7%
Final simplification79.3%
(FPCore (F B x)
:precision binary64
(if (<= F -2.4e+56)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.05e-29)
(/ (- x) (tan B))
(if (<= F 1.32e+178) (- (/ (/ F B) F) (/ x (tan B))) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+56) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.05e-29) {
tmp = -x / tan(B);
} else if (F <= 1.32e+178) {
tmp = ((F / B) / F) - (x / tan(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.4d+56)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.05d-29) then
tmp = -x / tan(b)
else if (f <= 1.32d+178) then
tmp = ((f / b) / f) - (x / tan(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.4e+56) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.05e-29) {
tmp = -x / Math.tan(B);
} else if (F <= 1.32e+178) {
tmp = ((F / B) / F) - (x / Math.tan(B));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e+56: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.05e-29: tmp = -x / math.tan(B) elif F <= 1.32e+178: tmp = ((F / B) / F) - (x / math.tan(B)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e+56) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.05e-29) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.32e+178) tmp = Float64(Float64(Float64(F / B) / F) - Float64(x / tan(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.4e+56) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.05e-29) tmp = -x / tan(B); elseif (F <= 1.32e+178) tmp = ((F / B) / F) - (x / tan(B)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e+56], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.05e-29], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.32e+178], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.05 \cdot 10^{-29}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.32 \cdot 10^{+178}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.40000000000000013e56Initial program 49.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 82.8%
if -2.40000000000000013e56 < F < 4.0500000000000001e-29Initial program 74.2%
Taylor expanded in F around -inf 53.9%
Taylor expanded in x around inf 75.1%
associate-/l*75.0%
clear-num74.9%
tan-quot75.1%
div-inv75.3%
*-un-lft-identity75.3%
Applied egg-rr75.3%
*-lft-identity75.3%
Simplified75.3%
if 4.0500000000000001e-29 < F < 1.3200000000000001e178Initial program 61.9%
Simplified69.3%
Taylor expanded in x around 0 89.8%
associate-*l/89.7%
*-lft-identity89.7%
+-commutative89.7%
unpow289.7%
fma-undefine89.7%
Simplified89.7%
Taylor expanded in B around 0 76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
associate-*r*68.6%
sqrt-div68.7%
metadata-eval68.7%
un-div-inv68.7%
un-div-inv68.7%
Applied egg-rr68.7%
Taylor expanded in F around inf 70.8%
if 1.3200000000000001e178 < F Initial program 15.7%
Simplified37.0%
Taylor expanded in x around 0 37.0%
associate-*l/37.0%
*-lft-identity37.0%
+-commutative37.0%
unpow237.0%
fma-undefine37.0%
Simplified37.0%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 70.8%
Final simplification75.5%
(FPCore (F B x) :precision binary64 (if (<= F -2.4e+56) (/ (- -1.0 x) B) (if (<= F 8.6e+20) (/ (- x) (sin B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+56) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.6e+20) {
tmp = -x / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.4d+56)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.6d+20) then
tmp = -x / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+56) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.6e+20) {
tmp = -x / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e+56: tmp = (-1.0 - x) / B elif F <= 8.6e+20: tmp = -x / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e+56) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.6e+20) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.4e+56) tmp = (-1.0 - x) / B; elseif (F <= 8.6e+20) tmp = -x / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e+56], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.6e+20], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{+20}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.40000000000000013e56Initial program 49.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 58.6%
mul-1-neg58.6%
distribute-neg-frac258.6%
Simplified58.6%
Taylor expanded in B around 0 58.6%
associate-*r/58.6%
neg-mul-158.6%
distribute-neg-in58.6%
metadata-eval58.6%
unsub-neg58.6%
Simplified58.6%
if -2.40000000000000013e56 < F < 8.6e20Initial program 71.5%
Taylor expanded in F around -inf 55.8%
Taylor expanded in x around inf 75.8%
Taylor expanded in B around 0 39.8%
if 8.6e20 < F Initial program 51.6%
Simplified64.6%
Taylor expanded in x around 0 71.2%
associate-*l/71.1%
*-lft-identity71.1%
+-commutative71.1%
unpow271.1%
fma-undefine71.1%
Simplified71.1%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 58.8%
Final simplification47.9%
(FPCore (F B x) :precision binary64 (if (<= F -2.4e+56) (/ (- -1.0 x) B) (if (<= F 4.2e+92) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+56) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e+92) {
tmp = -x / tan(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.4d+56)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.2d+92) then
tmp = -x / tan(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.4e+56) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e+92) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e+56: tmp = (-1.0 - x) / B elif F <= 4.2e+92: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e+56) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.2e+92) tmp = Float64(Float64(-x) / tan(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.4e+56) tmp = (-1.0 - x) / B; elseif (F <= 4.2e+92) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e+56], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e+92], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{+92}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.40000000000000013e56Initial program 49.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 58.6%
mul-1-neg58.6%
distribute-neg-frac258.6%
Simplified58.6%
Taylor expanded in B around 0 58.6%
associate-*r/58.6%
neg-mul-158.6%
distribute-neg-in58.6%
metadata-eval58.6%
unsub-neg58.6%
Simplified58.6%
if -2.40000000000000013e56 < F < 4.19999999999999972e92Initial program 71.2%
Taylor expanded in F around -inf 56.0%
Taylor expanded in x around inf 73.9%
associate-/l*73.8%
clear-num73.7%
tan-quot73.8%
div-inv74.0%
*-un-lft-identity74.0%
Applied egg-rr74.0%
*-lft-identity74.0%
Simplified74.0%
if 4.19999999999999972e92 < F Initial program 43.8%
Simplified58.3%
Taylor expanded in x around 0 58.4%
associate-*l/58.3%
*-lft-identity58.3%
+-commutative58.3%
unpow258.3%
fma-undefine58.3%
Simplified58.3%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 60.7%
Final simplification68.9%
(FPCore (F B x) :precision binary64 (if (<= F -2.4e+56) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 5.5e+92) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e+56) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.5e+92) {
tmp = -x / tan(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.4d+56)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.5d+92) then
tmp = -x / tan(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.4e+56) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.5e+92) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e+56: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.5e+92: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e+56) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.5e+92) tmp = Float64(Float64(-x) / tan(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.4e+56) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.5e+92) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e+56], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e+92], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{+56}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{+92}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.40000000000000013e56Initial program 49.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 82.8%
if -2.40000000000000013e56 < F < 5.50000000000000053e92Initial program 71.2%
Taylor expanded in F around -inf 56.0%
Taylor expanded in x around inf 73.9%
associate-/l*73.8%
clear-num73.7%
tan-quot73.8%
div-inv74.0%
*-un-lft-identity74.0%
Applied egg-rr74.0%
*-lft-identity74.0%
Simplified74.0%
if 5.50000000000000053e92 < F Initial program 43.8%
Simplified58.3%
Taylor expanded in x around 0 58.4%
associate-*l/58.3%
*-lft-identity58.3%
+-commutative58.3%
unpow258.3%
fma-undefine58.3%
Simplified58.3%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 60.7%
Final simplification73.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.15e-133) (not (<= x 8.5e-214))) (/ x (- B)) (/ (+ x 1.0) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.15e-133) || !(x <= 8.5e-214)) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.15d-133)) .or. (.not. (x <= 8.5d-214))) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.15e-133) || !(x <= 8.5e-214)) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.15e-133) or not (x <= 8.5e-214): tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.15e-133) || !(x <= 8.5e-214)) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.15e-133) || ~((x <= 8.5e-214))) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.15e-133], N[Not[LessEqual[x, 8.5e-214]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-133} \lor \neg \left(x \leq 8.5 \cdot 10^{-214}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if x < -1.15e-133 or 8.5000000000000006e-214 < x Initial program 62.9%
Taylor expanded in F around -inf 69.3%
Taylor expanded in B around 0 37.9%
mul-1-neg37.9%
distribute-neg-frac237.9%
Simplified37.9%
Taylor expanded in x around inf 39.4%
associate-*r/39.4%
neg-mul-139.4%
Simplified39.4%
if -1.15e-133 < x < 8.5000000000000006e-214Initial program 61.7%
Taylor expanded in F around -inf 33.2%
Taylor expanded in B around 0 14.9%
mul-1-neg14.9%
distribute-neg-frac214.9%
Simplified14.9%
add-sqr-sqrt6.3%
sqrt-unprod13.2%
sqr-neg13.2%
sqrt-unprod8.6%
add-sqr-sqrt27.3%
*-un-lft-identity27.3%
Applied egg-rr27.3%
*-lft-identity27.3%
Simplified27.3%
Final simplification36.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.15e-106) (/ (- -1.0 x) B) (if (<= F 1.85e+95) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-106) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.85e+95) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.15d-106)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.85d+95) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e-106) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.85e+95) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e-106: tmp = (-1.0 - x) / B elif F <= 1.85e+95: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e-106) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.85e+95) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e-106) tmp = (-1.0 - x) / B; elseif (F <= 1.85e+95) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e-106], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.85e+95], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{-106}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{+95}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.15e-106Initial program 65.4%
Taylor expanded in F around -inf 89.5%
Taylor expanded in B around 0 49.2%
mul-1-neg49.2%
distribute-neg-frac249.2%
Simplified49.2%
Taylor expanded in B around 0 49.2%
associate-*r/49.2%
neg-mul-149.2%
distribute-neg-in49.2%
metadata-eval49.2%
unsub-neg49.2%
Simplified49.2%
if -1.15e-106 < F < 1.8500000000000001e95Initial program 67.1%
Taylor expanded in F around -inf 50.8%
Taylor expanded in B around 0 25.3%
mul-1-neg25.3%
distribute-neg-frac225.3%
Simplified25.3%
Taylor expanded in x around inf 35.1%
associate-*r/35.1%
neg-mul-135.1%
Simplified35.1%
if 1.8500000000000001e95 < F Initial program 42.4%
Taylor expanded in F around -inf 37.6%
Taylor expanded in B around 0 24.0%
mul-1-neg24.0%
distribute-neg-frac224.0%
Simplified24.0%
add-sqr-sqrt13.4%
sqrt-unprod26.7%
sqr-neg26.7%
sqrt-unprod17.9%
add-sqr-sqrt38.4%
*-un-lft-identity38.4%
Applied egg-rr38.4%
*-lft-identity38.4%
Simplified38.4%
Final simplification40.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.4e-105) (/ (- -1.0 x) B) (if (<= F 1.12e-29) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-105) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.12e-29) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.4d-105)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.12d-29) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-105) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.12e-29) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-105: tmp = (-1.0 - x) / B elif F <= 1.12e-29: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-105) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.12e-29) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4e-105) tmp = (-1.0 - x) / B; elseif (F <= 1.12e-29) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-105], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.12e-29], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-105}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.4e-105Initial program 65.4%
Taylor expanded in F around -inf 89.5%
Taylor expanded in B around 0 49.2%
mul-1-neg49.2%
distribute-neg-frac249.2%
Simplified49.2%
Taylor expanded in B around 0 49.2%
associate-*r/49.2%
neg-mul-149.2%
distribute-neg-in49.2%
metadata-eval49.2%
unsub-neg49.2%
Simplified49.2%
if -1.4e-105 < F < 1.11999999999999995e-29Initial program 69.7%
Taylor expanded in F around -inf 47.1%
Taylor expanded in B around 0 23.9%
mul-1-neg23.9%
distribute-neg-frac223.9%
Simplified23.9%
Taylor expanded in x around inf 36.3%
associate-*r/36.3%
neg-mul-136.3%
Simplified36.3%
if 1.11999999999999995e-29 < F Initial program 48.5%
Simplified60.0%
Taylor expanded in x around 0 74.5%
associate-*l/74.4%
*-lft-identity74.4%
+-commutative74.4%
unpow274.4%
fma-undefine74.4%
Simplified74.4%
Taylor expanded in F around inf 98.1%
Taylor expanded in B around 0 56.5%
Final simplification45.9%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 62.6%
Taylor expanded in F around -inf 61.2%
Taylor expanded in B around 0 32.8%
mul-1-neg32.8%
distribute-neg-frac232.8%
Simplified32.8%
Taylor expanded in x around inf 31.8%
associate-*r/31.8%
neg-mul-131.8%
Simplified31.8%
Final simplification31.8%
herbie shell --seed 2024061
(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))))))