
(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 20 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 -1e+40)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 400000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+40) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 400000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+40) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 400000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 400000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+40}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 400000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.00000000000000003e40Initial program 53.5%
Simplified65.8%
Taylor expanded in x around 0 67.7%
associate-*l/67.7%
*-lft-identity67.7%
+-commutative67.7%
unpow267.7%
fma-undefine67.7%
Simplified67.7%
Taylor expanded in F around -inf 99.8%
if -1.00000000000000003e40 < F < 4e8Initial program 80.0%
Simplified80.1%
Taylor expanded in x around 0 99.4%
associate-*l/99.4%
*-lft-identity99.4%
+-commutative99.4%
unpow299.4%
fma-undefine99.4%
Simplified99.4%
if 4e8 < F Initial program 56.4%
Simplified66.6%
Taylor expanded in x around 0 75.3%
associate-*l/75.3%
*-lft-identity75.3%
+-commutative75.3%
unpow275.3%
fma-undefine75.3%
Simplified75.3%
Taylor expanded in F around inf 99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1300000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 27.0)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(+
(* x (/ -1.0 (tan B)))
(/
F
(/
(sin B)
(/ (+ 1.0 (* -0.5 (/ (+ 2.0 (* x 2.0)) (pow F 2.0)))) F))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1300000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 27.0) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / ((1.0 + (-0.5 * ((2.0 + (x * 2.0)) / pow(F, 2.0)))) / F)));
}
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 <= (-1300000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 27.0d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) / ((1.0d0 + ((-0.5d0) * ((2.0d0 + (x * 2.0d0)) / (f ** 2.0d0)))) / f)))
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 <= -1300000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 27.0) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) / ((1.0 + (-0.5 * ((2.0 + (x * 2.0)) / Math.pow(F, 2.0)))) / F)));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1300000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 27.0: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) / ((1.0 + (-0.5 * ((2.0 + (x * 2.0)) / math.pow(F, 2.0)))) / F))) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1300000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 27.0) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) / Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(2.0 + Float64(x * 2.0)) / (F ^ 2.0)))) / F)))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1300000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 27.0) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) / ((1.0 + (-0.5 * ((2.0 + (x * 2.0)) / (F ^ 2.0)))) / F))); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1300000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 27.0], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] / N[(N[(1.0 + N[(-0.5 * N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1300000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 27:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\frac{\sin B}{\frac{1 + -0.5 \cdot \frac{2 + x \cdot 2}{{F}^{2}}}{F}}}\\
\end{array}
\end{array}
if F < -1.3e6Initial program 55.9%
Simplified67.1%
Taylor expanded in x around 0 70.7%
associate-*l/70.7%
*-lft-identity70.7%
+-commutative70.7%
unpow270.7%
fma-undefine70.7%
Simplified70.7%
Taylor expanded in F around -inf 99.8%
if -1.3e6 < F < 27Initial program 79.6%
Simplified79.7%
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.8%
*-commutative99.8%
Simplified99.8%
if 27 < F Initial program 58.2%
associate-*l/68.0%
+-commutative68.0%
*-commutative68.0%
fma-undefine68.0%
fma-define68.0%
metadata-eval68.0%
metadata-eval68.0%
associate-*r/68.0%
clear-num68.0%
un-div-inv68.1%
fma-define68.1%
fma-undefine68.1%
*-commutative68.1%
fma-define68.1%
fma-define68.1%
Applied egg-rr68.1%
Taylor expanded in F around inf 98.2%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1300000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.8e-14)
(- (* 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 <= -1300000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= (-1300000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.8d-14) 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 <= -1300000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= -1300000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.8e-14: 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 <= -1300000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.8e-14) 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 <= -1300000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.8e-14) 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, -1300000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-14], 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 -1300000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-14}:\\
\;\;\;\;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.3e6Initial program 55.9%
Simplified67.1%
Taylor expanded in x around 0 70.7%
associate-*l/70.7%
*-lft-identity70.7%
+-commutative70.7%
unpow270.7%
fma-undefine70.7%
Simplified70.7%
Taylor expanded in F around -inf 99.8%
if -1.3e6 < F < 5.8000000000000005e-14Initial program 79.4%
Simplified79.5%
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.7%
if 5.8000000000000005e-14 < F Initial program 58.8%
Simplified68.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
Taylor expanded in F around inf 97.9%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1300000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.8e-14)
(- (/ (* 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 <= -1300000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= (-1300000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.8d-14) 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 <= -1300000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= -1300000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.8e-14: 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 <= -1300000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.8e-14) 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 <= -1300000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.8e-14) 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, -1300000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-14], 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 -1300000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-14}:\\
\;\;\;\;\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.3e6Initial program 55.9%
Simplified67.1%
Taylor expanded in x around 0 70.7%
associate-*l/70.7%
*-lft-identity70.7%
+-commutative70.7%
unpow270.7%
fma-undefine70.7%
Simplified70.7%
Taylor expanded in F around -inf 99.8%
if -1.3e6 < F < 5.8000000000000005e-14Initial program 79.4%
Simplified79.5%
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.8%
*-commutative99.8%
Simplified99.8%
if 5.8000000000000005e-14 < F Initial program 58.8%
Simplified68.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
Taylor expanded in F around inf 97.9%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.4e-15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.9e-124)
(- (/ (* F (sqrt 0.5)) B) t_0)
(if (<= F 9e-70)
(- (* (/ F (sin B)) (pow (+ (* x 2.0) (+ 2.0 (* F F))) -0.5)) (/ x B))
(if (<= F 5.8e-14)
(- (* F (* (sqrt 0.5) (/ 1.0 B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.4e-15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.9e-124) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else if (F <= 9e-70) {
tmp = ((F / sin(B)) * pow(((x * 2.0) + (2.0 + (F * F))), -0.5)) - (x / B);
} else if (F <= 5.8e-14) {
tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.4d-15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.9d-124) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else if (f <= 9d-70) then
tmp = ((f / sin(b)) * (((x * 2.0d0) + (2.0d0 + (f * f))) ** (-0.5d0))) - (x / b)
else if (f <= 5.8d-14) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.4e-15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.9e-124) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else if (F <= 9e-70) {
tmp = ((F / Math.sin(B)) * Math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5)) - (x / B);
} else if (F <= 5.8e-14) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.4e-15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.9e-124: tmp = ((F * math.sqrt(0.5)) / B) - t_0 elif F <= 9e-70: tmp = ((F / math.sin(B)) * math.pow(((x * 2.0) + (2.0 + (F * F))), -0.5)) - (x / B) elif F <= 5.8e-14: tmp = (F * (math.sqrt(0.5) * (1.0 / B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.4e-15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.9e-124) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); elseif (F <= 9e-70) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(x * 2.0) + Float64(2.0 + Float64(F * F))) ^ -0.5)) - Float64(x / B)); elseif (F <= 5.8e-14) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.4e-15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.9e-124) tmp = ((F * sqrt(0.5)) / B) - t_0; elseif (F <= 9e-70) tmp = ((F / sin(B)) * (((x * 2.0) + (2.0 + (F * F))) ^ -0.5)) - (x / B); elseif (F <= 5.8e-14) tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.4e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.9e-124], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9e-70], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(x * 2.0), $MachinePrecision] + N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-14], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.9 \cdot 10^{-124}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-70}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(x \cdot 2 + \left(2 + F \cdot F\right)\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-14}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.3999999999999999e-15Initial program 55.5%
Simplified65.9%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
Taylor expanded in F around -inf 98.3%
if -6.3999999999999999e-15 < F < 4.89999999999999965e-124Initial program 80.4%
Simplified80.4%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in B around 0 89.6%
+-commutative89.6%
unpow289.6%
fma-undefine89.6%
Simplified89.6%
Taylor expanded in F around 0 89.7%
if 4.89999999999999965e-124 < F < 9.00000000000000044e-70Initial program 99.1%
Taylor expanded in B around 0 88.6%
if 9.00000000000000044e-70 < F < 5.8000000000000005e-14Initial program 56.7%
Simplified56.7%
Taylor expanded in x around 0 99.8%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 86.7%
+-commutative86.7%
unpow286.7%
fma-undefine86.7%
Simplified86.7%
Taylor expanded in F around 0 86.7%
if 5.8000000000000005e-14 < F Initial program 58.8%
Simplified68.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
Taylor expanded in F around inf 97.9%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.4e-15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.8e-14)
(- (* 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 <= -6.4e-15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= (-6.4d-15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.8d-14) 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 <= -6.4e-15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= -6.4e-15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.8e-14: 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 <= -6.4e-15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.8e-14) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.4e-15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.8e-14) 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, -6.4e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-14], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-14}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.3999999999999999e-15Initial program 55.5%
Simplified65.9%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
Taylor expanded in F around -inf 98.3%
if -6.3999999999999999e-15 < F < 5.8000000000000005e-14Initial program 80.4%
Simplified80.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in B around 0 85.6%
+-commutative85.6%
unpow285.6%
fma-undefine85.6%
Simplified85.6%
Taylor expanded in F around 0 85.6%
associate-/l*85.6%
Simplified85.6%
if 5.8000000000000005e-14 < F Initial program 58.8%
Simplified68.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
Taylor expanded in F around inf 97.9%
Final simplification92.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.4e-15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5.8e-14)
(- (/ (* 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 <= -6.4e-15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= (-6.4d-15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5.8d-14) 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 <= -6.4e-15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5.8e-14) {
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 <= -6.4e-15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5.8e-14: 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 <= -6.4e-15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5.8e-14) 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 <= -6.4e-15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5.8e-14) 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, -6.4e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.8e-14], 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 -6.4 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.3999999999999999e-15Initial program 55.5%
Simplified65.9%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
Taylor expanded in F around -inf 98.3%
if -6.3999999999999999e-15 < F < 5.8000000000000005e-14Initial program 80.4%
Simplified80.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in B around 0 85.6%
+-commutative85.6%
unpow285.6%
fma-undefine85.6%
Simplified85.6%
Taylor expanded in F around 0 85.6%
if 5.8000000000000005e-14 < F Initial program 58.8%
Simplified68.4%
Taylor expanded in x around 0 76.2%
associate-*l/76.2%
*-lft-identity76.2%
+-commutative76.2%
unpow276.2%
fma-undefine76.2%
Simplified76.2%
Taylor expanded in F around inf 97.9%
Final simplification92.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e-47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.6e-84) (/ 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.9e-47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.6e-84) {
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.9d-47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.6d-84) 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.9e-47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.6e-84) {
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.9e-47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.6e-84: 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.9e-47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.6e-84) tmp = Float64(x / Float64(-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.9e-47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.6e-84) 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.9e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.6e-84], 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.9 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-84}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.90000000000000007e-47Initial program 60.9%
Simplified69.9%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in F around -inf 90.1%
if -1.90000000000000007e-47 < F < 1.6e-84Initial program 80.0%
div-inv80.1%
Applied egg-rr80.1%
Taylor expanded in F around -inf 48.3%
Taylor expanded in x around inf 76.5%
mul-1-neg76.5%
associate-/l*76.5%
distribute-lft-neg-in76.5%
Simplified76.5%
distribute-lft-neg-out76.5%
clear-num76.4%
tan-quot76.5%
div-inv76.7%
distribute-neg-frac276.7%
Applied egg-rr76.7%
if 1.6e-84 < F Initial program 60.1%
Simplified68.6%
Taylor expanded in x around 0 79.0%
associate-*l/79.0%
*-lft-identity79.0%
+-commutative79.0%
unpow279.0%
fma-undefine79.0%
Simplified79.0%
Taylor expanded in F around inf 91.4%
Final simplification84.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.8e-47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.5e-53)
(/ x (- (tan B)))
(if (<= F 1.95e+132)
(- (/ 1.0 (* F (/ (sin B) F))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.8e-47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.5e-53) {
tmp = x / -tan(B);
} else if (F <= 1.95e+132) {
tmp = (1.0 / (F * (sin(B) / F))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.8d-47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.5d-53) then
tmp = x / -tan(b)
else if (f <= 1.95d+132) then
tmp = (1.0d0 / (f * (sin(b) / f))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.8e-47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.5e-53) {
tmp = x / -Math.tan(B);
} else if (F <= 1.95e+132) {
tmp = (1.0 / (F * (Math.sin(B) / F))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.8e-47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.5e-53: tmp = x / -math.tan(B) elif F <= 1.95e+132: tmp = (1.0 / (F * (math.sin(B) / F))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e-47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.5e-53) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1.95e+132) tmp = Float64(Float64(1.0 / Float64(F * Float64(sin(B) / F))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.8e-47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.5e-53) tmp = x / -tan(B); elseif (F <= 1.95e+132) tmp = (1.0 / (F * (sin(B) / F))) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e-47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.5e-53], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.95e+132], N[(N[(1.0 / N[(F * N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{+132}:\\
\;\;\;\;\frac{1}{F \cdot \frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.79999999999999995e-47Initial program 60.9%
Simplified69.9%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in F around -inf 90.1%
if -1.79999999999999995e-47 < F < 4.49999999999999985e-53Initial program 79.0%
div-inv79.2%
Applied egg-rr79.2%
Taylor expanded in F around -inf 48.9%
Taylor expanded in x around inf 75.9%
mul-1-neg75.9%
associate-/l*75.8%
distribute-lft-neg-in75.8%
Simplified75.8%
distribute-lft-neg-out75.8%
clear-num75.7%
tan-quot75.8%
div-inv76.0%
distribute-neg-frac276.0%
Applied egg-rr76.0%
if 4.49999999999999985e-53 < F < 1.95000000000000001e132Initial program 78.1%
Taylor expanded in F around inf 80.8%
clear-num80.7%
frac-times80.8%
metadata-eval80.8%
Applied egg-rr80.8%
Taylor expanded in B around 0 64.3%
if 1.95000000000000001e132 < F Initial program 43.9%
Simplified56.4%
Taylor expanded in x around 0 58.8%
associate-*l/58.8%
*-lft-identity58.8%
+-commutative58.8%
unpow258.8%
fma-undefine58.8%
Simplified58.8%
Taylor expanded in B around 0 56.5%
+-commutative56.5%
unpow256.5%
fma-undefine56.5%
Simplified56.5%
Taylor expanded in F around inf 75.4%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -7000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.5e-53)
(/ x (- (tan B)))
(if (<= F 2.7e+112)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.5e-53) {
tmp = x / -tan(B);
} else if (F <= 2.7e+112) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.5d-53) then
tmp = x / -tan(b)
else if (f <= 2.7d+112) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.5e-53) {
tmp = x / -Math.tan(B);
} else if (F <= 2.7e+112) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.5e-53: tmp = x / -math.tan(B) elif F <= 2.7e+112: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.5e-53) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.7e+112) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.5e-53) tmp = x / -tan(B); elseif (F <= 2.7e+112) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-53], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.7e+112], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{+112}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7e6Initial program 55.9%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 84.1%
if -7e6 < F < 4.49999999999999985e-53Initial program 79.4%
div-inv79.6%
Applied egg-rr79.6%
Taylor expanded in F around -inf 48.6%
Taylor expanded in x around inf 72.7%
mul-1-neg72.7%
associate-/l*72.6%
distribute-lft-neg-in72.6%
Simplified72.6%
distribute-lft-neg-out72.6%
clear-num72.5%
tan-quot72.6%
div-inv72.8%
distribute-neg-frac272.8%
Applied egg-rr72.8%
if 4.49999999999999985e-53 < F < 2.7000000000000001e112Initial program 79.0%
Taylor expanded in F around inf 81.9%
Taylor expanded in B around 0 63.9%
if 2.7000000000000001e112 < F Initial program 45.5%
Simplified59.2%
Taylor expanded in x around 0 61.5%
associate-*l/61.5%
*-lft-identity61.5%
+-commutative61.5%
unpow261.5%
fma-undefine61.5%
Simplified61.5%
Taylor expanded in B around 0 57.3%
+-commutative57.3%
unpow257.3%
fma-undefine57.3%
Simplified57.3%
Taylor expanded in F around inf 75.0%
Final simplification74.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1300000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.5e-53)
(/ x (- (tan B)))
(if (<= F 2.75e+132)
(- (/ 1.0 (* F (/ (sin B) F))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1300000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.5e-53) {
tmp = x / -tan(B);
} else if (F <= 2.75e+132) {
tmp = (1.0 / (F * (sin(B) / F))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1300000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.5d-53) then
tmp = x / -tan(b)
else if (f <= 2.75d+132) then
tmp = (1.0d0 / (f * (sin(b) / f))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1300000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.5e-53) {
tmp = x / -Math.tan(B);
} else if (F <= 2.75e+132) {
tmp = (1.0 / (F * (Math.sin(B) / F))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1300000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.5e-53: tmp = x / -math.tan(B) elif F <= 2.75e+132: tmp = (1.0 / (F * (math.sin(B) / F))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1300000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.5e-53) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.75e+132) tmp = Float64(Float64(1.0 / Float64(F * Float64(sin(B) / F))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1300000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.5e-53) tmp = x / -tan(B); elseif (F <= 2.75e+132) tmp = (1.0 / (F * (sin(B) / F))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1300000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-53], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.75e+132], N[(N[(1.0 / N[(F * N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1300000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{+132}:\\
\;\;\;\;\frac{1}{F \cdot \frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.3e6Initial program 55.9%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 84.1%
if -1.3e6 < F < 4.49999999999999985e-53Initial program 79.4%
div-inv79.6%
Applied egg-rr79.6%
Taylor expanded in F around -inf 48.6%
Taylor expanded in x around inf 72.7%
mul-1-neg72.7%
associate-/l*72.6%
distribute-lft-neg-in72.6%
Simplified72.6%
distribute-lft-neg-out72.6%
clear-num72.5%
tan-quot72.6%
div-inv72.8%
distribute-neg-frac272.8%
Applied egg-rr72.8%
if 4.49999999999999985e-53 < F < 2.75e132Initial program 78.1%
Taylor expanded in F around inf 80.8%
clear-num80.7%
frac-times80.8%
metadata-eval80.8%
Applied egg-rr80.8%
Taylor expanded in B around 0 64.3%
if 2.75e132 < F Initial program 43.9%
Simplified56.4%
Taylor expanded in x around 0 58.8%
associate-*l/58.8%
*-lft-identity58.8%
+-commutative58.8%
unpow258.8%
fma-undefine58.8%
Simplified58.8%
Taylor expanded in B around 0 56.5%
+-commutative56.5%
unpow256.5%
fma-undefine56.5%
Simplified56.5%
Taylor expanded in F around inf 75.4%
Final simplification74.4%
(FPCore (F B x)
:precision binary64
(if (<= F -5.4e-48)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 2.55e+107)
(/ x (- (tan B)))
(if (<= F 2.4e+132) (/ 1.0 (sin B)) (* x (/ -1.0 (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e-48) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.55e+107) {
tmp = x / -tan(B);
} else if (F <= 2.4e+132) {
tmp = 1.0 / sin(B);
} else {
tmp = x * (-1.0 / 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 <= (-5.4d-48)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.55d+107) then
tmp = x / -tan(b)
else if (f <= 2.4d+132) then
tmp = 1.0d0 / sin(b)
else
tmp = x * ((-1.0d0) / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e-48) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.55e+107) {
tmp = x / -Math.tan(B);
} else if (F <= 2.4e+132) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = x * (-1.0 / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.4e-48: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.55e+107: tmp = x / -math.tan(B) elif F <= 2.4e+132: tmp = 1.0 / math.sin(B) else: tmp = x * (-1.0 / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.4e-48) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.55e+107) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 2.4e+132) tmp = Float64(1.0 / sin(B)); else tmp = Float64(x * Float64(-1.0 / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.4e-48) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.55e+107) tmp = x / -tan(B); elseif (F <= 2.4e+132) tmp = 1.0 / sin(B); else tmp = x * (-1.0 / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.4e-48], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.55e+107], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.4e+132], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.4 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.55 \cdot 10^{+107}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{+132}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B}\\
\end{array}
\end{array}
if F < -5.40000000000000023e-48Initial program 60.9%
Simplified69.9%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in B around 0 60.5%
+-commutative60.5%
unpow260.5%
fma-undefine60.5%
Simplified60.5%
Taylor expanded in F around -inf 68.2%
if -5.40000000000000023e-48 < F < 2.5500000000000001e107Initial program 78.6%
div-inv78.8%
Applied egg-rr78.8%
Taylor expanded in F around -inf 47.5%
Taylor expanded in x around inf 69.6%
mul-1-neg69.6%
associate-/l*69.5%
distribute-lft-neg-in69.5%
Simplified69.5%
distribute-lft-neg-out69.5%
clear-num69.4%
tan-quot69.6%
div-inv69.7%
distribute-neg-frac269.7%
Applied egg-rr69.7%
if 2.5500000000000001e107 < F < 2.4000000000000001e132Initial program 83.9%
Taylor expanded in F around -inf 1.3%
div-inv1.3%
metadata-eval1.3%
rgt-mult-inverse1.3%
associate-*l/1.2%
add-sqr-sqrt0.4%
sqrt-unprod51.0%
*-commutative51.0%
associate-*r/51.2%
*-commutative51.2%
rgt-mult-inverse51.2%
associate-*l/51.2%
rgt-mult-inverse51.2%
frac-times51.2%
metadata-eval51.2%
metadata-eval51.2%
frac-times51.2%
sqrt-unprod66.1%
add-sqr-sqrt99.7%
Applied egg-rr99.7%
*-lft-identity99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
if 2.4000000000000001e132 < F Initial program 43.9%
div-inv43.9%
Applied egg-rr43.9%
Taylor expanded in F around -inf 43.0%
Taylor expanded in x around inf 54.2%
mul-1-neg54.2%
associate-/l*54.4%
distribute-lft-neg-in54.4%
Simplified54.4%
*-un-lft-identity54.4%
clear-num54.3%
tan-quot54.2%
Applied egg-rr54.2%
*-lft-identity54.2%
Simplified54.2%
Final simplification67.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-48)
(- (/ -1.0 B) t_0)
(if (<= F 1.02e-170) (/ x (- (tan B))) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6e-48) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.02e-170) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6d-48)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.02d-170) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6e-48) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.02e-170) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6e-48: tmp = (-1.0 / B) - t_0 elif F <= 1.02e-170: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6e-48) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.02e-170) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6e-48) tmp = (-1.0 / B) - t_0; elseif (F <= 1.02e-170) tmp = x / -tan(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6e-48], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.02e-170], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{-170}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -5.9999999999999998e-48Initial program 60.9%
Simplified69.9%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in B around 0 60.5%
+-commutative60.5%
unpow260.5%
fma-undefine60.5%
Simplified60.5%
Taylor expanded in F around -inf 68.2%
if -5.9999999999999998e-48 < F < 1.02e-170Initial program 78.9%
div-inv79.1%
Applied egg-rr79.1%
Taylor expanded in F around -inf 48.4%
Taylor expanded in x around inf 80.0%
mul-1-neg80.0%
associate-/l*79.9%
distribute-lft-neg-in79.9%
Simplified79.9%
distribute-lft-neg-out79.9%
clear-num79.9%
tan-quot80.0%
div-inv80.2%
distribute-neg-frac280.2%
Applied egg-rr80.2%
if 1.02e-170 < F Initial program 64.1%
Simplified71.3%
Taylor expanded in x around 0 82.2%
associate-*l/82.1%
*-lft-identity82.1%
+-commutative82.1%
unpow282.1%
fma-undefine82.1%
Simplified82.1%
Taylor expanded in B around 0 60.3%
+-commutative60.3%
unpow260.3%
fma-undefine60.3%
Simplified60.3%
Taylor expanded in F around inf 62.9%
Final simplification70.5%
(FPCore (F B x) :precision binary64 (if (<= F -105000000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.8e-168) (/ x (- (tan B))) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -105000000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.8e-168) {
tmp = x / -tan(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 <= (-105000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.8d-168) then
tmp = x / -tan(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 <= -105000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.8e-168) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -105000000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.8e-168: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -105000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.8e-168) tmp = Float64(x / Float64(-tan(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 <= -105000000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.8e-168) tmp = x / -tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -105000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e-168], N[(x / (-N[Tan[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 -105000000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-168}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.05e11Initial program 55.9%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 84.1%
if -1.05e11 < F < 1.7999999999999999e-168Initial program 79.4%
div-inv79.6%
Applied egg-rr79.6%
Taylor expanded in F around -inf 48.2%
Taylor expanded in x around inf 75.7%
mul-1-neg75.7%
associate-/l*75.7%
distribute-lft-neg-in75.7%
Simplified75.7%
distribute-lft-neg-out75.7%
clear-num75.6%
tan-quot75.7%
div-inv75.9%
distribute-neg-frac275.9%
Applied egg-rr75.9%
if 1.7999999999999999e-168 < F Initial program 64.1%
Simplified71.3%
Taylor expanded in x around 0 82.2%
associate-*l/82.1%
*-lft-identity82.1%
+-commutative82.1%
unpow282.1%
fma-undefine82.1%
Simplified82.1%
Taylor expanded in B around 0 60.3%
+-commutative60.3%
unpow260.3%
fma-undefine60.3%
Simplified60.3%
Taylor expanded in F around inf 62.9%
Final simplification72.7%
(FPCore (F B x) :precision binary64 (if (<= F -5.5e-53) (/ (- -1.0 x) B) (if (<= F 24.0) (/ x (- B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e-53) {
tmp = (-1.0 - x) / B;
} else if (F <= 24.0) {
tmp = x / -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 (f <= (-5.5d-53)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 24.0d0) then
tmp = x / -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 (F <= -5.5e-53) {
tmp = (-1.0 - x) / B;
} else if (F <= 24.0) {
tmp = x / -B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e-53: tmp = (-1.0 - x) / B elif F <= 24.0: tmp = x / -B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e-53) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 24.0) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5e-53) tmp = (-1.0 - x) / B; elseif (F <= 24.0) tmp = x / -B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e-53], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 24.0], N[(x / (-B)), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 24:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.50000000000000023e-53Initial program 62.0%
Taylor expanded in F around -inf 87.4%
Taylor expanded in B around 0 49.0%
mul-1-neg49.0%
distribute-neg-frac249.0%
Simplified49.0%
Taylor expanded in B around 0 49.0%
associate-*r/49.0%
neg-mul-149.0%
distribute-neg-in49.0%
metadata-eval49.0%
unsub-neg49.0%
Simplified49.0%
if -5.50000000000000023e-53 < F < 24Initial program 78.9%
Taylor expanded in F around -inf 48.8%
Taylor expanded in B around 0 30.8%
mul-1-neg30.8%
distribute-neg-frac230.8%
Simplified30.8%
Taylor expanded in x around inf 38.4%
mul-1-neg38.4%
distribute-neg-frac238.4%
Simplified38.4%
if 24 < F Initial program 58.2%
Taylor expanded in F around -inf 47.0%
div-inv47.0%
metadata-eval47.0%
rgt-mult-inverse47.0%
associate-*l/40.0%
add-sqr-sqrt19.4%
sqrt-unprod63.4%
*-commutative63.4%
associate-*r/63.4%
*-commutative63.4%
rgt-mult-inverse63.4%
associate-*l/64.8%
rgt-mult-inverse64.8%
frac-times64.7%
metadata-eval64.7%
metadata-eval64.7%
frac-times64.8%
sqrt-unprod54.7%
add-sqr-sqrt97.8%
Applied egg-rr47.3%
*-lft-identity47.3%
+-commutative47.3%
Simplified47.3%
Taylor expanded in x around 0 49.3%
Final simplification44.3%
(FPCore (F B x) :precision binary64 (if (<= B 2.8e-51) (/ (- -1.0 x) B) (/ x (- (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 2.8e-51) {
tmp = (-1.0 - x) / B;
} else {
tmp = 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 (b <= 2.8d-51) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 2.8e-51) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 2.8e-51: tmp = (-1.0 - x) / B else: tmp = x / -math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 2.8e-51) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 2.8e-51) tmp = (-1.0 - x) / B; else tmp = x / -tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 2.8e-51], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 2.8 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\end{array}
\end{array}
if B < 2.8e-51Initial program 64.7%
Taylor expanded in F around -inf 62.7%
Taylor expanded in B around 0 43.9%
mul-1-neg43.9%
distribute-neg-frac243.9%
Simplified43.9%
Taylor expanded in B around 0 43.9%
associate-*r/43.9%
neg-mul-143.9%
distribute-neg-in43.9%
metadata-eval43.9%
unsub-neg43.9%
Simplified43.9%
if 2.8e-51 < B Initial program 76.5%
div-inv76.5%
Applied egg-rr76.5%
Taylor expanded in F around -inf 50.2%
Taylor expanded in x around inf 58.6%
mul-1-neg58.6%
associate-/l*58.6%
distribute-lft-neg-in58.6%
Simplified58.6%
distribute-lft-neg-out58.6%
clear-num58.6%
tan-quot58.7%
div-inv58.8%
distribute-neg-frac258.8%
Applied egg-rr58.8%
Final simplification48.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.4e-54) (/ (- -1.0 x) B) (if (<= F 1.8e-168) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.8e-168) {
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-54)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.8d-168) 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-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.8e-168) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-54: tmp = (-1.0 - x) / B elif F <= 1.8e-168: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.8e-168) 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-54) tmp = (-1.0 - x) / B; elseif (F <= 1.8e-168) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.8e-168], 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^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-168}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.4000000000000001e-54Initial program 62.0%
Taylor expanded in F around -inf 87.4%
Taylor expanded in B around 0 49.0%
mul-1-neg49.0%
distribute-neg-frac249.0%
Simplified49.0%
Taylor expanded in B around 0 49.0%
associate-*r/49.0%
neg-mul-149.0%
distribute-neg-in49.0%
metadata-eval49.0%
unsub-neg49.0%
Simplified49.0%
if -1.4000000000000001e-54 < F < 1.7999999999999999e-168Initial program 78.5%
Taylor expanded in F around -inf 49.3%
Taylor expanded in B around 0 31.2%
mul-1-neg31.2%
distribute-neg-frac231.2%
Simplified31.2%
Taylor expanded in x around inf 40.9%
mul-1-neg40.9%
distribute-neg-frac240.9%
Simplified40.9%
if 1.7999999999999999e-168 < F Initial program 64.1%
Taylor expanded in F around -inf 47.0%
distribute-rgt-neg-in47.0%
fma-define47.0%
distribute-neg-frac47.0%
metadata-eval47.0%
add-sqr-sqrt22.3%
sqrt-unprod55.5%
frac-times55.4%
metadata-eval55.4%
metadata-eval55.4%
frac-times55.5%
rgt-mult-inverse55.4%
associate-*l/55.4%
rgt-mult-inverse55.4%
associate-*l/55.4%
sqrt-unprod37.2%
add-sqr-sqrt75.1%
associate-*l/84.8%
rgt-mult-inverse84.9%
Applied egg-rr84.9%
Taylor expanded in B around 0 39.5%
neg-mul-139.5%
unsub-neg39.5%
Simplified39.5%
Final simplification42.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.6e-52) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-52) {
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.6d-52)) 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.6e-52) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e-52: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e-52) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.6e-52) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e-52], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.6 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.60000000000000005e-52Initial program 62.0%
Taylor expanded in F around -inf 87.4%
Taylor expanded in B around 0 49.0%
mul-1-neg49.0%
distribute-neg-frac249.0%
Simplified49.0%
Taylor expanded in B around 0 49.0%
associate-*r/49.0%
neg-mul-149.0%
distribute-neg-in49.0%
metadata-eval49.0%
unsub-neg49.0%
Simplified49.0%
if -1.60000000000000005e-52 < F Initial program 71.0%
Taylor expanded in F around -inf 48.1%
Taylor expanded in B around 0 28.3%
mul-1-neg28.3%
distribute-neg-frac228.3%
Simplified28.3%
Taylor expanded in x around inf 33.1%
mul-1-neg33.1%
distribute-neg-frac233.1%
Simplified33.1%
Final simplification37.4%
(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 68.6%
Taylor expanded in F around -inf 58.5%
Taylor expanded in B around 0 33.8%
mul-1-neg33.8%
distribute-neg-frac233.8%
Simplified33.8%
Taylor expanded in x around inf 31.6%
mul-1-neg31.6%
distribute-neg-frac231.6%
Simplified31.6%
Final simplification31.6%
(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 68.6%
Simplified73.7%
Taylor expanded in x around 0 86.9%
associate-*l/86.9%
*-lft-identity86.9%
+-commutative86.9%
unpow286.9%
fma-undefine86.9%
Simplified86.9%
Taylor expanded in B around 0 71.3%
+-commutative71.3%
unpow271.3%
fma-undefine71.3%
Simplified71.3%
Taylor expanded in F around inf 57.6%
Taylor expanded in x around 0 8.2%
Final simplification8.2%
herbie shell --seed 2024067
(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))))))