
(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 25 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 -85000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 180000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -85000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 180000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-85000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 180000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -85000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 180000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -85000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 180000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -85000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 180000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -85000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 180000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -85000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 180000000.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] - 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 -85000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 180000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -8.5e10Initial program 58.9%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -8.5e10 < F < 1.8e8Initial program 99.6%
div-inv34.7%
Applied egg-rr99.7%
if 1.8e8 < F Initial program 54.2%
div-inv48.2%
Applied egg-rr54.3%
Taylor expanded in F around inf 99.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.8)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.85)
(- (* 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.8) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.85) {
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.8d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.85d0) 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.8) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.85) {
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.8: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.85: 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.8) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.85) 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.8) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.85) 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.8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.85], 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.8:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.85:\\
\;\;\;\;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.80000000000000004Initial program 61.1%
Taylor expanded in F around -inf 98.4%
div-inv98.4%
Applied egg-rr98.4%
if -1.80000000000000004 < F < 1.8500000000000001Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.4%
if 1.8500000000000001 < F Initial program 57.0%
div-inv46.8%
Applied egg-rr57.0%
Taylor expanded in F around inf 97.8%
Final simplification98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -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.45) {
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.45d0)) 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.45) {
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.45: 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.45) 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.45) 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.45], 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.45:\\
\;\;\;\;\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.44999999999999996Initial program 61.1%
Taylor expanded in F around -inf 98.4%
div-inv98.4%
Applied egg-rr98.4%
if -1.44999999999999996 < F < 1.3999999999999999Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 99.2%
if 1.3999999999999999 < F Initial program 57.0%
div-inv46.8%
Applied egg-rr57.0%
Taylor expanded in F around inf 97.8%
Final simplification98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -3900000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.4e-175)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 900.0)
(+ (* x (/ -1.0 (tan B))) (* t_0 (/ F B)))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -3900000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.4e-175) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 900.0) {
tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B));
} 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 * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-3900000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.4d-175)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 900.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (t_0 * (f / b))
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 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3900000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.4e-175) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 900.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (t_0 * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -3900000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.4e-175: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 900.0: tmp = (x * (-1.0 / math.tan(B))) + (t_0 * (F / B)) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3900000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.4e-175) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 900.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(t_0 * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -3900000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.4e-175) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 900.0) tmp = (x * (-1.0 / tan(B))) + (t_0 * (F / B)); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3900000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.4e-175], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 900.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3900000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-175}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 900:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t\_0 \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3.9e6Initial program 60.0%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
Applied egg-rr99.7%
if -3.9e6 < F < -2.4e-175Initial program 99.5%
Taylor expanded in B around 0 92.9%
if -2.4e-175 < F < 900Initial program 99.6%
Taylor expanded in B around 0 90.1%
if 900 < F Initial program 55.7%
div-inv46.7%
Applied egg-rr55.7%
Taylor expanded in F around inf 98.6%
Final simplification95.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.1e-175)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.175)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.1e-175) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.175) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.1d-175)) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.175d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.1e-175) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.175) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.1e-175: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.175: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.1e-175) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.175) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.1e-175) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.175) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.1e-175], 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 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.175], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-175}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.175:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7e6Initial program 60.0%
Taylor expanded in F around -inf 99.6%
div-inv99.7%
Applied egg-rr99.7%
if -7e6 < F < -3.09999999999999999e-175Initial program 99.5%
Taylor expanded in B around 0 92.9%
if -3.09999999999999999e-175 < F < 0.17499999999999999Initial program 99.6%
Simplified99.7%
Taylor expanded in B around 0 90.0%
Taylor expanded in F around 0 89.7%
if 0.17499999999999999 < F Initial program 57.0%
div-inv46.8%
Applied egg-rr57.0%
Taylor expanded in F around inf 97.8%
Final simplification95.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (/ (sin B) (sqrt 0.5)))) (t_1 (/ x (tan B))))
(if (<= F -2.16e-7)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.1e-175)
t_0
(if (<= F 8.8e-75)
(- (/ (/ F B) F) t_1)
(if (<= F 8e-37)
t_0
(if (<= F 1.08e+39)
(- (/ 1.0 B) t_1)
(if (<= F 1.45e+108)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(- (/ F (* F B)) t_1)))))))))
double code(double F, double B, double x) {
double t_0 = F / (sin(B) / sqrt(0.5));
double t_1 = x / tan(B);
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.1e-175) {
tmp = t_0;
} else if (F <= 8.8e-75) {
tmp = ((F / B) / F) - t_1;
} else if (F <= 8e-37) {
tmp = t_0;
} else if (F <= 1.08e+39) {
tmp = (1.0 / B) - t_1;
} else if (F <= 1.45e+108) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (F / (F * 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 / (sin(b) / sqrt(0.5d0))
t_1 = x / tan(b)
if (f <= (-2.16d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.1d-175)) then
tmp = t_0
else if (f <= 8.8d-75) then
tmp = ((f / b) / f) - t_1
else if (f <= 8d-37) then
tmp = t_0
else if (f <= 1.08d+39) then
tmp = (1.0d0 / b) - t_1
else if (f <= 1.45d+108) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (f / (f * b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / (Math.sin(B) / Math.sqrt(0.5));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.1e-175) {
tmp = t_0;
} else if (F <= 8.8e-75) {
tmp = ((F / B) / F) - t_1;
} else if (F <= 8e-37) {
tmp = t_0;
} else if (F <= 1.08e+39) {
tmp = (1.0 / B) - t_1;
} else if (F <= 1.45e+108) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (F / (F * B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F / (math.sin(B) / math.sqrt(0.5)) t_1 = x / math.tan(B) tmp = 0 if F <= -2.16e-7: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.1e-175: tmp = t_0 elif F <= 8.8e-75: tmp = ((F / B) / F) - t_1 elif F <= 8e-37: tmp = t_0 elif F <= 1.08e+39: tmp = (1.0 / B) - t_1 elif F <= 1.45e+108: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (F / (F * B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F / Float64(sin(B) / sqrt(0.5))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.16e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.1e-175) tmp = t_0; elseif (F <= 8.8e-75) tmp = Float64(Float64(Float64(F / B) / F) - t_1); elseif (F <= 8e-37) tmp = t_0; elseif (F <= 1.08e+39) tmp = Float64(Float64(1.0 / B) - t_1); elseif (F <= 1.45e+108) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(F / Float64(F * B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / (sin(B) / sqrt(0.5)); t_1 = x / tan(B); tmp = 0.0; if (F <= -2.16e-7) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.1e-175) tmp = t_0; elseif (F <= 8.8e-75) tmp = ((F / B) / F) - t_1; elseif (F <= 8e-37) tmp = t_0; elseif (F <= 1.08e+39) tmp = (1.0 / B) - t_1; elseif (F <= 1.45e+108) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (F / (F * B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.16e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.1e-175], t$95$0, If[LessEqual[F, 8.8e-75], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 8e-37], t$95$0, If[LessEqual[F, 1.08e+39], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.45e+108], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.16 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-175}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-75}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - t\_1\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-37}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{+39}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{+108}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_1\\
\end{array}
\end{array}
if F < -2.16000000000000002e-7Initial program 61.6%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 75.6%
if -2.16000000000000002e-7 < F < -3.09999999999999999e-175 or 8.80000000000000022e-75 < F < 8.00000000000000053e-37Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 99.3%
Taylor expanded in F around inf 68.4%
associate-*l/68.4%
associate-/r/68.3%
Simplified68.3%
if -3.09999999999999999e-175 < F < 8.80000000000000022e-75Initial program 99.7%
Simplified99.8%
Taylor expanded in B around 0 94.1%
Taylor expanded in F around inf 47.6%
*-commutative47.6%
Simplified47.6%
un-div-inv47.6%
*-commutative47.6%
associate-/r*61.1%
Applied egg-rr61.1%
if 8.00000000000000053e-37 < F < 1.07999999999999998e39Initial program 85.5%
Simplified99.8%
Taylor expanded in B around 0 79.1%
Taylor expanded in F around inf 60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in F around 0 60.3%
if 1.07999999999999998e39 < F < 1.45000000000000004e108Initial program 99.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 89.8%
if 1.45000000000000004e108 < F Initial program 38.6%
Simplified59.6%
Taylor expanded in B around 0 57.4%
Taylor expanded in F around inf 68.5%
*-commutative68.5%
Simplified68.5%
un-div-inv68.6%
Applied egg-rr68.6%
Final simplification69.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.16e-7)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.8e-175)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 5.3e-71)
(- (/ (/ F B) F) t_0)
(if (<= F 2.75e-36)
(/ F (/ (sin B) (sqrt 0.5)))
(if (<= F 1.08e+39)
(- (/ 1.0 B) t_0)
(if (<= F 5.7e+107)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(- (/ F (* F B)) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.8e-175) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 5.3e-71) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 2.75e-36) {
tmp = F / (sin(B) / sqrt(0.5));
} else if (F <= 1.08e+39) {
tmp = (1.0 / B) - t_0;
} else if (F <= 5.7e+107) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.16d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.8d-175)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 5.3d-71) then
tmp = ((f / b) / f) - t_0
else if (f <= 2.75d-36) then
tmp = f / (sin(b) / sqrt(0.5d0))
else if (f <= 1.08d+39) then
tmp = (1.0d0 / b) - t_0
else if (f <= 5.7d+107) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (f / (f * b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.8e-175) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 5.3e-71) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 2.75e-36) {
tmp = F / (Math.sin(B) / Math.sqrt(0.5));
} else if (F <= 1.08e+39) {
tmp = (1.0 / B) - t_0;
} else if (F <= 5.7e+107) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.16e-7: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.8e-175: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 5.3e-71: tmp = ((F / B) / F) - t_0 elif F <= 2.75e-36: tmp = F / (math.sin(B) / math.sqrt(0.5)) elif F <= 1.08e+39: tmp = (1.0 / B) - t_0 elif F <= 5.7e+107: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (F / (F * B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.16e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.8e-175) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 5.3e-71) tmp = Float64(Float64(Float64(F / B) / F) - t_0); elseif (F <= 2.75e-36) tmp = Float64(F / Float64(sin(B) / sqrt(0.5))); elseif (F <= 1.08e+39) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= 5.7e+107) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(F / Float64(F * B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.16e-7) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.8e-175) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 5.3e-71) tmp = ((F / B) / F) - t_0; elseif (F <= 2.75e-36) tmp = F / (sin(B) / sqrt(0.5)); elseif (F <= 1.08e+39) tmp = (1.0 / B) - t_0; elseif (F <= 5.7e+107) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (F / (F * B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.16e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.8e-175], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.3e-71], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.75e-36], N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.08e+39], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5.7e+107], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.16 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-175}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-71}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - t\_0\\
\mathbf{elif}\;F \leq 2.75 \cdot 10^{-36}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{+39}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{elif}\;F \leq 5.7 \cdot 10^{+107}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -2.16000000000000002e-7Initial program 61.6%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 75.6%
if -2.16000000000000002e-7 < F < -2.8e-175Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 99.3%
Taylor expanded in x around 0 99.3%
Taylor expanded in F around inf 68.0%
if -2.8e-175 < F < 5.29999999999999999e-71Initial program 99.7%
Simplified99.8%
Taylor expanded in B around 0 94.1%
Taylor expanded in F around inf 47.6%
*-commutative47.6%
Simplified47.6%
un-div-inv47.6%
*-commutative47.6%
associate-/r*61.1%
Applied egg-rr61.1%
if 5.29999999999999999e-71 < F < 2.74999999999999992e-36Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.3%
Taylor expanded in F around inf 71.0%
associate-*l/71.0%
associate-/r/71.1%
Simplified71.1%
if 2.74999999999999992e-36 < F < 1.07999999999999998e39Initial program 85.5%
Simplified99.8%
Taylor expanded in B around 0 79.1%
Taylor expanded in F around inf 60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in F around 0 60.3%
if 1.07999999999999998e39 < F < 5.69999999999999972e107Initial program 99.8%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 89.8%
if 5.69999999999999972e107 < F Initial program 38.6%
Simplified59.6%
Taylor expanded in B around 0 57.4%
Taylor expanded in F around inf 68.5%
*-commutative68.5%
Simplified68.5%
un-div-inv68.6%
Applied egg-rr68.6%
Final simplification69.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.17)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.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 <= -0.21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.17) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.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 <= (-0.21d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.17d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.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 <= -0.21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.17) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.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 <= -0.21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.17: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.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 <= -0.21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.17) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.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 <= -0.21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.17) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.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, -0.21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.17], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 -0.21:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.17:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 61.1%
Taylor expanded in F around -inf 98.4%
div-inv98.4%
Applied egg-rr98.4%
if -0.209999999999999992 < F < 0.170000000000000012Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 83.3%
Taylor expanded in F around 0 83.0%
associate-*l/83.1%
*-lft-identity83.1%
Simplified83.1%
if 0.170000000000000012 < F Initial program 57.0%
div-inv46.8%
Applied egg-rr57.0%
Taylor expanded in F around inf 97.8%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.35)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.26)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.35) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.26) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.35d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.26d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.35) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.26) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.35: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.26: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.35) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.26) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.35) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.26) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.26], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.35:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.26:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.34999999999999998Initial program 61.1%
Taylor expanded in F around -inf 98.4%
div-inv98.4%
Applied egg-rr98.4%
if -0.34999999999999998 < F < 0.26000000000000001Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 83.3%
Taylor expanded in F around 0 83.1%
if 0.26000000000000001 < F Initial program 57.0%
div-inv46.8%
Applied egg-rr57.0%
Taylor expanded in F around inf 97.8%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e-33)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.8e-175)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 2.4e-49)
(/ (* 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 <= -3.8e-33) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.8e-175) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 2.4e-49) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d-33)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.8d-175)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 2.4d-49) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e-33) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.8e-175) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 2.4e-49) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e-33: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.8e-175: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 2.4e-49: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e-33) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.8e-175) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 2.4e-49) tmp = Float64(Float64(x * cos(B)) / Float64(-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 <= -3.8e-33) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.8e-175) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 2.4e-49) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e-33], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.8e-175], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-49], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-175}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-49}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.79999999999999994e-33Initial program 65.9%
Taylor expanded in F around -inf 93.1%
div-inv93.2%
Applied egg-rr93.2%
if -3.79999999999999994e-33 < F < -2.8e-175Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 99.5%
Taylor expanded in F around inf 73.7%
if -2.8e-175 < F < 2.39999999999999992e-49Initial program 99.7%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 85.9%
if 2.39999999999999992e-49 < F Initial program 62.0%
div-inv43.9%
Applied egg-rr62.1%
Taylor expanded in F around inf 89.5%
Final simplification88.1%
(FPCore (F B x)
:precision binary64
(if (<= F -2.16e-7)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.2e-175)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 9.5e-51)
(* x (/ (cos B) (- (sin B))))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.2e-175) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 9.5e-51) {
tmp = x * (cos(B) / -sin(B));
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.16d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.2d-175)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 9.5d-51) then
tmp = x * (cos(b) / -sin(b))
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.2e-175) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 9.5e-51) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.16e-7: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.2e-175: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 9.5e-51: tmp = x * (math.cos(B) / -math.sin(B)) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.16e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.2e-175) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 9.5e-51) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.16e-7) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.2e-175) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 9.5e-51) tmp = x * (cos(B) / -sin(B)); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.16e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.2e-175], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-51], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $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 -2.16 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-175}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-51}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.16000000000000002e-7Initial program 61.6%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 75.6%
if -2.16000000000000002e-7 < F < -3.2e-175Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 99.3%
Taylor expanded in x around 0 99.3%
Taylor expanded in F around inf 68.0%
if -3.2e-175 < F < 9.4999999999999998e-51Initial program 99.7%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 85.9%
mul-1-neg85.9%
associate-/l*85.9%
distribute-rgt-neg-in85.9%
Simplified85.9%
if 9.4999999999999998e-51 < F Initial program 62.0%
Simplified76.7%
Taylor expanded in B around 0 60.7%
Taylor expanded in F around inf 59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in F around 0 59.9%
Final simplification72.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2.16e-7)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.9e-175)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 4.8e-50)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.9e-175) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 4.8e-50) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.16d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.9d-175)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 4.8d-50) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.16e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.9e-175) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 4.8e-50) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.16e-7: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.9e-175: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 4.8e-50: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.16e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.9e-175) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 4.8e-50) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.16e-7) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.9e-175) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 4.8e-50) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.16e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.9e-175], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-50], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.16 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.9 \cdot 10^{-175}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-50}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.16000000000000002e-7Initial program 61.6%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 75.6%
if -2.16000000000000002e-7 < F < -1.9e-175Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 99.3%
Taylor expanded in x around 0 99.3%
Taylor expanded in F around inf 68.0%
if -1.9e-175 < F < 4.80000000000000004e-50Initial program 99.7%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 85.9%
if 4.80000000000000004e-50 < F Initial program 62.0%
Simplified76.7%
Taylor expanded in B around 0 60.7%
Taylor expanded in F around inf 59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in F around 0 59.9%
Final simplification72.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-37)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -3.2e-175)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 2.7e-50) (/ (* x (cos B)) (- (sin 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-37) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -3.2e-175) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 2.7e-50) {
tmp = (x * cos(B)) / -sin(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-37)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-3.2d-175)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 2.7d-50) then
tmp = (x * cos(b)) / -sin(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-37) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -3.2e-175) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 2.7e-50) {
tmp = (x * Math.cos(B)) / -Math.sin(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-37: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -3.2e-175: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 2.7e-50: tmp = (x * math.cos(B)) / -math.sin(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-37) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -3.2e-175) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 2.7e-50) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(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-37) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -3.2e-175) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 2.7e-50) tmp = (x * cos(B)) / -sin(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-37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.2e-175], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.7e-50], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[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^{-37}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-175}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-50}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -6e-37Initial program 65.9%
Taylor expanded in F around -inf 93.1%
div-inv93.2%
Applied egg-rr93.2%
if -6e-37 < F < -3.2e-175Initial program 99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 99.5%
Taylor expanded in F around inf 73.7%
if -3.2e-175 < F < 2.7e-50Initial program 99.7%
Taylor expanded in F around -inf 37.4%
Taylor expanded in x around inf 85.9%
if 2.7e-50 < F Initial program 62.0%
Simplified76.7%
Taylor expanded in B around 0 60.7%
Taylor expanded in F around inf 59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in F around 0 59.9%
Final simplification79.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.11)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.26) (- (* F (/ (sqrt 0.5) B)) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.11) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.26) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.11d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.26d0) 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 <= -0.11) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.26) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.11: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.26: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.11) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.26) 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 <= -0.11) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.26) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.26], 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 -0.11:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.26:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.110000000000000001Initial program 61.1%
Taylor expanded in F around -inf 98.4%
div-inv98.4%
Applied egg-rr98.4%
if -0.110000000000000001 < F < 0.26000000000000001Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 83.3%
Taylor expanded in F around 0 83.0%
Taylor expanded in x around 0 82.9%
associate-/l*82.9%
Simplified82.9%
if 0.26000000000000001 < F Initial program 57.0%
div-inv46.8%
Applied egg-rr57.0%
Taylor expanded in F around inf 97.8%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.078)
(- (* (sqrt 0.5) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.078) {
tmp = (sqrt(0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.21d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.078d0) then
tmp = (sqrt(0.5d0) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.078) {
tmp = (Math.sqrt(0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.078: tmp = (math.sqrt(0.5) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.078) tmp = Float64(Float64(sqrt(0.5) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.078) tmp = (sqrt(0.5) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.078], N[(N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.21:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.078:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.209999999999999992Initial program 61.1%
Taylor expanded in F around -inf 98.4%
div-inv98.4%
Applied egg-rr98.4%
if -0.209999999999999992 < F < 0.0779999999999999999Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 83.3%
Taylor expanded in F around 0 83.0%
Taylor expanded in x around 0 82.9%
associate-/l*82.9%
Simplified82.9%
sub-neg82.9%
clear-num82.9%
un-div-inv82.8%
distribute-neg-frac82.8%
Applied egg-rr82.8%
+-commutative82.8%
associate-/r/82.9%
Simplified82.9%
if 0.0779999999999999999 < F Initial program 57.0%
div-inv46.8%
Applied egg-rr57.0%
Taylor expanded in F around inf 97.8%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt 0.5)) x) B))
(t_1 (- (* (/ F (sin B)) (/ 1.0 F)) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -0.11)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.5e-275)
t_0
(if (<= F 1.8e-60)
(- (/ (/ F B) F) t_2)
(if (<= F 0.18)
t_0
(if (<= F 1.225e+26)
t_1
(if (<= F 3.35e+39)
(- (/ 1.0 B) t_2)
(if (<= F 1.45e+108) t_1 (- (/ F (* F B)) t_2))))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) - x) / B;
double t_1 = ((F / sin(B)) * (1.0 / F)) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -0.11) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.5e-275) {
tmp = t_0;
} else if (F <= 1.8e-60) {
tmp = ((F / B) / F) - t_2;
} else if (F <= 0.18) {
tmp = t_0;
} else if (F <= 1.225e+26) {
tmp = t_1;
} else if (F <= 3.35e+39) {
tmp = (1.0 / B) - t_2;
} else if (F <= 1.45e+108) {
tmp = t_1;
} else {
tmp = (F / (F * B)) - t_2;
}
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) :: t_2
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) - x) / b
t_1 = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
t_2 = x / tan(b)
if (f <= (-0.11d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.5d-275) then
tmp = t_0
else if (f <= 1.8d-60) then
tmp = ((f / b) / f) - t_2
else if (f <= 0.18d0) then
tmp = t_0
else if (f <= 1.225d+26) then
tmp = t_1
else if (f <= 3.35d+39) then
tmp = (1.0d0 / b) - t_2
else if (f <= 1.45d+108) then
tmp = t_1
else
tmp = (f / (f * b)) - t_2
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 = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -0.11) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.5e-275) {
tmp = t_0;
} else if (F <= 1.8e-60) {
tmp = ((F / B) / F) - t_2;
} else if (F <= 0.18) {
tmp = t_0;
} else if (F <= 1.225e+26) {
tmp = t_1;
} else if (F <= 3.35e+39) {
tmp = (1.0 / B) - t_2;
} else if (F <= 1.45e+108) {
tmp = t_1;
} else {
tmp = (F / (F * B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) - x) / B t_1 = ((F / math.sin(B)) * (1.0 / F)) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -0.11: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.5e-275: tmp = t_0 elif F <= 1.8e-60: tmp = ((F / B) / F) - t_2 elif F <= 0.18: tmp = t_0 elif F <= 1.225e+26: tmp = t_1 elif F <= 3.35e+39: tmp = (1.0 / B) - t_2 elif F <= 1.45e+108: tmp = t_1 else: tmp = (F / (F * B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B) t_1 = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.5e-275) tmp = t_0; elseif (F <= 1.8e-60) tmp = Float64(Float64(Float64(F / B) / F) - t_2); elseif (F <= 0.18) tmp = t_0; elseif (F <= 1.225e+26) tmp = t_1; elseif (F <= 3.35e+39) tmp = Float64(Float64(1.0 / B) - t_2); elseif (F <= 1.45e+108) tmp = t_1; else tmp = Float64(Float64(F / Float64(F * B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) - x) / B; t_1 = ((F / sin(B)) * (1.0 / F)) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -0.11) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.5e-275) tmp = t_0; elseif (F <= 1.8e-60) tmp = ((F / B) / F) - t_2; elseif (F <= 0.18) tmp = t_0; elseif (F <= 1.225e+26) tmp = t_1; elseif (F <= 3.35e+39) tmp = (1.0 / B) - t_2; elseif (F <= 1.45e+108) tmp = t_1; else tmp = (F / (F * B)) - t_2; 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[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-275], t$95$0, If[LessEqual[F, 1.8e-60], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 0.18], t$95$0, If[LessEqual[F, 1.225e+26], t$95$1, If[LessEqual[F, 3.35e+39], N[(N[(1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, 1.45e+108], t$95$1, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5} - x}{B}\\
t_1 := \frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.11:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-275}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-60}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - t\_2\\
\mathbf{elif}\;F \leq 0.18:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.225 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 3.35 \cdot 10^{+39}:\\
\;\;\;\;\frac{1}{B} - t\_2\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_2\\
\end{array}
\end{array}
if F < -0.110000000000000001Initial program 61.1%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 75.3%
if -0.110000000000000001 < F < 2.49999999999999992e-275 or 1.8e-60 < F < 0.17999999999999999Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 82.4%
Taylor expanded in F around 0 82.0%
Taylor expanded in x around 0 81.7%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in B around 0 62.5%
if 2.49999999999999992e-275 < F < 1.8e-60Initial program 99.7%
Simplified99.7%
Taylor expanded in B around 0 85.3%
Taylor expanded in F around inf 49.4%
*-commutative49.4%
Simplified49.4%
un-div-inv49.4%
*-commutative49.4%
associate-/r*61.3%
Applied egg-rr61.3%
if 0.17999999999999999 < F < 1.22499999999999993e26 or 3.34999999999999975e39 < F < 1.45000000000000004e108Initial program 99.5%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 82.2%
if 1.22499999999999993e26 < F < 3.34999999999999975e39Initial program 36.4%
Simplified100.0%
Taylor expanded in B around 0 99.5%
Taylor expanded in F around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 100.0%
if 1.45000000000000004e108 < F Initial program 38.6%
Simplified59.6%
Taylor expanded in B around 0 57.4%
Taylor expanded in F around inf 68.5%
*-commutative68.5%
Simplified68.5%
un-div-inv68.6%
Applied egg-rr68.6%
Final simplification69.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))))
(if (<= F -0.038)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 8.5e-279)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.46e-61)
(- (/ (/ F B) F) t_0)
(if (<= F 0.4)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.225e+26)
t_1
(if (<= F 1.08e+39)
(- (/ 1.0 B) t_0)
(if (<= F 4.3e+107) t_1 (- (/ F (* F B)) t_0))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = ((F / sin(B)) * (1.0 / F)) - (x / B);
double tmp;
if (F <= -0.038) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8.5e-279) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.46e-61) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 0.4) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.225e+26) {
tmp = t_1;
} else if (F <= 1.08e+39) {
tmp = (1.0 / B) - t_0;
} else if (F <= 4.3e+107) {
tmp = t_1;
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
if (f <= (-0.038d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8.5d-279) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.46d-61) then
tmp = ((f / b) / f) - t_0
else if (f <= 0.4d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.225d+26) then
tmp = t_1
else if (f <= 1.08d+39) then
tmp = (1.0d0 / b) - t_0
else if (f <= 4.3d+107) then
tmp = t_1
else
tmp = (f / (f * b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
double tmp;
if (F <= -0.038) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8.5e-279) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.46e-61) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 0.4) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.225e+26) {
tmp = t_1;
} else if (F <= 1.08e+39) {
tmp = (1.0 / B) - t_0;
} else if (F <= 4.3e+107) {
tmp = t_1;
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = ((F / math.sin(B)) * (1.0 / F)) - (x / B) tmp = 0 if F <= -0.038: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8.5e-279: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.46e-61: tmp = ((F / B) / F) - t_0 elif F <= 0.4: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.225e+26: tmp = t_1 elif F <= 1.08e+39: tmp = (1.0 / B) - t_0 elif F <= 4.3e+107: tmp = t_1 else: tmp = (F / (F * B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)) tmp = 0.0 if (F <= -0.038) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8.5e-279) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.46e-61) tmp = Float64(Float64(Float64(F / B) / F) - t_0); elseif (F <= 0.4) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.225e+26) tmp = t_1; elseif (F <= 1.08e+39) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= 4.3e+107) tmp = t_1; else tmp = Float64(Float64(F / Float64(F * B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = ((F / sin(B)) * (1.0 / F)) - (x / B); tmp = 0.0; if (F <= -0.038) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8.5e-279) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.46e-61) tmp = ((F / B) / F) - t_0; elseif (F <= 0.4) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.225e+26) tmp = t_1; elseif (F <= 1.08e+39) tmp = (1.0 / B) - t_0; elseif (F <= 4.3e+107) tmp = t_1; else tmp = (F / (F * B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.038], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-279], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.46e-61], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.4], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.225e+26], t$95$1, If[LessEqual[F, 1.08e+39], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.3e+107], t$95$1, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.038:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-279}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.46 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - t\_0\\
\mathbf{elif}\;F \leq 0.4:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.225 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.08 \cdot 10^{+39}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -0.0379999999999999991Initial program 61.1%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 75.3%
if -0.0379999999999999991 < F < 8.5000000000000002e-279Initial program 99.5%
Simplified99.6%
Taylor expanded in B around 0 82.8%
Taylor expanded in F around 0 82.7%
Taylor expanded in x around 0 82.7%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in B around 0 63.1%
if 8.5000000000000002e-279 < F < 1.46e-61Initial program 99.7%
Simplified99.7%
Taylor expanded in B around 0 85.3%
Taylor expanded in F around inf 49.4%
*-commutative49.4%
Simplified49.4%
un-div-inv49.4%
*-commutative49.4%
associate-/r*61.3%
Applied egg-rr61.3%
if 1.46e-61 < F < 0.40000000000000002Initial program 99.1%
Simplified99.8%
Taylor expanded in B around 0 79.3%
Taylor expanded in F around 0 77.1%
Taylor expanded in B around 0 60.8%
if 0.40000000000000002 < F < 1.22499999999999993e26 or 1.07999999999999998e39 < F < 4.3e107Initial program 99.5%
Taylor expanded in F around inf 92.8%
Taylor expanded in B around 0 82.2%
if 1.22499999999999993e26 < F < 1.07999999999999998e39Initial program 36.4%
Simplified100.0%
Taylor expanded in B around 0 99.5%
Taylor expanded in F around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 100.0%
if 4.3e107 < F Initial program 38.6%
Simplified59.6%
Taylor expanded in B around 0 57.4%
Taylor expanded in F around inf 68.5%
*-commutative68.5%
Simplified68.5%
un-div-inv68.6%
Applied egg-rr68.6%
Final simplification69.2%
(FPCore (F B x) :precision binary64 (if (or (<= x -2e-163) (not (<= x 1.65e-94))) (- (/ 1.0 B) (/ x (tan B))) (/ (* F (sqrt 0.5)) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2e-163) || !(x <= 1.65e-94)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (F * sqrt(0.5)) / 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 <= (-2d-163)) .or. (.not. (x <= 1.65d-94))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (f * sqrt(0.5d0)) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2e-163) || !(x <= 1.65e-94)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F * Math.sqrt(0.5)) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2e-163) or not (x <= 1.65e-94): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (F * math.sqrt(0.5)) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2e-163) || !(x <= 1.65e-94)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F * sqrt(0.5)) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2e-163) || ~((x <= 1.65e-94))) tmp = (1.0 / B) - (x / tan(B)); else tmp = (F * sqrt(0.5)) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2e-163], N[Not[LessEqual[x, 1.65e-94]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{-163} \lor \neg \left(x \leq 1.65 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B}\\
\end{array}
\end{array}
if x < -1.99999999999999985e-163 or 1.6500000000000001e-94 < x Initial program 78.7%
Simplified89.3%
Taylor expanded in B around 0 83.5%
Taylor expanded in F around inf 67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in F around 0 72.1%
if -1.99999999999999985e-163 < x < 1.6500000000000001e-94Initial program 74.3%
Simplified78.6%
Taylor expanded in B around 0 44.8%
Taylor expanded in F around 0 33.7%
Taylor expanded in x around 0 33.7%
associate-/l*33.7%
Simplified33.7%
Taylor expanded in F around inf 25.1%
Final simplification55.2%
(FPCore (F B x) :precision binary64 (if (or (<= x -5.8e-93) (not (<= x 0.000122))) (- (/ 1.0 B) (/ x (tan B))) (/ (- (* F (sqrt 0.5)) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.8e-93) || !(x <= 0.000122)) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - 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 ((x <= (-5.8d-93)) .or. (.not. (x <= 0.000122d0))) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -5.8e-93) || !(x <= 0.000122)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.8e-93) or not (x <= 0.000122): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.8e-93) || !(x <= 0.000122)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.8e-93) || ~((x <= 0.000122))) tmp = (1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.8e-93], N[Not[LessEqual[x, 0.000122]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{-93} \lor \neg \left(x \leq 0.000122\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if x < -5.7999999999999997e-93 or 1.21999999999999997e-4 < x Initial program 80.9%
Simplified94.3%
Taylor expanded in B around 0 91.7%
Taylor expanded in F around inf 83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in F around 0 89.9%
if -5.7999999999999997e-93 < x < 1.21999999999999997e-4Initial program 73.8%
Simplified77.5%
Taylor expanded in B around 0 49.7%
Taylor expanded in F around 0 38.8%
Taylor expanded in x around 0 38.6%
associate-/l*38.6%
Simplified38.6%
Taylor expanded in B around 0 32.1%
Final simplification59.4%
(FPCore (F B x)
:precision binary64
(if (<= F -0.26)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 9.5e-197)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.26) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 9.5e-197) {
tmp = ((F * sqrt(0.5)) - 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 <= (-0.26d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 9.5d-197) then
tmp = ((f * sqrt(0.5d0)) - 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 <= -0.26) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 9.5e-197) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.26: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 9.5e-197: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.26) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 9.5e-197) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - 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 <= -0.26) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 9.5e-197) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-197], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.26:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-197}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -0.26000000000000001Initial program 61.1%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 75.3%
if -0.26000000000000001 < F < 9.5000000000000003e-197Initial program 99.6%
Simplified99.7%
Taylor expanded in B around 0 83.7%
Taylor expanded in F around 0 83.6%
Taylor expanded in x around 0 83.6%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in B around 0 62.1%
if 9.5000000000000003e-197 < F Initial program 72.5%
Simplified83.1%
Taylor expanded in B around 0 67.1%
Taylor expanded in F around inf 58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in F around 0 60.3%
Final simplification65.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.18e-48)
(/ (- -1.0 x) B)
(if (<= F -5.6e-144)
(* F (/ (sqrt 0.5) B))
(if (<= F 4.8e-51) (/ (- x) B) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.18e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= -5.6e-144) {
tmp = F * (sqrt(0.5) / B);
} else if (F <= 4.8e-51) {
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.18d-48)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-5.6d-144)) then
tmp = f * (sqrt(0.5d0) / b)
else if (f <= 4.8d-51) 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.18e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= -5.6e-144) {
tmp = F * (Math.sqrt(0.5) / B);
} else if (F <= 4.8e-51) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.18e-48: tmp = (-1.0 - x) / B elif F <= -5.6e-144: tmp = F * (math.sqrt(0.5) / B) elif F <= 4.8e-51: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.18e-48) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -5.6e-144) tmp = Float64(F * Float64(sqrt(0.5) / B)); elseif (F <= 4.8e-51) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.18e-48) tmp = (-1.0 - x) / B; elseif (F <= -5.6e-144) tmp = F * (sqrt(0.5) / B); elseif (F <= 4.8e-51) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.18e-48], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -5.6e-144], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-51], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.18 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -5.6 \cdot 10^{-144}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-51}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.18000000000000007e-48Initial program 67.7%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 47.3%
mul-1-neg47.3%
distribute-neg-frac247.3%
Simplified47.3%
if -1.18000000000000007e-48 < F < -5.59999999999999995e-144Initial program 99.6%
Simplified99.6%
Taylor expanded in B around 0 82.5%
Taylor expanded in F around 0 82.5%
Taylor expanded in x around 0 82.5%
associate-/l*82.5%
Simplified82.5%
Taylor expanded in F around inf 52.8%
associate-/l*52.8%
Simplified52.8%
if -5.59999999999999995e-144 < F < 4.8e-51Initial program 99.7%
Taylor expanded in F around -inf 36.4%
Taylor expanded in B around 0 22.3%
mul-1-neg22.3%
distribute-neg-frac222.3%
Simplified22.3%
Taylor expanded in x around inf 44.5%
associate-*r/44.5%
neg-mul-144.5%
Simplified44.5%
if 4.8e-51 < F Initial program 62.0%
Simplified76.7%
Taylor expanded in B around 0 60.7%
Taylor expanded in F around inf 59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in B around 0 44.1%
Final simplification46.1%
(FPCore (F B x) :precision binary64 (if (<= F -5.2) (/ -1.0 B) (if (<= F 1.45e-55) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.2) {
tmp = -1.0 / B;
} else if (F <= 1.45e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.2d0)) then
tmp = (-1.0d0) / b
else if (f <= 1.45d-55) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.2) {
tmp = -1.0 / B;
} else if (F <= 1.45e-55) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.2: tmp = -1.0 / B elif F <= 1.45e-55: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.2) tmp = Float64(-1.0 / B); elseif (F <= 1.45e-55) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.2) tmp = -1.0 / B; elseif (F <= 1.45e-55) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.2], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.45e-55], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.20000000000000018Initial program 61.1%
Taylor expanded in F around -inf 98.4%
Taylor expanded in B around 0 49.6%
mul-1-neg49.6%
distribute-neg-frac249.6%
Simplified49.6%
Taylor expanded in x around 0 30.6%
if -5.20000000000000018 < F < 1.45e-55Initial program 99.6%
Taylor expanded in F around -inf 34.5%
Taylor expanded in B around 0 23.5%
mul-1-neg23.5%
distribute-neg-frac223.5%
Simplified23.5%
Taylor expanded in x around inf 39.2%
associate-*r/39.2%
neg-mul-139.2%
Simplified39.2%
if 1.45e-55 < F Initial program 62.0%
Simplified76.7%
Taylor expanded in B around 0 60.7%
Taylor expanded in F around inf 59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in B around 0 44.1%
Final simplification38.1%
(FPCore (F B x) :precision binary64 (if (<= F -3.55e-71) (/ (- -1.0 x) B) (if (<= F 1.1e-56) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.55e-71) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-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.55d-71)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.1d-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.55e-71) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-56) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.55e-71: tmp = (-1.0 - x) / B elif F <= 1.1e-56: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.55e-71) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.1e-56) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.55e-71) tmp = (-1.0 - x) / B; elseif (F <= 1.1e-56) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.55e-71], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.1e-56], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.55 \cdot 10^{-71}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-56}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.55000000000000004e-71Initial program 69.1%
Taylor expanded in F around -inf 86.0%
Taylor expanded in B around 0 45.6%
mul-1-neg45.6%
distribute-neg-frac245.6%
Simplified45.6%
if -3.55000000000000004e-71 < F < 1.10000000000000002e-56Initial program 99.6%
Taylor expanded in F around -inf 33.5%
Taylor expanded in B around 0 21.9%
mul-1-neg21.9%
distribute-neg-frac221.9%
Simplified21.9%
Taylor expanded in x around inf 41.8%
associate-*r/41.8%
neg-mul-141.8%
Simplified41.8%
if 1.10000000000000002e-56 < F Initial program 62.0%
Simplified76.7%
Taylor expanded in B around 0 60.7%
Taylor expanded in F around inf 59.8%
*-commutative59.8%
Simplified59.8%
Taylor expanded in B around 0 44.1%
Final simplification43.9%
(FPCore (F B x) :precision binary64 (if (or (<= x -5.5e-175) (not (<= x 3.4e-68))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -5.5e-175) || !(x <= 3.4e-68)) {
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 <= (-5.5d-175)) .or. (.not. (x <= 3.4d-68))) 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 <= -5.5e-175) || !(x <= 3.4e-68)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -5.5e-175) or not (x <= 3.4e-68): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -5.5e-175) || !(x <= 3.4e-68)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -5.5e-175) || ~((x <= 3.4e-68))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -5.5e-175], N[Not[LessEqual[x, 3.4e-68]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{-175} \lor \neg \left(x \leq 3.4 \cdot 10^{-68}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -5.50000000000000054e-175 or 3.40000000000000018e-68 < x Initial program 79.0%
Taylor expanded in F around -inf 69.8%
Taylor expanded in B around 0 41.0%
mul-1-neg41.0%
distribute-neg-frac241.0%
Simplified41.0%
Taylor expanded in x around inf 45.5%
associate-*r/45.5%
neg-mul-145.5%
Simplified45.5%
if -5.50000000000000054e-175 < x < 3.40000000000000018e-68Initial program 74.2%
Taylor expanded in F around -inf 34.7%
Taylor expanded in B around 0 20.0%
mul-1-neg20.0%
distribute-neg-frac220.0%
Simplified20.0%
Taylor expanded in x around 0 20.0%
Final simplification35.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 77.1%
Taylor expanded in F around -inf 56.2%
Taylor expanded in B around 0 32.9%
mul-1-neg32.9%
distribute-neg-frac232.9%
Simplified32.9%
Taylor expanded in x around 0 12.0%
Final simplification12.0%
herbie shell --seed 2024073
(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))))))