
(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 24 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 -100000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 200000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -100000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-100000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 200000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -100000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 200000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -100000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 200000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -100000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 200000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -100000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 200000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -100000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 200000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -100000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 200000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1e8Initial program 61.3%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -1e8 < F < 2e8Initial program 99.7%
Taylor expanded in x around 0 99.7%
if 2e8 < F Initial program 53.0%
Taylor expanded in F around inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
*-un-lft-identity99.8%
neg-mul-199.8%
fma-define99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
fma-undefine99.8%
associate-*r/99.8%
neg-mul-199.8%
+-commutative99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -108000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 150000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* x (/ -1.0 (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 <= -108000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 150000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / 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 <= (-108000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 150000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / 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 <= -108000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 150000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / 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 <= -108000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 150000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) + (x * (-1.0 / 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 <= -108000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 150000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / 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 <= -108000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 150000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / 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, -108000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 150000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -108000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 150000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.08e8Initial program 61.3%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -1.08e8 < F < 1.5e8Initial program 99.7%
if 1.5e8 < F Initial program 53.0%
Taylor expanded in F around inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
*-un-lft-identity99.8%
neg-mul-199.8%
fma-define99.8%
Applied egg-rr99.8%
*-lft-identity99.8%
fma-undefine99.8%
associate-*r/99.8%
neg-mul-199.8%
+-commutative99.8%
distribute-frac-neg99.8%
unsub-neg99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.75)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.6)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.75) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.6) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.75d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.6d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.75) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.6) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.75: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.6: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.75) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.6) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.75) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.6) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.75], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.6], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.75:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.6:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -1.75Initial program 61.8%
Taylor expanded in F around -inf 98.8%
+-commutative98.8%
unsub-neg98.8%
un-div-inv98.9%
Applied egg-rr98.9%
if -1.75 < F < 1.6000000000000001Initial program 99.7%
Simplified99.6%
Taylor expanded in F around 0 99.7%
if 1.6000000000000001 < F Initial program 55.0%
Taylor expanded in F around inf 98.5%
div-inv98.6%
Applied egg-rr98.6%
*-un-lft-identity98.6%
neg-mul-198.6%
fma-define98.6%
Applied egg-rr98.6%
*-lft-identity98.6%
fma-undefine98.6%
associate-*r/98.6%
neg-mul-198.6%
+-commutative98.6%
distribute-frac-neg98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.8%
Taylor expanded in F around -inf 98.8%
+-commutative98.8%
unsub-neg98.8%
un-div-inv98.9%
Applied egg-rr98.9%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.6%
associate-/l*99.6%
Simplified99.6%
div-inv42.0%
Applied egg-rr99.6%
if 1.3999999999999999 < F Initial program 55.0%
Taylor expanded in F around inf 98.5%
div-inv98.6%
Applied egg-rr98.6%
*-un-lft-identity98.6%
neg-mul-198.6%
fma-define98.6%
Applied egg-rr98.6%
*-lft-identity98.6%
fma-undefine98.6%
associate-*r/98.6%
neg-mul-198.6%
+-commutative98.6%
distribute-frac-neg98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* F (/ (sqrt 0.5) (sin B))) (/ x B))) (t_1 (/ x (tan B))))
(if (<= F -0.145)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -9e-156)
t_0
(if (<= F 2.2e-187)
(* x (/ (cos B) (- (sin B))))
(if (<= F 9.5e-39) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.145) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -9e-156) {
tmp = t_0;
} else if (F <= 2.2e-187) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 9.5e-39) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (f * (sqrt(0.5d0) / sin(b))) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.145d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-9d-156)) then
tmp = t_0
else if (f <= 2.2d-187) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 9.5d-39) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F * (Math.sqrt(0.5) / Math.sin(B))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.145) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -9e-156) {
tmp = t_0;
} else if (F <= 2.2e-187) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 9.5e-39) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * (math.sqrt(0.5) / math.sin(B))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.145: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -9e-156: tmp = t_0 elif F <= 2.2e-187: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 9.5e-39: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.145) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -9e-156) tmp = t_0; elseif (F <= 2.2e-187) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 9.5e-39) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F * (sqrt(0.5) / sin(B))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.145) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -9e-156) tmp = t_0; elseif (F <= 2.2e-187) tmp = x * (cos(B) / -sin(B)); elseif (F <= 9.5e-39) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.145], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -9e-156], t$95$0, If[LessEqual[F, 2.2e-187], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-39], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.145:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-187}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-39}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -0.14499999999999999Initial program 61.8%
Taylor expanded in F around -inf 98.8%
+-commutative98.8%
unsub-neg98.8%
un-div-inv98.9%
Applied egg-rr98.9%
if -0.14499999999999999 < F < -8.99999999999999971e-156 or 2.20000000000000008e-187 < F < 9.4999999999999999e-39Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.4%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in B around 0 83.8%
if -8.99999999999999971e-156 < F < 2.20000000000000008e-187Initial program 99.8%
Taylor expanded in F around -inf 48.6%
Taylor expanded in x around inf 89.0%
mul-1-neg89.0%
associate-/l*89.0%
distribute-lft-neg-in89.0%
Simplified89.0%
if 9.4999999999999999e-39 < F Initial program 56.2%
Taylor expanded in F around inf 97.3%
div-inv97.4%
Applied egg-rr97.4%
*-un-lft-identity97.4%
neg-mul-197.4%
fma-define97.4%
Applied egg-rr97.4%
*-lft-identity97.4%
fma-undefine97.4%
associate-*r/97.4%
neg-mul-197.4%
+-commutative97.4%
distribute-frac-neg97.4%
unsub-neg97.4%
Simplified97.4%
Final simplification93.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4e-36)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.008)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (* x (/ 1.0 (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.4e-36) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.008) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x * (1.0 / 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.4d-36)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.008d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x * (1.0d0 / 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.4e-36) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.008) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x * (1.0 / 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.4e-36: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.008: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x * (1.0 / 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.4e-36) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.008) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x * Float64(1.0 / 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.4e-36) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.008) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x * (1.0 / 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.4e-36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.008], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.008:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4000000000000001e-36Initial program 63.2%
Taylor expanded in F around -inf 96.5%
+-commutative96.5%
unsub-neg96.5%
un-div-inv96.6%
Applied egg-rr96.6%
if -1.4000000000000001e-36 < F < 0.0080000000000000002Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 88.3%
if 0.0080000000000000002 < F Initial program 55.0%
Taylor expanded in F around inf 98.5%
div-inv98.6%
Applied egg-rr98.6%
*-un-lft-identity98.6%
neg-mul-198.6%
fma-define98.6%
Applied egg-rr98.6%
*-lft-identity98.6%
fma-undefine98.6%
associate-*r/98.6%
neg-mul-198.6%
+-commutative98.6%
distribute-frac-neg98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification93.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.5e-40)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.25e-184)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 4.6e-39)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9.5e-40) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.25e-184) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 4.6e-39) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-9.5d-40)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.25d-184) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 4.6d-39) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -9.5e-40) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.25e-184) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 4.6e-39) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -9.5e-40: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.25e-184: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 4.6e-39: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9.5e-40) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.25e-184) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 4.6e-39) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -9.5e-40) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.25e-184) tmp = (x * cos(B)) / -sin(B); elseif (F <= 4.6e-39) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e-40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.25e-184], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 4.6e-39], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / 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 -9.5 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{-184}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-39}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.5000000000000006e-40Initial program 63.2%
Taylor expanded in F around -inf 96.5%
+-commutative96.5%
unsub-neg96.5%
un-div-inv96.6%
Applied egg-rr96.6%
if -9.5000000000000006e-40 < F < 2.2500000000000001e-184Initial program 99.7%
Taylor expanded in F around inf 45.0%
Taylor expanded in x around inf 79.9%
mul-1-neg79.9%
Simplified79.9%
if 2.2500000000000001e-184 < F < 4.60000000000000016e-39Initial program 99.5%
Taylor expanded in B around 0 85.1%
Taylor expanded in B around 0 74.2%
if 4.60000000000000016e-39 < F Initial program 56.2%
Taylor expanded in F around inf 97.3%
div-inv97.4%
Applied egg-rr97.4%
*-un-lft-identity97.4%
neg-mul-197.4%
fma-define97.4%
Applied egg-rr97.4%
*-lft-identity97.4%
fma-undefine97.4%
associate-*r/97.4%
neg-mul-197.4%
+-commutative97.4%
distribute-frac-neg97.4%
unsub-neg97.4%
Simplified97.4%
Final simplification89.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e+224)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -1.4e-36)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.85e-184)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 1700.0)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e+224) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -1.4e-36) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.85e-184) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 1700.0) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.8d+224)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-1.4d-36)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.85d-184) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 1700.0d0) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e+224) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -1.4e-36) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.85e-184) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 1700.0) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e+224: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -1.4e-36: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.85e-184: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 1700.0: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e+224) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -1.4e-36) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.85e-184) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 1700.0) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.8e+224) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -1.4e-36) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.85e-184) tmp = (x * cos(B)) / -sin(B); elseif (F <= 1700.0) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e+224], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.4e-36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-184], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1700.0], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{+224}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-184}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1700:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.8e224Initial program 44.0%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 77.2%
if -1.8e224 < F < -1.4000000000000001e-36Initial program 75.3%
Taylor expanded in B around 0 66.4%
Taylor expanded in F around -inf 85.6%
distribute-lft-in85.6%
mul-1-neg85.6%
unsub-neg85.6%
associate-*r/85.6%
metadata-eval85.6%
Simplified85.6%
if -1.4000000000000001e-36 < F < 1.8499999999999999e-184Initial program 99.7%
Taylor expanded in F around inf 45.0%
Taylor expanded in x around inf 79.9%
mul-1-neg79.9%
Simplified79.9%
if 1.8499999999999999e-184 < F < 1700Initial program 99.5%
Taylor expanded in B around 0 82.5%
Taylor expanded in B around 0 69.5%
if 1700 < F Initial program 55.0%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 75.9%
Final simplification78.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4e-36)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.28)
(- (/ (* F (sqrt 0.5)) B) (* x (/ 1.0 (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.4e-36) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.28) {
tmp = ((F * sqrt(0.5)) / B) - (x * (1.0 / 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.4d-36)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.28d0) then
tmp = ((f * sqrt(0.5d0)) / b) - (x * (1.0d0 / 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.4e-36) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.28) {
tmp = ((F * Math.sqrt(0.5)) / B) - (x * (1.0 / 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.4e-36: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.28: tmp = ((F * math.sqrt(0.5)) / B) - (x * (1.0 / 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.4e-36) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.28) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - Float64(x * Float64(1.0 / 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.4e-36) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.28) tmp = ((F * sqrt(0.5)) / B) - (x * (1.0 / 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.4e-36], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.28], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.28:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4000000000000001e-36Initial program 63.2%
Taylor expanded in F around -inf 96.5%
+-commutative96.5%
unsub-neg96.5%
un-div-inv96.6%
Applied egg-rr96.6%
if -1.4000000000000001e-36 < F < 0.28000000000000003Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 88.3%
if 0.28000000000000003 < F Initial program 55.0%
Taylor expanded in F around inf 98.5%
div-inv98.6%
Applied egg-rr98.6%
*-un-lft-identity98.6%
neg-mul-198.6%
fma-define98.6%
Applied egg-rr98.6%
*-lft-identity98.6%
fma-undefine98.6%
associate-*r/98.6%
neg-mul-198.6%
+-commutative98.6%
distribute-frac-neg98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification93.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.1e-42)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 2.7e-184)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 320.0)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-42) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 2.7e-184) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 320.0) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.1d-42)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 2.7d-184) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 320.0d0) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-42) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 2.7e-184) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 320.0) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e-42: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 2.7e-184: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 320.0: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e-42) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 2.7e-184) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 320.0) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e-42) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 2.7e-184) tmp = (x * cos(B)) / -sin(B); elseif (F <= 320.0) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e-42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-184], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 320.0], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-184}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 320:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.10000000000000003e-42Initial program 63.2%
Taylor expanded in F around -inf 96.5%
+-commutative96.5%
unsub-neg96.5%
un-div-inv96.6%
Applied egg-rr96.6%
if -1.10000000000000003e-42 < F < 2.7000000000000001e-184Initial program 99.7%
Taylor expanded in F around inf 45.0%
Taylor expanded in x around inf 79.9%
mul-1-neg79.9%
Simplified79.9%
if 2.7000000000000001e-184 < F < 320Initial program 99.5%
Taylor expanded in B around 0 82.5%
Taylor expanded in B around 0 69.5%
if 320 < F Initial program 55.0%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 75.9%
Final simplification82.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B)))
(t_1 (* x (/ 1.0 (tan B)))))
(if (<= F -2.5e+224)
(- (/ -1.0 B) t_1)
(if (<= F -1.65e-46)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.2e-190)
t_0
(if (<= F -2.4e-300)
(- (* (/ F B) (/ -1.0 F)) t_1)
(if (<= F 760.0) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (1.0 / tan(B));
double tmp;
if (F <= -2.5e+224) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.65e-46) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.2e-190) {
tmp = t_0;
} else if (F <= -2.4e-300) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 760.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = x * (1.0d0 / tan(b))
if (f <= (-2.5d+224)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-1.65d-46)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.2d-190)) then
tmp = t_0
else if (f <= (-2.4d-300)) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_1
else if (f <= 760.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (1.0 / Math.tan(B));
double tmp;
if (F <= -2.5e+224) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.65e-46) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.2e-190) {
tmp = t_0;
} else if (F <= -2.4e-300) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 760.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) t_1 = x * (1.0 / math.tan(B)) tmp = 0 if F <= -2.5e+224: tmp = (-1.0 / B) - t_1 elif F <= -1.65e-46: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.2e-190: tmp = t_0 elif F <= -2.4e-300: tmp = ((F / B) * (-1.0 / F)) - t_1 elif F <= 760.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x * Float64(1.0 / tan(B))) tmp = 0.0 if (F <= -2.5e+224) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -1.65e-46) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.2e-190) tmp = t_0; elseif (F <= -2.4e-300) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_1); elseif (F <= 760.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); t_1 = x * (1.0 / tan(B)); tmp = 0.0; if (F <= -2.5e+224) tmp = (-1.0 / B) - t_1; elseif (F <= -1.65e-46) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.2e-190) tmp = t_0; elseif (F <= -2.4e-300) tmp = ((F / B) * (-1.0 / F)) - t_1; elseif (F <= 760.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e+224], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.65e-46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.2e-190], t$95$0, If[LessEqual[F, -2.4e-300], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 760.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{+224}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-190}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-300}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t\_1\\
\mathbf{elif}\;F \leq 760:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.49999999999999982e224Initial program 44.0%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 77.2%
if -2.49999999999999982e224 < F < -1.65000000000000007e-46Initial program 75.8%
Taylor expanded in B around 0 65.0%
Taylor expanded in F around -inf 84.1%
distribute-lft-in84.1%
mul-1-neg84.1%
unsub-neg84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
if -1.65000000000000007e-46 < F < -2.20000000000000004e-190 or -2.39999999999999999e-300 < F < 760Initial program 99.6%
Taylor expanded in B around 0 73.5%
Taylor expanded in B around 0 59.6%
if -2.20000000000000004e-190 < F < -2.39999999999999999e-300Initial program 99.8%
Taylor expanded in F around -inf 57.4%
Taylor expanded in B around 0 84.2%
if 760 < F Initial program 55.0%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 75.9%
Final simplification73.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B)) (t_1 (* x (/ 1.0 (tan B)))))
(if (<= F -4.6e+224)
(- (/ -1.0 B) t_1)
(if (<= F -1.65e-46)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -8.8e-193)
t_0
(if (<= F -6.6e-299)
(- (* (/ F B) (/ -1.0 F)) t_1)
(if (<= F 0.62) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = x * (1.0 / tan(B));
double tmp;
if (F <= -4.6e+224) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.65e-46) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -8.8e-193) {
tmp = t_0;
} else if (F <= -6.6e-299) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 0.62) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = x * (1.0d0 / tan(b))
if (f <= (-4.6d+224)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-1.65d-46)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-8.8d-193)) then
tmp = t_0
else if (f <= (-6.6d-299)) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_1
else if (f <= 0.62d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) - x) / B;
double t_1 = x * (1.0 / Math.tan(B));
double tmp;
if (F <= -4.6e+224) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.65e-46) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -8.8e-193) {
tmp = t_0;
} else if (F <= -6.6e-299) {
tmp = ((F / B) * (-1.0 / F)) - t_1;
} else if (F <= 0.62) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = x * (1.0 / math.tan(B)) tmp = 0 if F <= -4.6e+224: tmp = (-1.0 / B) - t_1 elif F <= -1.65e-46: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -8.8e-193: tmp = t_0 elif F <= -6.6e-299: tmp = ((F / B) * (-1.0 / F)) - t_1 elif F <= 0.62: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(x * Float64(1.0 / tan(B))) tmp = 0.0 if (F <= -4.6e+224) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -1.65e-46) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -8.8e-193) tmp = t_0; elseif (F <= -6.6e-299) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_1); elseif (F <= 0.62) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = x * (1.0 / tan(B)); tmp = 0.0; if (F <= -4.6e+224) tmp = (-1.0 / B) - t_1; elseif (F <= -1.65e-46) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -8.8e-193) tmp = t_0; elseif (F <= -6.6e-299) tmp = ((F / B) * (-1.0 / F)) - t_1; elseif (F <= 0.62) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.6e+224], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.65e-46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.8e-193], t$95$0, If[LessEqual[F, -6.6e-299], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.62], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -4.6 \cdot 10^{+224}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8.8 \cdot 10^{-193}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.6 \cdot 10^{-299}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t\_1\\
\mathbf{elif}\;F \leq 0.62:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.60000000000000039e224Initial program 44.0%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 77.2%
if -4.60000000000000039e224 < F < -1.65000000000000007e-46Initial program 75.8%
Taylor expanded in B around 0 65.0%
Taylor expanded in F around -inf 84.1%
distribute-lft-in84.1%
mul-1-neg84.1%
unsub-neg84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
if -1.65000000000000007e-46 < F < -8.79999999999999906e-193 or -6.6000000000000004e-299 < F < 0.619999999999999996Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 59.4%
if -8.79999999999999906e-193 < F < -6.6000000000000004e-299Initial program 99.8%
Taylor expanded in F around -inf 57.4%
Taylor expanded in B around 0 84.2%
if 0.619999999999999996 < F Initial program 55.0%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 75.9%
Final simplification73.3%
(FPCore (F B x)
:precision binary64
(if (<= F -3.65e+224)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -1.65e-46)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.07)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.65e+224) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -1.65e-46) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.07) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.65d+224)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-1.65d-46)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.07d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.65e+224) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -1.65e-46) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.07) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.65e+224: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -1.65e-46: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.07: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.65e+224) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -1.65e-46) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.07) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.65e+224) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -1.65e-46) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.07) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.65e+224], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.65e-46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.07], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.65 \cdot 10^{+224}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -1.65 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.07:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.65000000000000013e224Initial program 44.0%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 77.2%
if -3.65000000000000013e224 < F < -1.65000000000000007e-46Initial program 75.8%
Taylor expanded in B around 0 65.0%
Taylor expanded in F around -inf 84.1%
distribute-lft-in84.1%
mul-1-neg84.1%
unsub-neg84.1%
associate-*r/84.1%
metadata-eval84.1%
Simplified84.1%
if -1.65000000000000007e-46 < F < 0.070000000000000007Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 61.0%
if 0.070000000000000007 < F Initial program 55.0%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 75.9%
Final simplification71.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.65e-46) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 0.235) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-46) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.235) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.65d-46)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.235d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-46) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.235) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.65e-46: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.235: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.65e-46) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.235) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.65e-46) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.235) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.65e-46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.235], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.235:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.65000000000000007e-46Initial program 63.7%
Taylor expanded in B around 0 42.4%
Taylor expanded in F around -inf 75.5%
distribute-lft-in75.5%
mul-1-neg75.5%
unsub-neg75.5%
associate-*r/75.5%
metadata-eval75.5%
Simplified75.5%
if -1.65000000000000007e-46 < F < 0.23499999999999999Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in B around 0 61.0%
if 0.23499999999999999 < F Initial program 55.0%
Taylor expanded in B around 0 32.4%
Taylor expanded in F around inf 75.9%
(FPCore (F B x) :precision binary64 (if (<= F -4e-76) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 4e-59) (/ x (- B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-76) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4e-59) {
tmp = x / -B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4d-76)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4d-59) then
tmp = x / -b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-76) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4e-59) {
tmp = x / -B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-76: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4e-59: tmp = x / -B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-76) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4e-59) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e-76) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4e-59) tmp = x / -B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-76], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-59], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-76}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.99999999999999971e-76Initial program 67.0%
Taylor expanded in B around 0 45.4%
Taylor expanded in F around -inf 70.1%
distribute-lft-in70.1%
mul-1-neg70.1%
unsub-neg70.1%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
if -3.99999999999999971e-76 < F < 4.0000000000000001e-59Initial program 99.7%
Taylor expanded in F around -inf 42.0%
Taylor expanded in B around 0 28.8%
mul-1-neg28.8%
distribute-neg-frac228.8%
Simplified28.8%
Taylor expanded in x around inf 47.8%
associate-*r/47.8%
neg-mul-147.8%
Simplified47.8%
if 4.0000000000000001e-59 < F Initial program 59.4%
Taylor expanded in B around 0 37.9%
Taylor expanded in F around inf 71.3%
Final simplification62.7%
(FPCore (F B x) :precision binary64 (if (<= F -5.2e-76) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 2300.0) (/ x (- B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2e-76) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2300.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.2d-76)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2300.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.2e-76) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2300.0) {
tmp = x / -B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2e-76: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2300.0: tmp = x / -B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2e-76) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2300.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.2e-76) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2300.0) tmp = x / -B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2e-76], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2300.0], N[(x / (-B)), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2300:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.1999999999999999e-76Initial program 67.0%
Taylor expanded in B around 0 45.4%
Taylor expanded in F around -inf 70.1%
distribute-lft-in70.1%
mul-1-neg70.1%
unsub-neg70.1%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
if -5.1999999999999999e-76 < F < 2300Initial program 99.7%
Taylor expanded in F around -inf 41.9%
Taylor expanded in B around 0 29.1%
mul-1-neg29.1%
distribute-neg-frac229.1%
Simplified29.1%
Taylor expanded in x around inf 46.1%
associate-*r/46.1%
neg-mul-146.1%
Simplified46.1%
if 2300 < F Initial program 53.7%
Taylor expanded in F around inf 99.1%
Taylor expanded in x around 0 60.9%
Final simplification58.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.06e-60)
(+
(+
(* B -0.16666666666666666)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B))))
(/ -1.0 B))
(if (<= F 1860.0) (/ x (- B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-60) {
tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B);
} else if (F <= 1860.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 <= (-1.06d-60)) then
tmp = ((b * (-0.16666666666666666d0)) + (x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b)))) + ((-1.0d0) / b)
else if (f <= 1860.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 <= -1.06e-60) {
tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B);
} else if (F <= 1860.0) {
tmp = x / -B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.06e-60: tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B) elif F <= 1860.0: tmp = x / -B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.06e-60) tmp = Float64(Float64(Float64(B * -0.16666666666666666) + Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B)))) + Float64(-1.0 / B)); elseif (F <= 1860.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 <= -1.06e-60) tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B); elseif (F <= 1860.0) tmp = x / -B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.06e-60], N[(N[(N[(B * -0.16666666666666666), $MachinePrecision] + N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1860.0], N[(x / (-B)), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.06 \cdot 10^{-60}:\\
\;\;\;\;\left(B \cdot -0.16666666666666666 + x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\right) + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 1860:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.06e-60Initial program 65.8%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 42.4%
Taylor expanded in x around 0 42.5%
if -1.06e-60 < F < 1860Initial program 99.7%
Taylor expanded in F around -inf 41.7%
Taylor expanded in B around 0 29.3%
mul-1-neg29.3%
distribute-neg-frac229.3%
Simplified29.3%
Taylor expanded in x around inf 45.8%
associate-*r/45.8%
neg-mul-145.8%
Simplified45.8%
if 1860 < F Initial program 53.7%
Taylor expanded in F around inf 99.1%
Taylor expanded in x around 0 60.9%
Final simplification48.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.26e-61)
(+
(+
(* B -0.16666666666666666)
(* x (+ (* B 0.3333333333333333) (/ -1.0 B))))
(/ -1.0 B))
(if (<= F 4.6e-57) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.26e-61) {
tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B);
} else if (F <= 4.6e-57) {
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.26d-61)) then
tmp = ((b * (-0.16666666666666666d0)) + (x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b)))) + ((-1.0d0) / b)
else if (f <= 4.6d-57) 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.26e-61) {
tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B);
} else if (F <= 4.6e-57) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.26e-61: tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B) elif F <= 4.6e-57: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.26e-61) tmp = Float64(Float64(Float64(B * -0.16666666666666666) + Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B)))) + Float64(-1.0 / B)); elseif (F <= 4.6e-57) 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.26e-61) tmp = ((B * -0.16666666666666666) + (x * ((B * 0.3333333333333333) + (-1.0 / B)))) + (-1.0 / B); elseif (F <= 4.6e-57) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.26e-61], N[(N[(N[(B * -0.16666666666666666), $MachinePrecision] + N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.6e-57], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.26 \cdot 10^{-61}:\\
\;\;\;\;\left(B \cdot -0.16666666666666666 + x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right)\right) + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-57}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.2599999999999999e-61Initial program 65.8%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 42.4%
Taylor expanded in x around 0 42.5%
if -1.2599999999999999e-61 < F < 4.6e-57Initial program 99.7%
Taylor expanded in F around -inf 41.4%
Taylor expanded in B around 0 28.8%
mul-1-neg28.8%
distribute-neg-frac228.8%
Simplified28.8%
Taylor expanded in x around inf 46.9%
associate-*r/46.9%
neg-mul-146.9%
Simplified46.9%
if 4.6e-57 < F Initial program 58.9%
Taylor expanded in F around inf 93.9%
Taylor expanded in B around 0 47.4%
Final simplification45.6%
(FPCore (F B x) :precision binary64 (if (<= F -3.8e-76) (+ (* x (+ (* B 0.3333333333333333) (/ -1.0 B))) (/ -1.0 B)) (if (<= F 2.7e-56) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.8e-76) {
tmp = (x * ((B * 0.3333333333333333) + (-1.0 / B))) + (-1.0 / B);
} else if (F <= 2.7e-56) {
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 <= (-3.8d-76)) then
tmp = (x * ((b * 0.3333333333333333d0) + ((-1.0d0) / b))) + ((-1.0d0) / b)
else if (f <= 2.7d-56) 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 <= -3.8e-76) {
tmp = (x * ((B * 0.3333333333333333) + (-1.0 / B))) + (-1.0 / B);
} else if (F <= 2.7e-56) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.8e-76: tmp = (x * ((B * 0.3333333333333333) + (-1.0 / B))) + (-1.0 / B) elif F <= 2.7e-56: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.8e-76) tmp = Float64(Float64(x * Float64(Float64(B * 0.3333333333333333) + Float64(-1.0 / B))) + Float64(-1.0 / B)); elseif (F <= 2.7e-56) 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 <= -3.8e-76) tmp = (x * ((B * 0.3333333333333333) + (-1.0 / B))) + (-1.0 / B); elseif (F <= 2.7e-56) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.8e-76], N[(N[(x * N[(N[(B * 0.3333333333333333), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-56], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.8 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333 + \frac{-1}{B}\right) + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-56}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.8000000000000002e-76Initial program 67.0%
Taylor expanded in F around -inf 90.5%
Taylor expanded in B around 0 42.2%
Taylor expanded in x around inf 41.8%
*-commutative41.8%
associate-*r*41.8%
Simplified41.8%
Taylor expanded in x around 0 42.2%
*-commutative42.2%
Simplified42.2%
if -3.8000000000000002e-76 < F < 2.69999999999999995e-56Initial program 99.7%
Taylor expanded in F around -inf 41.5%
Taylor expanded in B around 0 28.6%
mul-1-neg28.6%
distribute-neg-frac228.6%
Simplified28.6%
Taylor expanded in x around inf 47.3%
associate-*r/47.3%
neg-mul-147.3%
Simplified47.3%
if 2.69999999999999995e-56 < F Initial program 58.9%
Taylor expanded in F around inf 93.9%
Taylor expanded in B around 0 47.4%
Final simplification45.6%
(FPCore (F B x) :precision binary64 (if (<= F -1e-63) (/ (- -1.0 x) B) (if (<= F 2.1e-58) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e-63) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-58) {
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 <= (-1d-63)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.1d-58) 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 <= -1e-63) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-58) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e-63: tmp = (-1.0 - x) / B elif F <= 2.1e-58: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e-63) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.1e-58) 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 <= -1e-63) tmp = (-1.0 - x) / B; elseif (F <= 2.1e-58) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e-63], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-58], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-63}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-58}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.00000000000000007e-63Initial program 66.2%
Taylor expanded in F around -inf 91.3%
Taylor expanded in B around 0 41.6%
mul-1-neg41.6%
distribute-neg-frac241.6%
Simplified41.6%
Taylor expanded in B around 0 41.6%
neg-mul-141.6%
distribute-neg-frac41.6%
distribute-neg-in41.6%
metadata-eval41.6%
unsub-neg41.6%
Simplified41.6%
if -1.00000000000000007e-63 < F < 2.09999999999999988e-58Initial program 99.7%
Taylor expanded in F around -inf 41.8%
Taylor expanded in B around 0 29.1%
mul-1-neg29.1%
distribute-neg-frac229.1%
Simplified29.1%
Taylor expanded in x around inf 47.4%
associate-*r/47.4%
neg-mul-147.4%
Simplified47.4%
if 2.09999999999999988e-58 < F Initial program 58.9%
Taylor expanded in F around inf 93.9%
Taylor expanded in B around 0 47.4%
Final simplification45.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.48e-67) (/ (- -1.0 x) B) (if (<= F 3300.0) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.48e-67) {
tmp = (-1.0 - x) / B;
} else if (F <= 3300.0) {
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.48d-67)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3300.0d0) 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.48e-67) {
tmp = (-1.0 - x) / B;
} else if (F <= 3300.0) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.48e-67: tmp = (-1.0 - x) / B elif F <= 3300.0: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.48e-67) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3300.0) 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.48e-67) tmp = (-1.0 - x) / B; elseif (F <= 3300.0) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.48e-67], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3300.0], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.48 \cdot 10^{-67}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3300:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.48000000000000001e-67Initial program 66.2%
Taylor expanded in F around -inf 91.3%
Taylor expanded in B around 0 41.6%
mul-1-neg41.6%
distribute-neg-frac241.6%
Simplified41.6%
Taylor expanded in B around 0 41.6%
neg-mul-141.6%
distribute-neg-frac41.6%
distribute-neg-in41.6%
metadata-eval41.6%
unsub-neg41.6%
Simplified41.6%
if -1.48000000000000001e-67 < F < 3300Initial program 99.7%
Taylor expanded in F around -inf 42.1%
Taylor expanded in B around 0 29.5%
mul-1-neg29.5%
distribute-neg-frac229.5%
Simplified29.5%
Taylor expanded in x around inf 46.2%
associate-*r/46.2%
neg-mul-146.2%
Simplified46.2%
if 3300 < F Initial program 53.7%
Taylor expanded in F around -inf 38.7%
Taylor expanded in B around 0 16.5%
mul-1-neg16.5%
distribute-neg-frac216.5%
Simplified16.5%
add-sqr-sqrt15.3%
sqrt-unprod25.5%
sqr-neg25.5%
sqrt-prod14.0%
add-sqr-sqrt33.4%
*-un-lft-identity33.4%
Applied egg-rr33.4%
*-lft-identity33.4%
Simplified33.4%
Final simplification41.2%
(FPCore (F B x) :precision binary64 (if (or (<= x -4.8e-241) (not (<= x 7.5e-19))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -4.8e-241) || !(x <= 7.5e-19)) {
tmp = x / -B;
} else {
tmp = -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 <= (-4.8d-241)) .or. (.not. (x <= 7.5d-19))) then
tmp = x / -b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -4.8e-241) || !(x <= 7.5e-19)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -4.8e-241) or not (x <= 7.5e-19): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -4.8e-241) || !(x <= 7.5e-19)) tmp = Float64(x / Float64(-B)); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -4.8e-241) || ~((x <= 7.5e-19))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -4.8e-241], N[Not[LessEqual[x, 7.5e-19]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{-241} \lor \neg \left(x \leq 7.5 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -4.8e-241 or 7.49999999999999957e-19 < x Initial program 82.5%
Taylor expanded in F around -inf 67.1%
Taylor expanded in B around 0 36.6%
mul-1-neg36.6%
distribute-neg-frac236.6%
Simplified36.6%
Taylor expanded in x around inf 42.8%
associate-*r/42.8%
neg-mul-142.8%
Simplified42.8%
if -4.8e-241 < x < 7.49999999999999957e-19Initial program 62.8%
Taylor expanded in F around -inf 37.8%
Taylor expanded in B around 0 16.5%
mul-1-neg16.5%
distribute-neg-frac216.5%
Simplified16.5%
Taylor expanded in x around 0 16.5%
Final simplification34.2%
(FPCore (F B x) :precision binary64 (if (<= F 7600.0) (/ x (- B)) (/ (+ x 1.0) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 7600.0) {
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 <= 7600.0d0) 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 <= 7600.0) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 7600.0: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 7600.0) 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 <= 7600.0) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 7600.0], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 7600:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < 7600Initial program 84.4%
Taylor expanded in F around -inf 64.6%
Taylor expanded in B around 0 35.1%
mul-1-neg35.1%
distribute-neg-frac235.1%
Simplified35.1%
Taylor expanded in x around inf 36.0%
associate-*r/36.0%
neg-mul-136.0%
Simplified36.0%
if 7600 < F Initial program 53.7%
Taylor expanded in F around -inf 38.7%
Taylor expanded in B around 0 16.5%
mul-1-neg16.5%
distribute-neg-frac216.5%
Simplified16.5%
add-sqr-sqrt15.3%
sqrt-unprod25.5%
sqr-neg25.5%
sqrt-prod14.0%
add-sqr-sqrt33.4%
*-un-lft-identity33.4%
Applied egg-rr33.4%
*-lft-identity33.4%
Simplified33.4%
Final simplification35.3%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 76.0%
Taylor expanded in F around -inf 57.5%
Taylor expanded in B around 0 30.0%
mul-1-neg30.0%
distribute-neg-frac230.0%
Simplified30.0%
Taylor expanded in x around 0 9.2%
herbie shell --seed 2024092
(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))))))