
(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 23 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 -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 -112000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.15e-68)
(- (* (/ 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 <= -112000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.15e-68) {
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 <= (-112000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.15d-68)) 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 <= -112000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.15e-68) {
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 <= -112000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.15e-68: 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 <= -112000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.15e-68) 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 <= -112000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.15e-68) 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, -112000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.15e-68], 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 -112000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-68}:\\
\;\;\;\;\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 < -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%
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 -55000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -4.9e-69)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.043)
(- (* (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 <= -55000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -4.9e-69) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.043) {
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 <= (-55000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-4.9d-69)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.043d0) 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 <= -55000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -4.9e-69) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.043) {
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 <= -55000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -4.9e-69: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.043: 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 <= -55000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -4.9e-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.043) 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 <= -55000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -4.9e-69) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.043) 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, -55000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.9e-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.043], 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 -55000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4.9 \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.043:\\
\;\;\;\;\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 < -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.042999999999999997Initial 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.042999999999999997 < 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 -2.7e+96)
t_0
(if (<= F -3.1e+57)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.7e-35)
t_0
(if (<= F 1.9)
(* (- x) (/ (cos B) (sin B)))
(if (or (<= F 4.3e+109) (not (<= F 4.5e+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 <= -2.7e+96) {
tmp = t_0;
} else if (F <= -3.1e+57) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 1.9) {
tmp = -x * (cos(B) / sin(B));
} else if ((F <= 4.3e+109) || !(F <= 4.5e+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 <= (-2.7d+96)) then
tmp = t_0
else if (f <= (-3.1d+57)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.7d-35)) then
tmp = t_0
else if (f <= 1.9d0) then
tmp = -x * (cos(b) / sin(b))
else if ((f <= 4.3d+109) .or. (.not. (f <= 4.5d+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 <= -2.7e+96) {
tmp = t_0;
} else if (F <= -3.1e+57) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 1.9) {
tmp = -x * (Math.cos(B) / Math.sin(B));
} else if ((F <= 4.3e+109) || !(F <= 4.5e+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 <= -2.7e+96: tmp = t_0 elif F <= -3.1e+57: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.7e-35: tmp = t_0 elif F <= 1.9: tmp = -x * (math.cos(B) / math.sin(B)) elif (F <= 4.3e+109) or not (F <= 4.5e+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 <= -2.7e+96) tmp = t_0; elseif (F <= -3.1e+57) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 1.9) tmp = Float64(Float64(-x) * Float64(cos(B) / sin(B))); elseif ((F <= 4.3e+109) || !(F <= 4.5e+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 <= -2.7e+96) tmp = t_0; elseif (F <= -3.1e+57) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 1.9) tmp = -x * (cos(B) / sin(B)); elseif ((F <= 4.3e+109) || ~((F <= 4.5e+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, -2.7e+96], t$95$0, If[LessEqual[F, -3.1e+57], 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.9], N[((-x) * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 4.3e+109], N[Not[LessEqual[F, 4.5e+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 -2.7 \cdot 10^{+96}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{+57}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.9:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+109} \lor \neg \left(F \leq 4.5 \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 < -2.70000000000000022e96 or -3.10000000000000013e57 < 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.70000000000000022e96 < F < -3.10000000000000013e57Initial 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.8999999999999999Initial 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.8999999999999999 < F < 4.3000000000000001e109 or 4.5e243 < 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 4.3000000000000001e109 < F < 4.5e243Initial 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 -3.1e+96)
t_0
(if (<= F -1.12e+60)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -4.6e-36)
t_0
(if (<= F 28.0)
(/ (* x (cos B)) (- (sin B)))
(if (or (<= F 3.05e+108) (not (<= F 7.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 <= -3.1e+96) {
tmp = t_0;
} else if (F <= -1.12e+60) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -4.6e-36) {
tmp = t_0;
} else if (F <= 28.0) {
tmp = (x * cos(B)) / -sin(B);
} else if ((F <= 3.05e+108) || !(F <= 7.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 <= (-3.1d+96)) then
tmp = t_0
else if (f <= (-1.12d+60)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-4.6d-36)) then
tmp = t_0
else if (f <= 28.0d0) then
tmp = (x * cos(b)) / -sin(b)
else if ((f <= 3.05d+108) .or. (.not. (f <= 7.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 <= -3.1e+96) {
tmp = t_0;
} else if (F <= -1.12e+60) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -4.6e-36) {
tmp = t_0;
} else if (F <= 28.0) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if ((F <= 3.05e+108) || !(F <= 7.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 <= -3.1e+96: tmp = t_0 elif F <= -1.12e+60: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -4.6e-36: tmp = t_0 elif F <= 28.0: tmp = (x * math.cos(B)) / -math.sin(B) elif (F <= 3.05e+108) or not (F <= 7.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 <= -3.1e+96) tmp = t_0; elseif (F <= -1.12e+60) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -4.6e-36) tmp = t_0; elseif (F <= 28.0) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif ((F <= 3.05e+108) || !(F <= 7.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 <= -3.1e+96) tmp = t_0; elseif (F <= -1.12e+60) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -4.6e-36) tmp = t_0; elseif (F <= 28.0) tmp = (x * cos(B)) / -sin(B); elseif ((F <= 3.05e+108) || ~((F <= 7.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, -3.1e+96], t$95$0, If[LessEqual[F, -1.12e+60], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.6e-36], t$95$0, If[LessEqual[F, 28.0], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 3.05e+108], N[Not[LessEqual[F, 7.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 -3.1 \cdot 10^{+96}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.12 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-36}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 28:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 3.05 \cdot 10^{+108} \lor \neg \left(F \leq 7.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 < -3.0999999999999998e96 or -1.1199999999999999e60 < F < -4.59999999999999993e-36Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -3.0999999999999998e96 < F < -1.1199999999999999e60Initial 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 -4.59999999999999993e-36 < F < 28Initial program 99.3%
Taylor expanded in F around -inf 34.0%
Taylor expanded in x around inf 70.6%
if 28 < F < 3.0500000000000002e108 or 7.19999999999999989e242 < 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.0500000000000002e108 < F < 7.19999999999999989e242Initial 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.028)
(- (* (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.028) {
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.028d0) 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.028) {
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.028: 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.028) 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.028) 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.028], 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.028:\\
\;\;\;\;\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.0280000000000000006Initial 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.0280000000000000006 < 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 7.1e-37)
(/ (* 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 <= 7.1e-37) {
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 <= 7.1d-37) 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 <= 7.1e-37) {
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 <= 7.1e-37: 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 <= 7.1e-37) 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 <= 7.1e-37) 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, 7.1e-37], 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 7.1 \cdot 10^{-37}:\\
\;\;\;\;\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.09999999999999978e-37Initial program 99.4%
Taylor expanded in F around -inf 32.2%
Taylor expanded in x around inf 72.4%
if 7.09999999999999978e-37 < 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 20.0)
(/ (* x (cos B)) (- (sin B)))
(if (or (<= F 1.55e+109) (not (<= F 8e+242)))
(- (/ 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 <= 20.0) {
tmp = (x * cos(B)) / -sin(B);
} else if ((F <= 1.55e+109) || !(F <= 8e+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) :: tmp
if (f <= (-7.6d-58)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 20.0d0) then
tmp = (x * cos(b)) / -sin(b)
else if ((f <= 1.55d+109) .or. (.not. (f <= 8d+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 tmp;
if (F <= -7.6e-58) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 20.0) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if ((F <= 1.55e+109) || !(F <= 8e+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): tmp = 0 if F <= -7.6e-58: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 20.0: tmp = (x * math.cos(B)) / -math.sin(B) elif (F <= 1.55e+109) or not (F <= 8e+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) tmp = 0.0 if (F <= -7.6e-58) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 20.0) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif ((F <= 1.55e+109) || !(F <= 8e+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) tmp = 0.0; if (F <= -7.6e-58) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 20.0) tmp = (x * cos(B)) / -sin(B); elseif ((F <= 1.55e+109) || ~((F <= 8e+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_] := 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, 20.0], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 1.55e+109], N[Not[LessEqual[F, 8e+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}
\mathbf{if}\;F \leq -7.6 \cdot 10^{-58}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 20:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{+109} \lor \neg \left(F \leq 8 \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 < -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 < 20Initial program 99.3%
Taylor expanded in F around -inf 33.7%
Taylor expanded in x around inf 71.0%
if 20 < F < 1.54999999999999996e109 or 8.00000000000000041e242 < 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.54999999999999996e109 < F < 8.00000000000000041e242Initial 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))))
(if (<= F -8.5e+96)
t_0
(if (<= F -1.05e+60)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3.7e-35)
t_0
(if (<= F 2.35e+39)
(- (/ (/ 1.0 F) (/ B F)) (* x (/ 1.0 (tan B))))
(if (or (<= F 4.3e+109) (not (<= F 3.3e+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 <= -8.5e+96) {
tmp = t_0;
} else if (F <= -1.05e+60) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 2.35e+39) {
tmp = ((1.0 / F) / (B / F)) - (x * (1.0 / tan(B)));
} else if ((F <= 4.3e+109) || !(F <= 3.3e+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 <= (-8.5d+96)) then
tmp = t_0
else if (f <= (-1.05d+60)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3.7d-35)) then
tmp = t_0
else if (f <= 2.35d+39) then
tmp = ((1.0d0 / f) / (b / f)) - (x * (1.0d0 / tan(b)))
else if ((f <= 4.3d+109) .or. (.not. (f <= 3.3d+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 <= -8.5e+96) {
tmp = t_0;
} else if (F <= -1.05e+60) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3.7e-35) {
tmp = t_0;
} else if (F <= 2.35e+39) {
tmp = ((1.0 / F) / (B / F)) - (x * (1.0 / Math.tan(B)));
} else if ((F <= 4.3e+109) || !(F <= 3.3e+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 <= -8.5e+96: tmp = t_0 elif F <= -1.05e+60: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3.7e-35: tmp = t_0 elif F <= 2.35e+39: tmp = ((1.0 / F) / (B / F)) - (x * (1.0 / math.tan(B))) elif (F <= 4.3e+109) or not (F <= 3.3e+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 <= -8.5e+96) tmp = t_0; elseif (F <= -1.05e+60) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 2.35e+39) tmp = Float64(Float64(Float64(1.0 / F) / Float64(B / F)) - Float64(x * Float64(1.0 / tan(B)))); elseif ((F <= 4.3e+109) || !(F <= 3.3e+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 <= -8.5e+96) tmp = t_0; elseif (F <= -1.05e+60) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3.7e-35) tmp = t_0; elseif (F <= 2.35e+39) tmp = ((1.0 / F) / (B / F)) - (x * (1.0 / tan(B))); elseif ((F <= 4.3e+109) || ~((F <= 3.3e+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, -8.5e+96], t$95$0, If[LessEqual[F, -1.05e+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.35e+39], N[(N[(N[(1.0 / F), $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 4.3e+109], N[Not[LessEqual[F, 3.3e+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 -8.5 \cdot 10^{+96}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.05 \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.35 \cdot 10^{+39}:\\
\;\;\;\;\frac{\frac{1}{F}}{\frac{B}{F}} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 4.3 \cdot 10^{+109} \lor \neg \left(F \leq 3.3 \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 < -8.50000000000000025e96 or -1.0500000000000001e60 < F < -3.6999999999999999e-35Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -8.50000000000000025e96 < F < -1.0500000000000001e60Initial 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.35e39Initial 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.35e39 < F < 4.3000000000000001e109 or 3.30000000000000023e242 < 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 4.3000000000000001e109 < F < 3.30000000000000023e242Initial 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 -7.6e+96)
t_1
(if (<= F -2.05e+60)
(- (/ -1.0 B) t_0)
(if (<= F -3.7e-35)
t_1
(if (<= F -2.7e-273)
(- (* (/ F B) (/ -1.0 F)) t_0)
(if (<= F 1.05e-177)
(/ x (- B))
(if (<= F 2.4e+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 <= -7.6e+96) {
tmp = t_1;
} else if (F <= -2.05e+60) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.7e-35) {
tmp = t_1;
} else if (F <= -2.7e-273) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 1.05e-177) {
tmp = x / -B;
} else if (F <= 2.4e+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 <= (-7.6d+96)) then
tmp = t_1
else if (f <= (-2.05d+60)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3.7d-35)) then
tmp = t_1
else if (f <= (-2.7d-273)) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_0
else if (f <= 1.05d-177) then
tmp = x / -b
else if (f <= 2.4d+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 <= -7.6e+96) {
tmp = t_1;
} else if (F <= -2.05e+60) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.7e-35) {
tmp = t_1;
} else if (F <= -2.7e-273) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if (F <= 1.05e-177) {
tmp = x / -B;
} else if (F <= 2.4e+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 <= -7.6e+96: tmp = t_1 elif F <= -2.05e+60: tmp = (-1.0 / B) - t_0 elif F <= -3.7e-35: tmp = t_1 elif F <= -2.7e-273: tmp = ((F / B) * (-1.0 / F)) - t_0 elif F <= 1.05e-177: tmp = x / -B elif F <= 2.4e+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 <= -7.6e+96) tmp = t_1; elseif (F <= -2.05e+60) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3.7e-35) tmp = t_1; elseif (F <= -2.7e-273) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_0); elseif (F <= 1.05e-177) tmp = Float64(x / Float64(-B)); elseif (F <= 2.4e+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 <= -7.6e+96) tmp = t_1; elseif (F <= -2.05e+60) tmp = (-1.0 / B) - t_0; elseif (F <= -3.7e-35) tmp = t_1; elseif (F <= -2.7e-273) tmp = ((F / B) * (-1.0 / F)) - t_0; elseif (F <= 1.05e-177) tmp = x / -B; elseif (F <= 2.4e+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, -7.6e+96], t$95$1, If[LessEqual[F, -2.05e+60], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.7e-35], t$95$1, If[LessEqual[F, -2.7e-273], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.05e-177], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 2.4e+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 -7.6 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{+60}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-273}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t\_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-177}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 2.4 \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 < -7.6000000000000003e96 or -2.05e60 < F < -3.6999999999999999e-35Initial program 58.6%
Taylor expanded in F around -inf 90.9%
Taylor expanded in B around 0 75.7%
if -7.6000000000000003e96 < F < -2.05e60Initial 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.69999999999999984e-273Initial 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 -2.69999999999999984e-273 < F < 1.05e-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.05e-177 < F < 2.4000000000000001e39Initial program 99.3%
Taylor expanded in F around inf 47.7%
Taylor expanded in B around 0 56.4%
if 2.4000000000000001e39 < 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 -2.7e+96)
t_1
(if (<= F -1.55e+60)
t_0
(if (<= F -3.7e-35)
t_1
(if (<= F -5e-235)
t_0
(if (<= F 2.4e-177)
(/ 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 <= -2.7e+96) {
tmp = t_1;
} else if (F <= -1.55e+60) {
tmp = t_0;
} else if (F <= -3.7e-35) {
tmp = t_1;
} else if (F <= -5e-235) {
tmp = t_0;
} else if (F <= 2.4e-177) {
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 <= (-2.7d+96)) then
tmp = t_1
else if (f <= (-1.55d+60)) then
tmp = t_0
else if (f <= (-3.7d-35)) then
tmp = t_1
else if (f <= (-5d-235)) then
tmp = t_0
else if (f <= 2.4d-177) 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 <= -2.7e+96) {
tmp = t_1;
} else if (F <= -1.55e+60) {
tmp = t_0;
} else if (F <= -3.7e-35) {
tmp = t_1;
} else if (F <= -5e-235) {
tmp = t_0;
} else if (F <= 2.4e-177) {
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 <= -2.7e+96: tmp = t_1 elif F <= -1.55e+60: tmp = t_0 elif F <= -3.7e-35: tmp = t_1 elif F <= -5e-235: tmp = t_0 elif F <= 2.4e-177: 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 <= -2.7e+96) tmp = t_1; elseif (F <= -1.55e+60) tmp = t_0; elseif (F <= -3.7e-35) tmp = t_1; elseif (F <= -5e-235) tmp = t_0; elseif (F <= 2.4e-177) 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 <= -2.7e+96) tmp = t_1; elseif (F <= -1.55e+60) tmp = t_0; elseif (F <= -3.7e-35) tmp = t_1; elseif (F <= -5e-235) tmp = t_0; elseif (F <= 2.4e-177) 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, -2.7e+96], t$95$1, If[LessEqual[F, -1.55e+60], t$95$0, If[LessEqual[F, -3.7e-35], t$95$1, If[LessEqual[F, -5e-235], t$95$0, If[LessEqual[F, 2.4e-177], 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 -2.7 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{+60}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.7 \cdot 10^{-35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-235}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-177}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.70000000000000022e96 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.70000000000000022e96 < F < -1.55e60 or -3.6999999999999999e-35 < F < -4.9999999999999998e-235Initial 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 -4.9999999999999998e-235 < F < 2.3999999999999999e-177Initial 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 2.3999999999999999e-177 < 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 -2.4e-234)
t_0
(if (<= F 2.7e-119)
(/ x (- B))
(if (<= F 3.2e+181) 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 <= -2.4e-234) {
tmp = t_0;
} else if (F <= 2.7e-119) {
tmp = x / -B;
} else if (F <= 3.2e+181) {
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 <= (-2.4d-234)) then
tmp = t_0
else if (f <= 2.7d-119) then
tmp = x / -b
else if (f <= 3.2d+181) 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 <= -2.4e-234) {
tmp = t_0;
} else if (F <= 2.7e-119) {
tmp = x / -B;
} else if (F <= 3.2e+181) {
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 <= -2.4e-234: tmp = t_0 elif F <= 2.7e-119: tmp = x / -B elif F <= 3.2e+181: 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 <= -2.4e-234) tmp = t_0; elseif (F <= 2.7e-119) tmp = Float64(x / Float64(-B)); elseif (F <= 3.2e+181) 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 <= -2.4e-234) tmp = t_0; elseif (F <= 2.7e-119) tmp = x / -B; elseif (F <= 3.2e+181) 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, -2.4e-234], t$95$0, If[LessEqual[F, 2.7e-119], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 3.2e+181], 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 -2.4 \cdot 10^{-234}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-119}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{+181}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.3999999999999999e-234 or 2.70000000000000027e-119 < F < 3.2e181Initial 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 -2.3999999999999999e-234 < F < 2.70000000000000027e-119Initial 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 3.2e181 < 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.00028)
t_0
(if (<= x -5e-122)
(/ x (- B))
(if (<= x 1.7e-21) (- (/ -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.00028) {
tmp = t_0;
} else if (x <= -5e-122) {
tmp = x / -B;
} else if (x <= 1.7e-21) {
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.00028d0)) then
tmp = t_0
else if (x <= (-5d-122)) then
tmp = x / -b
else if (x <= 1.7d-21) 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.00028) {
tmp = t_0;
} else if (x <= -5e-122) {
tmp = x / -B;
} else if (x <= 1.7e-21) {
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.00028: tmp = t_0 elif x <= -5e-122: tmp = x / -B elif x <= 1.7e-21: 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.00028) tmp = t_0; elseif (x <= -5e-122) tmp = Float64(x / Float64(-B)); elseif (x <= 1.7e-21) 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.00028) tmp = t_0; elseif (x <= -5e-122) tmp = x / -B; elseif (x <= 1.7e-21) 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.00028], t$95$0, If[LessEqual[x, -5e-122], N[(x / (-B)), $MachinePrecision], If[LessEqual[x, 1.7e-21], 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.00028:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-122}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -2.7999999999999998e-4 or 1.7e-21 < 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.7999999999999998e-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.7e-21Initial 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.46e-34) (/ (- -1.0 x) B) (if (<= F 1.02e+18) (/ x (- B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.46e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.02e+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.46d-34)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.02d+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.46e-34) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.02e+18) {
tmp = x / -B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.46e-34: tmp = (-1.0 - x) / B elif F <= 1.02e+18: tmp = x / -B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.46e-34) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.02e+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.46e-34) tmp = (-1.0 - x) / B; elseif (F <= 1.02e+18) tmp = x / -B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.46e-34], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.02e+18], N[(x / (-B)), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.46 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4599999999999999e-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 -1.4599999999999999e-34 < F < 1.02e18Initial 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.02e18 < 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.26e+138) (/ -1.0 B) (if (<= F 1.1e-41) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.26e+138) {
tmp = -1.0 / B;
} else if (F <= 1.1e-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.26d+138)) then
tmp = (-1.0d0) / b
else if (f <= 1.1d-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.26e+138) {
tmp = -1.0 / B;
} else if (F <= 1.1e-41) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.26e+138: tmp = -1.0 / B elif F <= 1.1e-41: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.26e+138) tmp = Float64(-1.0 / B); elseif (F <= 1.1e-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.26e+138) tmp = -1.0 / B; elseif (F <= 1.1e-41) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.26e+138], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.1e-41], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.26 \cdot 10^{+138}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.25999999999999994e138Initial 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.25999999999999994e138 < F < 1.1e-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.1e-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 -6e-32) (/ (- -1.0 x) B) (if (<= F 6.6e-37) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-32) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.6e-37) {
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 <= (-6d-32)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 6.6d-37) 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 <= -6e-32) {
tmp = (-1.0 - x) / B;
} else if (F <= 6.6e-37) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-32: tmp = (-1.0 - x) / B elif F <= 6.6e-37: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-32) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 6.6e-37) 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 <= -6e-32) tmp = (-1.0 - x) / B; elseif (F <= 6.6e-37) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-32], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6.6e-37], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6.0000000000000001e-32Initial 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 -6.0000000000000001e-32 < F < 6.59999999999999964e-37Initial 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 6.59999999999999964e-37 < 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 -7.8e+137) (/ -1.0 B) (if (<= F 2.05e+257) (/ x (- B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e+137) {
tmp = -1.0 / B;
} else if (F <= 2.05e+257) {
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 <= (-7.8d+137)) then
tmp = (-1.0d0) / b
else if (f <= 2.05d+257) 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 <= -7.8e+137) {
tmp = -1.0 / B;
} else if (F <= 2.05e+257) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.8e+137: tmp = -1.0 / B elif F <= 2.05e+257: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.8e+137) tmp = Float64(-1.0 / B); elseif (F <= 2.05e+257) 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 <= -7.8e+137) tmp = -1.0 / B; elseif (F <= 2.05e+257) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.8e+137], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.05e+257], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.8 \cdot 10^{+137}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+257}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -7.80000000000000059e137Initial 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 -7.80000000000000059e137 < F < 2.0500000000000001e257Initial 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.0500000000000001e257 < 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 -1.25e-287) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-287) {
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 <= (-1.25d-287)) 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 <= -1.25e-287) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e-287: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e-287) 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 <= -1.25e-287) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-287], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-287}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -1.25000000000000006e-287Initial 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 -1.25000000000000006e-287 < 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))))))