
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.3e+60)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.048)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -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 <= -2.3e+60) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.048) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.3e+60) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.048) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.3e+60], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.048], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -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 -2.3 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.048:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.30000000000000017e60Initial program 52.8%
Taylor expanded in F around -inf 99.8%
+-commutative99.8%
unsub-neg99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -2.30000000000000017e60 < F < 0.048000000000000001Initial program 98.6%
Simplified99.7%
if 0.048000000000000001 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -112000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.15e-68)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.048)
(- (* F (/ (sqrt (/ 1.0 (fma x 2.0 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 <= -112000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.15e-68) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.048) {
tmp = (F * (sqrt((1.0 / fma(x, 2.0, 2.0))) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -112000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.15e-68) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.048) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(x, 2.0, 2.0))) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -112000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.15e-68], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.048], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(x * 2.0 + 2.0), $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 -112000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-68}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.048:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(x, 2, 2\right)}}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -112000Initial program 58.6%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.5%
Applied egg-rr99.5%
if -112000 < F < -2.15000000000000005e-68Initial program 99.0%
Taylor expanded in B around 0 87.5%
if -2.15000000000000005e-68 < F < 0.048000000000000001Initial program 99.4%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 86.9%
Taylor expanded in F around 0 86.9%
associate-*l/86.9%
associate-*r/86.9%
+-commutative86.9%
*-commutative86.9%
fma-define86.9%
Simplified86.9%
if 0.048000000000000001 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -135000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.048)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 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 <= -135000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.048) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (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 <= (-135000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.048d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (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 <= -135000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.048) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (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 <= -135000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.048: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (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 <= -135000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.048) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + 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 <= -135000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.048) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (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, -135000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.048], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $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 -135000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.048:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -135000Initial program 58.6%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.5%
Applied egg-rr99.5%
if -135000 < F < 0.048000000000000001Initial program 99.3%
div-inv99.5%
Applied egg-rr99.5%
if 0.048000000000000001 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.46)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 0.048)
(- (* 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.46) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 0.048) {
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.46d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 0.048d0) 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.46) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 0.048) {
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.46: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 0.048: 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.46) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 0.048) 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.46) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 0.048) 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.46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.048], 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.46:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 0.048:\\
\;\;\;\;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.46Initial program 60.0%
Taylor expanded in F around -inf 97.4%
+-commutative97.4%
unsub-neg97.4%
un-div-inv97.5%
Applied egg-rr97.5%
if -1.46 < F < 0.048000000000000001Initial program 99.3%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 0.048000000000000001 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0031)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.048)
(+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.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.0031) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.048) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.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.0031d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.048d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
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.0031) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.048) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.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.0031: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.048: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.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.0031) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.048) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.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.0031) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.048) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.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.0031], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.048], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0031:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.048:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.00309999999999999989Initial program 60.4%
Taylor expanded in F around -inf 97.4%
+-commutative97.4%
unsub-neg97.4%
un-div-inv97.5%
Applied egg-rr97.5%
if -0.00309999999999999989 < F < 0.048000000000000001Initial program 99.3%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-undefine99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*r/99.4%
clear-num99.3%
un-div-inv99.4%
fma-define99.4%
fma-undefine99.4%
*-commutative99.4%
fma-define99.4%
fma-define99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 98.5%
if 0.048000000000000001 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.048)
(- (* (/ F (sin B)) (/ 1.0 (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.048) {
tmp = ((F / sin(B)) * (1.0 / sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.048d0) then
tmp = ((f / sin(b)) * (1.0d0 / sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.048) {
tmp = ((F / Math.sin(B)) * (1.0 / Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.048: tmp = ((F / math.sin(B)) * (1.0 / math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.048) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.048) tmp = ((F / sin(B)) * (1.0 / sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.048], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $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 0.048:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{\sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 60.0%
Taylor expanded in F around -inf 97.4%
+-commutative97.4%
unsub-neg97.4%
un-div-inv97.5%
Applied egg-rr97.5%
if -1.44999999999999996 < F < 0.048000000000000001Initial program 99.3%
div-inv99.5%
Applied egg-rr99.5%
add-sqr-sqrt99.5%
unpow-prod-down99.5%
+-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
+-commutative99.5%
fma-define99.5%
fma-define99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
pow-sqr99.5%
metadata-eval99.5%
unpow-199.5%
Simplified99.5%
Taylor expanded in F around 0 98.7%
if 0.048000000000000001 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -55000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.9e-69)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 0.048) (- (* t_0 (/ F B)) t_1) (- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -55000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.9e-69) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 0.048) {
tmp = (t_0 * (F / B)) - t_1;
} 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 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-55000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.9d-69)) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 0.048d0) then
tmp = (t_0 * (f / b)) - t_1
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(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -55000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.9e-69) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 0.048) {
tmp = (t_0 * (F / B)) - t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -55000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.9e-69: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 0.048: tmp = (t_0 * (F / B)) - t_1 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -55000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.9e-69) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 0.048) tmp = Float64(Float64(t_0 * Float64(F / B)) - t_1); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -55000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.9e-69) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 0.048) tmp = (t_0 * (F / B)) - t_1; 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[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -55000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.9e-69], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.048], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -55000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -4.9 \cdot 10^{-69}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.048:\\
\;\;\;\;t\_0 \cdot \frac{F}{B} - t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -55000Initial program 58.6%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.5%
Applied egg-rr99.5%
if -55000 < F < -4.8999999999999998e-69Initial program 99.0%
Taylor expanded in B around 0 87.5%
if -4.8999999999999998e-69 < F < 0.048000000000000001Initial program 99.4%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 86.9%
if 0.048000000000000001 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -31500.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -9.4e-69)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.029)
(- (* (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 <= -31500.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -9.4e-69) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.029) {
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 <= (-31500.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-9.4d-69)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.029d0) 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 <= -31500.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -9.4e-69) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.029) {
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 <= -31500.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -9.4e-69: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.029: 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 <= -31500.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -9.4e-69) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.029) 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 <= -31500.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -9.4e-69) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.029) 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, -31500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -9.4e-69], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.029], 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 -31500:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -9.4 \cdot 10^{-69}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.029:\\
\;\;\;\;\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 < -31500Initial program 58.6%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.5%
Applied egg-rr99.5%
if -31500 < F < -9.39999999999999935e-69Initial program 99.0%
Taylor expanded in B around 0 87.5%
if -9.39999999999999935e-69 < F < 0.0290000000000000015Initial program 99.4%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in B around 0 86.9%
Taylor expanded in F around 0 86.9%
*-commutative86.9%
Simplified86.9%
if 0.0290000000000000015 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification94.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -1.45e+97)
t_0
(if (<= F -1.15e+60)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.7e-35)
t_0
(if (<= F 1.85)
(* x (/ (- (cos B)) (sin B)))
(if (or (<= F 8.2e+108) (not (<= F 5.4e+243)))
(- (/ F (* F (sin B))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -1.45e+97) {
tmp = t_0;
} else if (F <= -1.15e+60) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 1.85) {
tmp = x * (-cos(B) / sin(B));
} else if ((F <= 8.2e+108) || !(F <= 5.4e+243)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-1.45d+97)) then
tmp = t_0
else if (f <= (-1.15d+60)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.7d-35)) then
tmp = t_0
else if (f <= 1.85d0) then
tmp = x * (-cos(b) / sin(b))
else if ((f <= 8.2d+108) .or. (.not. (f <= 5.4d+243))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -1.45e+97) {
tmp = t_0;
} else if (F <= -1.15e+60) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 1.85) {
tmp = x * (-Math.cos(B) / Math.sin(B));
} else if ((F <= 8.2e+108) || !(F <= 5.4e+243)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -1.45e+97: tmp = t_0 elif F <= -1.15e+60: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.7e-35: tmp = t_0 elif F <= 1.85: tmp = x * (-math.cos(B) / math.sin(B)) elif (F <= 8.2e+108) or not (F <= 5.4e+243): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -1.45e+97) tmp = t_0; elseif (F <= -1.15e+60) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 1.85) tmp = Float64(x * Float64(Float64(-cos(B)) / sin(B))); elseif ((F <= 8.2e+108) || !(F <= 5.4e+243)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -1.45e+97) tmp = t_0; elseif (F <= -1.15e+60) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 1.85) tmp = x * (-cos(B) / sin(B)); elseif ((F <= 8.2e+108) || ~((F <= 5.4e+243))) tmp = (F / (F * sin(B))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e+97], t$95$0, If[LessEqual[F, -1.15e+60], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-35], t$95$0, If[LessEqual[F, 1.85], N[(x * N[((-N[Cos[B], $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 8.2e+108], N[Not[LessEqual[F, 5.4e+243]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{+97}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.85:\\
\;\;\;\;x \cdot \frac{-\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{+108} \lor \neg \left(F \leq 5.4 \cdot 10^{+243}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.44999999999999994e97 or -1.15000000000000008e60 < F < -3.6999999999999999e-35Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -1.44999999999999994e97 < F < -1.15000000000000008e60Initial program 99.1%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in B around 0 99.9%
if -3.6999999999999999e-35 < F < 1.8500000000000001Initial program 99.3%
Taylor expanded in F around -inf 34.0%
Taylor expanded in x around inf 70.6%
mul-1-neg70.6%
associate-/l*70.5%
distribute-lft-neg-in70.5%
Simplified70.5%
if 1.8500000000000001 < F < 8.1999999999999998e108 or 5.4000000000000003e243 < F Initial program 51.8%
Taylor expanded in F around inf 73.7%
Taylor expanded in B around 0 61.1%
un-div-inv61.1%
associate-/l/86.9%
Applied egg-rr86.9%
if 8.1999999999999998e108 < F < 5.4000000000000003e243Initial program 60.6%
Taylor expanded in F around inf 77.4%
Taylor expanded in B around 0 80.7%
Final simplification76.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -9.5e+96)
t_0
(if (<= F -6.2e+58)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.7e-35)
t_0
(if (<= F 3.0)
(/ (* x (cos B)) (- (sin B)))
(if (or (<= F 1.75e+109) (not (<= F 4.2e+242)))
(- (/ F (* F (sin B))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -9.5e+96) {
tmp = t_0;
} else if (F <= -6.2e+58) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 3.0) {
tmp = (x * cos(B)) / -sin(B);
} else if ((F <= 1.75e+109) || !(F <= 4.2e+242)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-9.5d+96)) then
tmp = t_0
else if (f <= (-6.2d+58)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.7d-35)) then
tmp = t_0
else if (f <= 3.0d0) then
tmp = (x * cos(b)) / -sin(b)
else if ((f <= 1.75d+109) .or. (.not. (f <= 4.2d+242))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -9.5e+96) {
tmp = t_0;
} else if (F <= -6.2e+58) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 3.0) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if ((F <= 1.75e+109) || !(F <= 4.2e+242)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -9.5e+96: tmp = t_0 elif F <= -6.2e+58: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.7e-35: tmp = t_0 elif F <= 3.0: tmp = (x * math.cos(B)) / -math.sin(B) elif (F <= 1.75e+109) or not (F <= 4.2e+242): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -9.5e+96) tmp = t_0; elseif (F <= -6.2e+58) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 3.0) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif ((F <= 1.75e+109) || !(F <= 4.2e+242)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -9.5e+96) tmp = t_0; elseif (F <= -6.2e+58) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 3.0) tmp = (x * cos(B)) / -sin(B); elseif ((F <= 1.75e+109) || ~((F <= 4.2e+242))) tmp = (F / (F * sin(B))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9.5e+96], t$95$0, If[LessEqual[F, -6.2e+58], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-35], t$95$0, If[LessEqual[F, 3.0], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 1.75e+109], N[Not[LessEqual[F, 4.2e+242]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -9.5 \cdot 10^{+96}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{+58}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{+109} \lor \neg \left(F \leq 4.2 \cdot 10^{+242}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -9.50000000000000089e96 or -6.1999999999999998e58 < F < -3.6999999999999999e-35Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -9.50000000000000089e96 < F < -6.1999999999999998e58Initial program 99.1%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in B around 0 99.9%
if -3.6999999999999999e-35 < F < 3Initial program 99.3%
Taylor expanded in F around -inf 34.0%
Taylor expanded in x around inf 70.6%
if 3 < F < 1.74999999999999992e109 or 4.1999999999999999e242 < F Initial program 51.8%
Taylor expanded in F around inf 73.7%
Taylor expanded in B around 0 61.1%
un-div-inv61.1%
associate-/l/86.9%
Applied egg-rr86.9%
if 1.74999999999999992e109 < F < 4.1999999999999999e242Initial program 60.6%
Taylor expanded in F around inf 77.4%
Taylor expanded in B around 0 80.7%
Final simplification76.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0003)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.029)
(- (* (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.0003) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.029) {
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.0003d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.029d0) 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.0003) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.029) {
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.0003: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.029: 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.0003) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.029) 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.0003) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.029) 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.0003], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.029], 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.0003:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.029:\\
\;\;\;\;\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 < -2.99999999999999974e-4Initial program 60.9%
Taylor expanded in F around -inf 96.5%
+-commutative96.5%
unsub-neg96.5%
un-div-inv96.5%
Applied egg-rr96.5%
if -2.99999999999999974e-4 < F < 0.0290000000000000015Initial program 99.3%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 83.7%
Taylor expanded in F around 0 83.7%
*-commutative83.7%
Simplified83.7%
if 0.0290000000000000015 < F Initial program 56.0%
Taylor expanded in F around -inf 47.1%
div-inv47.1%
metadata-eval47.1%
rgt-mult-inverse47.1%
associate-*l/37.7%
add-sqr-sqrt16.8%
sqrt-unprod53.3%
*-commutative53.3%
*-commutative53.3%
associate-*r/53.3%
*-commutative53.3%
rgt-mult-inverse53.3%
associate-*r/56.5%
*-commutative56.5%
rgt-mult-inverse56.5%
frac-times56.5%
metadata-eval56.5%
metadata-eval56.5%
frac-times56.5%
sqrt-unprod49.0%
Applied egg-rr99.8%
neg-sub099.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.6e-58)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8e-34) (/ (* x (cos B)) (- (sin B))) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.6e-58) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8e-34) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7.6d-58)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8d-34) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.6e-58) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8e-34) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.6e-58: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8e-34: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.6e-58) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8e-34) 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 <= -7.6e-58) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8e-34) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.6e-58], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-34], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.6 \cdot 10^{-58}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-34}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -7.5999999999999995e-58Initial program 64.0%
Taylor expanded in F around -inf 91.1%
+-commutative91.1%
unsub-neg91.1%
un-div-inv91.1%
Applied egg-rr91.1%
if -7.5999999999999995e-58 < F < 7.99999999999999942e-34Initial program 99.4%
Taylor expanded in F around -inf 32.2%
Taylor expanded in x around inf 72.4%
if 7.99999999999999942e-34 < F Initial program 60.4%
Taylor expanded in F around -inf 46.7%
div-inv46.7%
metadata-eval46.7%
rgt-mult-inverse46.7%
associate-*l/38.2%
add-sqr-sqrt18.0%
sqrt-unprod52.5%
*-commutative52.5%
*-commutative52.5%
associate-*r/52.5%
*-commutative52.5%
rgt-mult-inverse52.5%
associate-*r/55.4%
*-commutative55.4%
rgt-mult-inverse55.4%
frac-times55.4%
metadata-eval55.4%
metadata-eval55.4%
frac-times55.4%
sqrt-unprod45.8%
Applied egg-rr94.7%
neg-sub094.7%
distribute-neg-in94.7%
distribute-neg-frac94.7%
metadata-eval94.7%
Simplified94.7%
Final simplification85.6%
(FPCore (F B x)
:precision binary64
(if (<= F -7.6e-58)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3850.0)
(/ (* x (cos B)) (- (sin B)))
(if (or (<= F 3.7e+109) (not (<= F 1.9e+244)))
(- (/ F (* F (sin B))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.6e-58) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3850.0) {
tmp = (x * cos(B)) / -sin(B);
} else if ((F <= 3.7e+109) || !(F <= 1.9e+244)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.6d-58)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3850.0d0) then
tmp = (x * cos(b)) / -sin(b)
else if ((f <= 3.7d+109) .or. (.not. (f <= 1.9d+244))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.6e-58) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3850.0) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if ((F <= 3.7e+109) || !(F <= 1.9e+244)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.6e-58: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3850.0: tmp = (x * math.cos(B)) / -math.sin(B) elif (F <= 3.7e+109) or not (F <= 1.9e+244): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.6e-58) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3850.0) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif ((F <= 3.7e+109) || !(F <= 1.9e+244)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.6e-58) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3850.0) tmp = (x * cos(B)) / -sin(B); elseif ((F <= 3.7e+109) || ~((F <= 1.9e+244))) tmp = (F / (F * sin(B))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.6e-58], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3850.0], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 3.7e+109], N[Not[LessEqual[F, 1.9e+244]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.6 \cdot 10^{-58}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3850:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{+109} \lor \neg \left(F \leq 1.9 \cdot 10^{+244}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -7.5999999999999995e-58Initial program 64.0%
Taylor expanded in F around -inf 91.1%
+-commutative91.1%
unsub-neg91.1%
un-div-inv91.1%
Applied egg-rr91.1%
if -7.5999999999999995e-58 < F < 3850Initial program 99.3%
Taylor expanded in F around -inf 33.7%
Taylor expanded in x around inf 71.0%
if 3850 < F < 3.7000000000000002e109 or 1.89999999999999991e244 < F Initial program 51.8%
Taylor expanded in F around inf 73.7%
Taylor expanded in B around 0 61.1%
un-div-inv61.1%
associate-/l/86.9%
Applied egg-rr86.9%
if 3.7000000000000002e109 < F < 1.89999999999999991e244Initial program 60.6%
Taylor expanded in F around inf 77.4%
Taylor expanded in B around 0 80.7%
Final simplification81.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 (sin B)) (/ x B))) (t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -2.8e+96)
t_0
(if (<= F -1.55e+60)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.7e-35)
t_0
(if (<= F 2.05e+42)
(+ t_1 (/ (/ 1.0 F) (/ B F)))
(if (or (<= F 9.2e+108) (not (<= F 4.2e+242)))
(- (/ F (* F (sin B))) (/ x B))
(+ t_1 (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / sin(B)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.8e+96) {
tmp = t_0;
} else if (F <= -1.55e+60) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 2.05e+42) {
tmp = t_1 + ((1.0 / F) / (B / F));
} else if ((F <= 9.2e+108) || !(F <= 4.2e+242)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = t_1 + (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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / sin(b)) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-2.8d+96)) then
tmp = t_0
else if (f <= (-1.55d+60)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.7d-35)) then
tmp = t_0
else if (f <= 2.05d+42) then
tmp = t_1 + ((1.0d0 / f) / (b / f))
else if ((f <= 9.2d+108) .or. (.not. (f <= 4.2d+242))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = t_1 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / Math.sin(B)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.8e+96) {
tmp = t_0;
} else if (F <= -1.55e+60) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 2.05e+42) {
tmp = t_1 + ((1.0 / F) / (B / F));
} else if ((F <= 9.2e+108) || !(F <= 4.2e+242)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / math.sin(B)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.8e+96: tmp = t_0 elif F <= -1.55e+60: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.7e-35: tmp = t_0 elif F <= 2.05e+42: tmp = t_1 + ((1.0 / F) / (B / F)) elif (F <= 9.2e+108) or not (F <= 4.2e+242): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = t_1 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.8e+96) tmp = t_0; elseif (F <= -1.55e+60) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 2.05e+42) tmp = Float64(t_1 + Float64(Float64(1.0 / F) / Float64(B / F))); elseif ((F <= 9.2e+108) || !(F <= 4.2e+242)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / sin(B)) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.8e+96) tmp = t_0; elseif (F <= -1.55e+60) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 2.05e+42) tmp = t_1 + ((1.0 / F) / (B / F)); elseif ((F <= 9.2e+108) || ~((F <= 4.2e+242))) tmp = (F / (F * sin(B))) - (x / B); else tmp = t_1 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+96], t$95$0, If[LessEqual[F, -1.55e+60], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.7e-35], t$95$0, If[LessEqual[F, 2.05e+42], N[(t$95$1 + N[(N[(1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 9.2e+108], N[Not[LessEqual[F, 4.2e+242]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\sin B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+96}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+42}:\\
\;\;\;\;t\_1 + \frac{\frac{1}{F}}{\frac{B}{F}}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{+108} \lor \neg \left(F \leq 4.2 \cdot 10^{+242}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.8e96 or -1.55e60 < F < -3.6999999999999999e-35Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -2.8e96 < F < -1.55e60Initial program 99.1%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in B around 0 99.9%
if -3.6999999999999999e-35 < F < 2.05e42Initial program 99.3%
Taylor expanded in F around inf 37.5%
*-commutative37.5%
clear-num37.5%
un-div-inv37.5%
Applied egg-rr37.5%
Taylor expanded in B around 0 49.8%
if 2.05e42 < F < 9.1999999999999996e108 or 4.1999999999999999e242 < F Initial program 46.0%
Taylor expanded in F around inf 70.6%
Taylor expanded in B around 0 59.1%
un-div-inv59.1%
associate-/l/88.1%
Applied egg-rr88.1%
if 9.1999999999999996e108 < F < 4.1999999999999999e242Initial program 60.6%
Taylor expanded in F around inf 77.4%
Taylor expanded in B around 0 80.7%
Final simplification68.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -3e+96)
t_1
(if (<= F -9.5e+59)
(- (/ -1.0 B) t_0)
(if (<= F -1.25e-35)
t_1
(if (<= F -4.5e-270)
(- (* (/ F B) (/ -1.0 F)) t_0)
(if (<= F 1.4e-177)
(/ x (- B))
(if (<= F 2.55e+39)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (/ F (* F (sin B))) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -3e+96) {
tmp = t_1;
} else if (F <= -9.5e+59) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.25e-35) {
tmp = t_1;
} else if (F <= -4.5e-270) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 1.4e-177) {
tmp = x / -B;
} else if (F <= 2.55e+39) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-3d+96)) then
tmp = t_1
else if (f <= (-9.5d+59)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1.25d-35)) then
tmp = t_1
else if (f <= (-4.5d-270)) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_0
else if (f <= 1.4d-177) then
tmp = x / -b
else if (f <= 2.55d+39) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = (f / (f * sin(b))) - (x / b)
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 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -3e+96) {
tmp = t_1;
} else if (F <= -9.5e+59) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.25e-35) {
tmp = t_1;
} else if (F <= -4.5e-270) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 1.4e-177) {
tmp = x / -B;
} else if (F <= 2.55e+39) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -3e+96: tmp = t_1 elif F <= -9.5e+59: tmp = (-1.0 / B) - t_0 elif F <= -1.25e-35: tmp = t_1 elif F <= -4.5e-270: tmp = ((F / B) * (-1.0 / F)) - t_0 elif F <= 1.4e-177: tmp = x / -B elif F <= 2.55e+39: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -3e+96) tmp = t_1; elseif (F <= -9.5e+59) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1.25e-35) tmp = t_1; elseif (F <= -4.5e-270) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_0); elseif (F <= 1.4e-177) tmp = Float64(x / Float64(-B)); elseif (F <= 2.55e+39) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -3e+96) tmp = t_1; elseif (F <= -9.5e+59) tmp = (-1.0 / B) - t_0; elseif (F <= -1.25e-35) tmp = t_1; elseif (F <= -4.5e-270) tmp = ((F / B) * (-1.0 / F)) - t_0; elseif (F <= 1.4e-177) tmp = x / -B; elseif (F <= 2.55e+39) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = (F / (F * sin(B))) - (x / B); 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[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+96], t$95$1, If[LessEqual[F, -9.5e+59], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.25e-35], t$95$1, If[LessEqual[F, -4.5e-270], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-177], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 2.55e+39], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{+59}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-270}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-177}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 2.55 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3e96 or -9.50000000000000023e59 < F < -1.24999999999999991e-35Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -3e96 < F < -9.50000000000000023e59Initial program 99.1%
Taylor expanded in F around -inf 99.4%
+-commutative99.4%
unsub-neg99.4%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in B around 0 99.9%
if -1.24999999999999991e-35 < F < -4.49999999999999998e-270Initial program 99.4%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 81.4%
Taylor expanded in F around -inf 51.5%
if -4.49999999999999998e-270 < F < 1.39999999999999993e-177Initial program 99.4%
Taylor expanded in F around -inf 25.4%
Taylor expanded in B around 0 9.7%
mul-1-neg9.7%
distribute-neg-frac29.7%
Simplified9.7%
Taylor expanded in x around inf 51.0%
associate-*r/51.0%
neg-mul-151.0%
Simplified51.0%
if 1.39999999999999993e-177 < F < 2.5499999999999999e39Initial program 99.3%
Taylor expanded in F around inf 47.7%
Taylor expanded in B around 0 56.4%
if 2.5499999999999999e39 < F Initial program 52.3%
Taylor expanded in F around inf 73.5%
Taylor expanded in B around 0 50.1%
un-div-inv50.1%
associate-/l/76.4%
Applied egg-rr76.4%
Final simplification67.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))) (t_1 (- (/ -1.0 (sin B)) (/ x B))))
(if (<= F -3e+96)
t_1
(if (<= F -1.25e+60)
t_0
(if (<= F -3.7e-35)
t_1
(if (<= F -1.75e-234)
t_0
(if (<= F 9.4e-178)
(/ x (- B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double t_1 = (-1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -3e+96) {
tmp = t_1;
} else if (F <= -1.25e+60) {
tmp = t_0;
} else if (F <= -3.7e-35) {
tmp = t_1;
} else if (F <= -1.75e-234) {
tmp = t_0;
} else if (F <= 9.4e-178) {
tmp = x / -B;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
t_1 = ((-1.0d0) / sin(b)) - (x / b)
if (f <= (-3d+96)) then
tmp = t_1
else if (f <= (-1.25d+60)) then
tmp = t_0
else if (f <= (-3.7d-35)) then
tmp = t_1
else if (f <= (-1.75d-234)) then
tmp = t_0
else if (f <= 9.4d-178) then
tmp = x / -b
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double t_1 = (-1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -3e+96) {
tmp = t_1;
} else if (F <= -1.25e+60) {
tmp = t_0;
} else if (F <= -3.7e-35) {
tmp = t_1;
} else if (F <= -1.75e-234) {
tmp = t_0;
} else if (F <= 9.4e-178) {
tmp = x / -B;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) t_1 = (-1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -3e+96: tmp = t_1 elif F <= -1.25e+60: tmp = t_0 elif F <= -3.7e-35: tmp = t_1 elif F <= -1.75e-234: tmp = t_0 elif F <= 9.4e-178: tmp = x / -B else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) t_1 = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -3e+96) tmp = t_1; elseif (F <= -1.25e+60) tmp = t_0; elseif (F <= -3.7e-35) tmp = t_1; elseif (F <= -1.75e-234) tmp = t_0; elseif (F <= 9.4e-178) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); t_1 = (-1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -3e+96) tmp = t_1; elseif (F <= -1.25e+60) tmp = t_0; elseif (F <= -3.7e-35) tmp = t_1; elseif (F <= -1.75e-234) tmp = t_0; elseif (F <= 9.4e-178) tmp = x / -B; else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e+96], t$95$1, If[LessEqual[F, -1.25e+60], t$95$0, If[LessEqual[F, -3.7e-35], t$95$1, If[LessEqual[F, -1.75e-234], t$95$0, If[LessEqual[F, 9.4e-178], N[(x / (-B)), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
t_1 := \frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{+60}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.75 \cdot 10^{-234}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9.4 \cdot 10^{-178}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3e96 or -1.24999999999999994e60 < F < -3.6999999999999999e-35Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -3e96 < F < -1.24999999999999994e60 or -3.6999999999999999e-35 < F < -1.7500000000000001e-234Initial program 99.3%
Taylor expanded in F around -inf 54.4%
+-commutative54.4%
unsub-neg54.4%
un-div-inv54.7%
Applied egg-rr54.7%
Taylor expanded in B around 0 62.9%
if -1.7500000000000001e-234 < F < 9.39999999999999999e-178Initial program 99.5%
Taylor expanded in F around -inf 24.5%
Taylor expanded in B around 0 9.0%
mul-1-neg9.0%
distribute-neg-frac29.0%
Simplified9.0%
Taylor expanded in x around inf 48.5%
associate-*r/48.5%
neg-mul-148.5%
Simplified48.5%
if 9.39999999999999999e-178 < F Initial program 69.7%
Taylor expanded in F around inf 64.0%
Taylor expanded in B around 0 64.9%
Final simplification65.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -5e-234)
t_0
(if (<= F 2e-117) (/ x (- B)) (if (<= F 1.5e+183) t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -5e-234) {
tmp = t_0;
} else if (F <= 2e-117) {
tmp = x / -B;
} else if (F <= 1.5e+183) {
tmp = t_0;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-5d-234)) then
tmp = t_0
else if (f <= 2d-117) then
tmp = x / -b
else if (f <= 1.5d+183) then
tmp = t_0
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -5e-234) {
tmp = t_0;
} else if (F <= 2e-117) {
tmp = x / -B;
} else if (F <= 1.5e+183) {
tmp = t_0;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -5e-234: tmp = t_0 elif F <= 2e-117: tmp = x / -B elif F <= 1.5e+183: tmp = t_0 else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -5e-234) tmp = t_0; elseif (F <= 2e-117) tmp = Float64(x / Float64(-B)); elseif (F <= 1.5e+183) tmp = t_0; else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -5e-234) tmp = t_0; elseif (F <= 2e-117) tmp = x / -B; elseif (F <= 1.5e+183) tmp = t_0; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e-234], t$95$0, If[LessEqual[F, 2e-117], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 1.5e+183], t$95$0, N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{-234}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-117}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{+183}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4.99999999999999979e-234 or 2.00000000000000006e-117 < F < 1.49999999999999998e183Initial program 78.6%
Taylor expanded in F around -inf 69.9%
+-commutative69.9%
unsub-neg69.9%
un-div-inv69.9%
Applied egg-rr69.9%
Taylor expanded in B around 0 59.8%
if -4.99999999999999979e-234 < F < 2.00000000000000006e-117Initial program 99.4%
Taylor expanded in F around -inf 26.6%
Taylor expanded in B around 0 9.8%
mul-1-neg9.8%
distribute-neg-frac29.8%
Simplified9.8%
Taylor expanded in x around inf 48.1%
associate-*r/48.1%
neg-mul-148.1%
Simplified48.1%
if 1.49999999999999998e183 < F Initial program 21.1%
Taylor expanded in F around inf 61.7%
Taylor expanded in B around 0 39.4%
Taylor expanded in x around 0 64.5%
Final simplification58.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -0.00026)
t_0
(if (<= x -5e-122)
(/ x (- B))
(if (<= x 1.42e-11) (- (/ -1.0 (sin B)) (/ x B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -0.00026) {
tmp = t_0;
} else if (x <= -5e-122) {
tmp = x / -B;
} else if (x <= 1.42e-11) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-0.00026d0)) then
tmp = t_0
else if (x <= (-5d-122)) then
tmp = x / -b
else if (x <= 1.42d-11) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -0.00026) {
tmp = t_0;
} else if (x <= -5e-122) {
tmp = x / -B;
} else if (x <= 1.42e-11) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -0.00026: tmp = t_0 elif x <= -5e-122: tmp = x / -B elif x <= 1.42e-11: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -0.00026) tmp = t_0; elseif (x <= -5e-122) tmp = Float64(x / Float64(-B)); elseif (x <= 1.42e-11) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -0.00026) tmp = t_0; elseif (x <= -5e-122) tmp = x / -B; elseif (x <= 1.42e-11) tmp = (-1.0 / sin(B)) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.00026], t$95$0, If[LessEqual[x, -5e-122], N[(x / (-B)), $MachinePrecision], If[LessEqual[x, 1.42e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -0.00026:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-122}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.59999999999999977e-4 or 1.42e-11 < x Initial program 85.3%
Taylor expanded in F around -inf 94.4%
+-commutative94.4%
unsub-neg94.4%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in B around 0 96.6%
if -2.59999999999999977e-4 < x < -4.9999999999999999e-122Initial program 80.4%
Taylor expanded in F around -inf 21.5%
Taylor expanded in B around 0 15.8%
mul-1-neg15.8%
distribute-neg-frac215.8%
Simplified15.8%
Taylor expanded in x around inf 41.2%
associate-*r/41.2%
neg-mul-141.2%
Simplified41.2%
if -4.9999999999999999e-122 < x < 1.42e-11Initial program 65.1%
Taylor expanded in F around -inf 37.2%
Taylor expanded in B around 0 37.2%
Final simplification61.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.42e-33) (/ (- -1.0 x) B) (if (<= F 1.2e+18) (/ x (- B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e-33) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.2e+18) {
tmp = x / -B;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.42d-33)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.2d+18) then
tmp = x / -b
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e-33) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.2e+18) {
tmp = x / -B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.42e-33: tmp = (-1.0 - x) / B elif F <= 1.2e+18: tmp = x / -B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.42e-33) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.2e+18) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.42e-33) tmp = (-1.0 - x) / B; elseif (F <= 1.2e+18) tmp = x / -B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.42e-33], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.2e+18], N[(x / (-B)), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.42 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.42000000000000007e-33Initial program 62.9%
Taylor expanded in F around -inf 92.8%
Taylor expanded in B around 0 47.6%
mul-1-neg47.6%
distribute-neg-frac247.6%
Simplified47.6%
if -1.42000000000000007e-33 < F < 1.2e18Initial program 99.3%
Taylor expanded in F around -inf 34.7%
Taylor expanded in B around 0 16.6%
mul-1-neg16.6%
distribute-neg-frac216.6%
Simplified16.6%
Taylor expanded in x around inf 37.4%
associate-*r/37.4%
neg-mul-137.4%
Simplified37.4%
if 1.2e18 < F Initial program 53.1%
Taylor expanded in F around inf 73.9%
Taylor expanded in B around 0 49.4%
Taylor expanded in x around 0 54.0%
Final simplification44.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e+137) (/ -1.0 B) (if (<= F 1.9e-41) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e+137) {
tmp = -1.0 / B;
} else if (F <= 1.9e-41) {
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.7d+137)) then
tmp = (-1.0d0) / b
else if (f <= 1.9d-41) 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.7e+137) {
tmp = -1.0 / B;
} else if (F <= 1.9e-41) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e+137: tmp = -1.0 / B elif F <= 1.9e-41: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e+137) tmp = Float64(-1.0 / B); elseif (F <= 1.9e-41) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e+137) tmp = -1.0 / B; elseif (F <= 1.9e-41) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e+137], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.9e-41], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{+137}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.69999999999999993e137Initial program 35.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 44.1%
mul-1-neg44.1%
distribute-neg-frac244.1%
Simplified44.1%
Taylor expanded in x around 0 29.1%
if -1.69999999999999993e137 < F < 1.8999999999999999e-41Initial program 98.7%
Taylor expanded in F around -inf 48.1%
Taylor expanded in B around 0 26.4%
mul-1-neg26.4%
distribute-neg-frac226.4%
Simplified26.4%
Taylor expanded in x around inf 36.1%
associate-*r/36.1%
neg-mul-136.1%
Simplified36.1%
if 1.8999999999999999e-41 < F Initial program 60.4%
Taylor expanded in F around inf 72.9%
Taylor expanded in B around 0 48.1%
Taylor expanded in B around 0 46.3%
Final simplification37.5%
(FPCore (F B x) :precision binary64 (if (<= F -5.5e-34) (/ (- -1.0 x) B) (if (<= F 4.6e-41) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.6e-41) {
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.5d-34)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.6d-41) 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.5e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.6e-41) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e-34: tmp = (-1.0 - x) / B elif F <= 4.6e-41: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e-34) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.6e-41) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5e-34) tmp = (-1.0 - x) / B; elseif (F <= 4.6e-41) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e-34], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.6e-41], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.50000000000000014e-34Initial program 62.9%
Taylor expanded in F around -inf 92.8%
Taylor expanded in B around 0 47.6%
mul-1-neg47.6%
distribute-neg-frac247.6%
Simplified47.6%
if -5.50000000000000014e-34 < F < 4.6000000000000002e-41Initial program 99.3%
Taylor expanded in F around -inf 32.4%
Taylor expanded in B around 0 15.2%
mul-1-neg15.2%
distribute-neg-frac215.2%
Simplified15.2%
Taylor expanded in x around inf 38.2%
associate-*r/38.2%
neg-mul-138.2%
Simplified38.2%
if 4.6000000000000002e-41 < F Initial program 60.4%
Taylor expanded in F around inf 72.9%
Taylor expanded in B around 0 48.1%
Taylor expanded in B around 0 46.3%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.42e+137) (/ -1.0 B) (if (<= F 2.5e+253) (/ x (- B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.42e+137) {
tmp = -1.0 / B;
} else if (F <= 2.5e+253) {
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 (f <= (-1.42d+137)) then
tmp = (-1.0d0) / b
else if (f <= 2.5d+253) 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 (F <= -1.42e+137) {
tmp = -1.0 / B;
} else if (F <= 2.5e+253) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.42e+137: tmp = -1.0 / B elif F <= 2.5e+253: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.42e+137) tmp = Float64(-1.0 / B); elseif (F <= 2.5e+253) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.42e+137) tmp = -1.0 / B; elseif (F <= 2.5e+253) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.42e+137], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.5e+253], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.42 \cdot 10^{+137}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+253}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -1.42e137Initial program 35.7%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 44.1%
mul-1-neg44.1%
distribute-neg-frac244.1%
Simplified44.1%
Taylor expanded in x around 0 29.1%
if -1.42e137 < F < 2.4999999999999998e253Initial program 90.2%
Taylor expanded in F around -inf 49.5%
Taylor expanded in B around 0 27.3%
mul-1-neg27.3%
distribute-neg-frac227.3%
Simplified27.3%
Taylor expanded in x around inf 34.4%
associate-*r/34.4%
neg-mul-134.4%
Simplified34.4%
if 2.4999999999999998e253 < F Initial program 22.6%
Taylor expanded in F around -inf 22.2%
Taylor expanded in B around 0 2.4%
mul-1-neg2.4%
distribute-neg-frac22.4%
Simplified2.4%
add-sqr-sqrt1.2%
*-un-lft-identity1.2%
sqrt-unprod9.9%
sqr-neg9.9%
sqrt-unprod21.7%
times-frac21.7%
+-commutative21.7%
Applied egg-rr21.7%
associate-*l/21.7%
*-lft-identity21.7%
Simplified21.7%
Taylor expanded in x around 0 44.4%
Final simplification33.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.45e-281) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.45e-281) {
tmp = -1.0 / 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 (f <= (-2.45d-281)) then
tmp = (-1.0d0) / 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 (F <= -2.45e-281) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.45e-281: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.45e-281) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.45e-281) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.45e-281], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.45 \cdot 10^{-281}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -2.45e-281Initial program 74.4%
Taylor expanded in F around -inf 75.5%
Taylor expanded in B around 0 39.7%
mul-1-neg39.7%
distribute-neg-frac239.7%
Simplified39.7%
Taylor expanded in x around 0 19.8%
if -2.45e-281 < F Initial program 76.6%
Taylor expanded in F around -inf 38.7%
Taylor expanded in B around 0 17.7%
mul-1-neg17.7%
distribute-neg-frac217.7%
Simplified17.7%
add-sqr-sqrt8.5%
*-un-lft-identity8.5%
sqrt-unprod12.6%
sqr-neg12.6%
sqrt-unprod10.5%
times-frac10.4%
+-commutative10.4%
Applied egg-rr10.4%
associate-*l/10.5%
*-lft-identity10.5%
Simplified10.5%
Taylor expanded in x around 0 15.7%
Final simplification17.9%
(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 75.5%
Taylor expanded in F around -inf 58.2%
Taylor expanded in B around 0 29.4%
mul-1-neg29.4%
distribute-neg-frac229.4%
Simplified29.4%
Taylor expanded in x around 0 11.9%
Final simplification11.9%
herbie shell --seed 2024077
(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))))))