
(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 27 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 -1.7e+16)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2e+90)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) t_0)
(+ (/ 1.0 (sin B)) (/ -1.0 (/ (tan B) x)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.7e+16) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2e+90) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) + (-1.0 / (tan(B) / x));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.7e+16) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2e+90) 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)) + Float64(-1.0 / Float64(tan(B) / x))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.7e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e+90], 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] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+90}:\\
\;\;\;\;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} + \frac{-1}{\frac{\tan B}{x}}\\
\end{array}
\end{array}
if F < -1.7e16Initial program 52.5%
Simplified67.4%
Taylor expanded in F around -inf 99.7%
if -1.7e16 < F < 1.99999999999999993e90Initial program 98.6%
Simplified99.6%
if 1.99999999999999993e90 < F Initial program 44.5%
Simplified64.0%
Taylor expanded in F around inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+19)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.2e+63)
(- (/ (/ F (sin B)) (sqrt (fma 2.0 x (fma F F 2.0)))) t_0)
(+ (/ 1.0 (sin B)) (/ -1.0 (/ (tan B) x)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+19) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.2e+63) {
tmp = ((F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) + (-1.0 / (tan(B) / x));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+19) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.2e+63) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(2.0, x, fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) + Float64(-1.0 / Float64(tan(B) / x))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.2e+63], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+19}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{+63}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} + \frac{-1}{\frac{\tan B}{x}}\\
\end{array}
\end{array}
if F < -5e19Initial program 52.5%
Simplified67.4%
Taylor expanded in F around -inf 99.7%
if -5e19 < F < 3.20000000000000011e63Initial program 99.3%
Simplified99.5%
clear-num99.4%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
sub-neg99.5%
div-inv99.5%
fma-define99.5%
fma-undefine99.5%
+-commutative99.5%
pow-flip99.5%
metadata-eval99.5%
pow1/299.5%
+-commutative99.5%
fma-undefine99.5%
fma-define99.5%
Applied egg-rr99.5%
sub-neg99.5%
associate-/r*99.5%
Simplified99.5%
if 3.20000000000000011e63 < F Initial program 48.0%
Simplified67.5%
Taylor expanded in F around inf 99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5e+69)
(- (/ F (* (sin B) (- F))) t_0)
(if (<= F 20000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5e+69) {
tmp = (F / (sin(B) * -F)) - t_0;
} else if (F <= 20000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5e+69) tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_0); elseif (F <= 20000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5e+69], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{+69}:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_0\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.49999999999999992e69Initial program 44.5%
Simplified59.9%
clear-num59.9%
un-div-inv59.9%
fma-define59.9%
fma-undefine59.9%
*-commutative59.9%
fma-define59.9%
fma-define59.9%
Applied egg-rr59.9%
Taylor expanded in F around -inf 99.7%
associate-*r*99.7%
neg-mul-199.7%
Simplified99.7%
if -1.49999999999999992e69 < F < 2e7Initial program 98.0%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
if 2e7 < F Initial program 57.8%
Simplified73.6%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
sub-div99.8%
Applied egg-rr99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.65e+16)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 106000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ -1.0 (/ (tan B) x)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e+16) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 106000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (tan(B) / x));
} else {
tmp = (1.0 - (x * cos(B))) / 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.65d+16)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 106000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + ((-1.0d0) / (tan(b) / x))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e+16) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 106000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (Math.tan(B) / x));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.65e+16: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 106000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (math.tan(B) / x)) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.65e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 106000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(-1.0 / Float64(tan(B) / x))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.65e+16) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 106000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (-1.0 / (tan(B) / x)); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.65e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 106000000.0], 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[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 106000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.65e16Initial program 52.5%
Simplified67.4%
Taylor expanded in F around -inf 99.7%
if -1.65e16 < F < 1.06e8Initial program 99.3%
div-inv99.5%
neg-mul-199.5%
clear-num99.3%
un-div-inv99.3%
Applied egg-rr99.3%
if 1.06e8 < F Initial program 57.8%
Simplified73.6%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
sub-div99.8%
Applied egg-rr99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -50000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.2)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.2) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / 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 = x / tan(b)
if (f <= (-50000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.2d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(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 tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.2) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -50000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.2: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -50000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.2) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -50000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.2) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -50000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.2], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -50000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6.2:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -5e7Initial program 53.1%
Simplified67.8%
Taylor expanded in F around -inf 99.7%
if -5e7 < F < 6.20000000000000018Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
if 6.20000000000000018 < F Initial program 58.4%
Simplified74.0%
Taylor expanded in F around inf 98.7%
associate-*l/98.7%
*-commutative98.7%
Simplified98.7%
associate-*r/98.7%
sub-div98.7%
Applied egg-rr98.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -50000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6.2)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6.2) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / 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 = x / tan(b)
if (f <= (-50000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6.2d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(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 tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6.2) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -50000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6.2: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -50000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6.2) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -50000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6.2) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -50000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6.2], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -50000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6.2:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -5e7Initial program 53.1%
Simplified67.8%
Taylor expanded in F around -inf 99.7%
if -5e7 < F < 6.20000000000000018Initial program 99.3%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
if 6.20000000000000018 < F Initial program 58.4%
Simplified74.0%
Taylor expanded in F around inf 98.7%
associate-*l/98.7%
*-commutative98.7%
Simplified98.7%
associate-*r/98.7%
sub-div98.7%
Applied egg-rr98.7%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -50000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / 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 = x / tan(b)
if (f <= (-50000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(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 tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -50000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -50000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -50000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -50000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -50000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -5e7Initial program 53.1%
Simplified67.8%
Taylor expanded in F around -inf 99.7%
if -5e7 < F < 1.3999999999999999Initial program 99.3%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in x around 0 99.2%
if 1.3999999999999999 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
associate-*l/98.5%
*-commutative98.5%
Simplified98.5%
associate-*r/98.5%
sub-div98.5%
Applied egg-rr98.5%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -19000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.2e-76)
t_0
(if (<= F 1.75e-181)
(- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) t_1)
(if (<= F 3300000.0) t_0 (/ (- 1.0 (* x (cos B))) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -19000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.2e-76) {
tmp = t_0;
} else if (F <= 1.75e-181) {
tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_1;
} else if (F <= 3300000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / 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) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-19000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.2d-76)) then
tmp = t_0
else if (f <= 1.75d-181) then
tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - t_1
else if (f <= 3300000.0d0) then
tmp = t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -19000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.2e-76) {
tmp = t_0;
} else if (F <= 1.75e-181) {
tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - t_1;
} else if (F <= 3300000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -19000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.2e-76: tmp = t_0 elif F <= 1.75e-181: tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - t_1 elif F <= 3300000.0: tmp = t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -19000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.2e-76) tmp = t_0; elseif (F <= 1.75e-181) tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_1); elseif (F <= 3300000.0) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -19000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.2e-76) tmp = t_0; elseif (F <= 1.75e-181) tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_1; elseif (F <= 3300000.0) tmp = t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -19000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.2e-76], t$95$0, If[LessEqual[F, 1.75e-181], N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 3300000.0], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -19000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-181}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t\_1\\
\mathbf{elif}\;F \leq 3300000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -19000Initial program 53.7%
Simplified68.2%
Taylor expanded in F around -inf 99.7%
if -19000 < F < -4.19999999999999985e-76 or 1.74999999999999998e-181 < F < 3.3e6Initial program 99.3%
Taylor expanded in B around 0 86.1%
associate-*r/86.1%
neg-mul-186.1%
Simplified86.1%
if -4.19999999999999985e-76 < F < 1.74999999999999998e-181Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 86.8%
if 3.3e6 < F Initial program 57.8%
Simplified73.6%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
associate-*r/99.8%
sub-div99.8%
Applied egg-rr99.8%
Final simplification93.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00012)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -5e-77)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F 7.6e-55)
(- (/ F (* B (sqrt (+ 2.0 (* x 2.0))))) t_0)
(if (<= F 0.00026)
(/ (* F (sqrt 0.5)) (sin B))
(/ (- 1.0 (* x (cos B))) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.00012) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -5e-77) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= 7.6e-55) {
tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.00026) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 - (x * cos(B))) / 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 = x / tan(b)
if (f <= (-0.00012d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-5d-77)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= 7.6d-55) then
tmp = (f / (b * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else if (f <= 0.00026d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 - (x * cos(b))) / sin(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 tmp;
if (F <= -0.00012) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -5e-77) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= 7.6e-55) {
tmp = (F / (B * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else if (F <= 0.00026) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.00012: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -5e-77: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= 7.6e-55: tmp = (F / (B * math.sqrt((2.0 + (x * 2.0))))) - t_0 elif F <= 0.00026: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00012) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -5e-77) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= 7.6e-55) tmp = Float64(Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); elseif (F <= 0.00026) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.00012) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -5e-77) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= 7.6e-55) tmp = (F / (B * sqrt((2.0 + (x * 2.0))))) - t_0; elseif (F <= 0.00026) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00012], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -5e-77], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e-55], N[(N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00026], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00012:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-77}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{elif}\;F \leq 0.00026:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.20000000000000003e-4Initial program 53.7%
Simplified68.2%
Taylor expanded in F around -inf 99.7%
if -1.20000000000000003e-4 < F < -4.99999999999999963e-77Initial program 99.2%
Simplified99.4%
clear-num99.1%
un-div-inv99.2%
fma-define99.2%
fma-undefine99.2%
*-commutative99.2%
fma-define99.2%
fma-define99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 76.5%
associate-*l/76.6%
*-lft-identity76.6%
times-frac76.6%
/-rgt-identity76.6%
+-commutative76.6%
unpow276.6%
fma-undefine76.6%
Simplified76.6%
associate-*r/76.6%
sqrt-div76.8%
metadata-eval76.8%
un-div-inv76.8%
Applied egg-rr76.8%
associate-/l/76.7%
Simplified76.7%
Taylor expanded in F around 0 75.5%
if -4.99999999999999963e-77 < F < 7.5999999999999993e-55Initial program 99.3%
Simplified99.6%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in B around 0 82.3%
if 7.5999999999999993e-55 < F < 2.59999999999999977e-4Initial program 99.5%
Simplified99.5%
clear-num99.3%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 88.8%
associate-*l/89.1%
*-lft-identity89.1%
times-frac88.8%
/-rgt-identity88.8%
+-commutative88.8%
unpow288.8%
fma-undefine88.8%
Simplified88.8%
Taylor expanded in F around 0 87.2%
if 2.59999999999999977e-4 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
associate-*l/98.5%
*-commutative98.5%
Simplified98.5%
associate-*r/98.5%
sub-div98.5%
Applied egg-rr98.5%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (cos B))))
(if (<= F -5.2e-6)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2e-81)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F 5e-179)
(/ t_0 (- (sin B)))
(if (<= F 1.5e-5)
(/ (* F (sqrt 0.5)) (sin B))
(/ (- 1.0 t_0) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = x * cos(B);
double tmp;
if (F <= -5.2e-6) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2e-81) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= 5e-179) {
tmp = t_0 / -sin(B);
} else if (F <= 1.5e-5) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 - t_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 = x * cos(b)
if (f <= (-5.2d-6)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2d-81)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= 5d-179) then
tmp = t_0 / -sin(b)
else if (f <= 1.5d-5) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 - t_0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * Math.cos(B);
double tmp;
if (F <= -5.2e-6) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2e-81) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= 5e-179) {
tmp = t_0 / -Math.sin(B);
} else if (F <= 1.5e-5) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 - t_0) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x * math.cos(B) tmp = 0 if F <= -5.2e-6: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2e-81: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= 5e-179: tmp = t_0 / -math.sin(B) elif F <= 1.5e-5: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 - t_0) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x * cos(B)) tmp = 0.0 if (F <= -5.2e-6) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2e-81) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= 5e-179) tmp = Float64(t_0 / Float64(-sin(B))); elseif (F <= 1.5e-5) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 - t_0) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * cos(B); tmp = 0.0; if (F <= -5.2e-6) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2e-81) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= 5e-179) tmp = t_0 / -sin(B); elseif (F <= 1.5e-5) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 - t_0) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.2e-6], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-81], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-179], N[(t$95$0 / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.5e-5], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t$95$0), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \cos B\\
\mathbf{if}\;F \leq -5.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-81}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-179}:\\
\;\;\;\;\frac{t\_0}{-\sin B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - t\_0}{\sin B}\\
\end{array}
\end{array}
if F < -5.20000000000000019e-6Initial program 53.7%
Simplified68.2%
Taylor expanded in F around -inf 99.7%
if -5.20000000000000019e-6 < F < -1.9999999999999999e-81Initial program 99.2%
Simplified99.4%
clear-num99.1%
un-div-inv99.2%
fma-define99.2%
fma-undefine99.2%
*-commutative99.2%
fma-define99.2%
fma-define99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 76.5%
associate-*l/76.6%
*-lft-identity76.6%
times-frac76.6%
/-rgt-identity76.6%
+-commutative76.6%
unpow276.6%
fma-undefine76.6%
Simplified76.6%
associate-*r/76.6%
sqrt-div76.8%
metadata-eval76.8%
un-div-inv76.8%
Applied egg-rr76.8%
associate-/l/76.7%
Simplified76.7%
Taylor expanded in F around 0 75.5%
if -1.9999999999999999e-81 < F < 4.9999999999999998e-179Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 80.7%
mul-1-neg80.7%
distribute-frac-neg280.7%
Simplified80.7%
if 4.9999999999999998e-179 < F < 1.50000000000000004e-5Initial program 99.3%
Simplified99.6%
clear-num99.4%
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 x around 0 62.7%
associate-*l/62.8%
*-lft-identity62.8%
times-frac62.7%
/-rgt-identity62.7%
+-commutative62.7%
unpow262.7%
fma-undefine62.7%
Simplified62.7%
Taylor expanded in F around 0 62.3%
if 1.50000000000000004e-5 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
associate-*l/98.5%
*-commutative98.5%
Simplified98.5%
associate-*r/98.5%
sub-div98.5%
Applied egg-rr98.5%
Final simplification88.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.3e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -4.5e-82)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F 5e-179)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 2.95e-6)
(/ (* F (sqrt 0.5)) (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 <= -2.3e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -4.5e-82) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= 5e-179) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 2.95e-6) {
tmp = (F * sqrt(0.5)) / 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 <= (-2.3d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-4.5d-82)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= 5d-179) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 2.95d-6) then
tmp = (f * sqrt(0.5d0)) / 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 <= -2.3e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -4.5e-82) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= 5e-179) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 2.95e-6) {
tmp = (F * Math.sqrt(0.5)) / 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 <= -2.3e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -4.5e-82: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= 5e-179: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 2.95e-6: tmp = (F * math.sqrt(0.5)) / 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 <= -2.3e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -4.5e-82) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= 5e-179) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 2.95e-6) tmp = Float64(Float64(F * sqrt(0.5)) / 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 <= -2.3e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -4.5e-82) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= 5e-179) tmp = (x * cos(B)) / -sin(B); elseif (F <= 2.95e-6) tmp = (F * sqrt(0.5)) / 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, -2.3e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.5e-82], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-179], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.95e-6], N[(N[(F * N[Sqrt[0.5], $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 -2.3 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-82}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-179}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.3e-5Initial program 53.7%
Simplified68.2%
Taylor expanded in F around -inf 99.7%
if -2.3e-5 < F < -4.4999999999999998e-82Initial program 99.2%
Simplified99.4%
clear-num99.1%
un-div-inv99.2%
fma-define99.2%
fma-undefine99.2%
*-commutative99.2%
fma-define99.2%
fma-define99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 76.5%
associate-*l/76.6%
*-lft-identity76.6%
times-frac76.6%
/-rgt-identity76.6%
+-commutative76.6%
unpow276.6%
fma-undefine76.6%
Simplified76.6%
associate-*r/76.6%
sqrt-div76.8%
metadata-eval76.8%
un-div-inv76.8%
Applied egg-rr76.8%
associate-/l/76.7%
Simplified76.7%
Taylor expanded in F around 0 75.5%
if -4.4999999999999998e-82 < F < 4.9999999999999998e-179Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 80.7%
mul-1-neg80.7%
distribute-frac-neg280.7%
Simplified80.7%
if 4.9999999999999998e-179 < F < 2.95000000000000013e-6Initial program 99.3%
Simplified99.6%
clear-num99.4%
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 x around 0 62.7%
associate-*l/62.8%
*-lft-identity62.8%
times-frac62.7%
/-rgt-identity62.7%
+-commutative62.7%
unpow262.7%
fma-undefine62.7%
Simplified62.7%
Taylor expanded in F around 0 62.3%
if 2.95000000000000013e-6 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
(FPCore (F B x)
:precision binary64
(if (<= F -0.000116)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.6e-70)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F 5e-179)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 0.049)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.000116) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.6e-70) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= 5e-179) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 0.049) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.000116d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.6d-70)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= 5d-179) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 0.049d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.000116) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.6e-70) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= 5e-179) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 0.049) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.000116: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.6e-70: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= 5e-179: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 0.049: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.000116) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.6e-70) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= 5e-179) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 0.049) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.000116) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.6e-70) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= 5e-179) tmp = (x * cos(B)) / -sin(B); elseif (F <= 0.049) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.000116], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.6e-70], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-179], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.049], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.000116:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-70}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-179}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.049:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.16e-4Initial program 53.7%
Simplified68.2%
Taylor expanded in F around -inf 99.7%
if -1.16e-4 < F < -1.5999999999999999e-70Initial program 99.2%
Simplified99.4%
clear-num99.1%
un-div-inv99.2%
fma-define99.2%
fma-undefine99.2%
*-commutative99.2%
fma-define99.2%
fma-define99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 76.5%
associate-*l/76.6%
*-lft-identity76.6%
times-frac76.6%
/-rgt-identity76.6%
+-commutative76.6%
unpow276.6%
fma-undefine76.6%
Simplified76.6%
associate-*r/76.6%
sqrt-div76.8%
metadata-eval76.8%
un-div-inv76.8%
Applied egg-rr76.8%
associate-/l/76.7%
Simplified76.7%
Taylor expanded in F around 0 75.5%
if -1.5999999999999999e-70 < F < 4.9999999999999998e-179Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 80.7%
mul-1-neg80.7%
distribute-frac-neg280.7%
Simplified80.7%
if 4.9999999999999998e-179 < F < 0.049000000000000002Initial program 99.3%
Simplified99.6%
clear-num99.4%
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 x around 0 62.7%
associate-*l/62.8%
*-lft-identity62.8%
times-frac62.7%
/-rgt-identity62.7%
+-commutative62.7%
unpow262.7%
fma-undefine62.7%
Simplified62.7%
Taylor expanded in F around 0 62.3%
if 0.049000000000000002 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
Taylor expanded in B around 0 85.4%
(FPCore (F B x)
:precision binary64
(if (<= F -50000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.4e-74)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F 5e-179)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 0.00195)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.4e-74) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= 5e-179) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 0.00195) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-50000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.4d-74)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= 5d-179) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 0.00195d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.4e-74) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= 5e-179) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 0.00195) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -50000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.4e-74: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= 5e-179: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 0.00195: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -50000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.4e-74) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= 5e-179) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 0.00195) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -50000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.4e-74) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= 5e-179) tmp = (x * cos(B)) / -sin(B); elseif (F <= 0.00195) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -50000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.4e-74], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-179], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.00195], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -50000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-179}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 0.00195:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5e7Initial program 53.1%
Simplified67.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.0%
if -5e7 < F < -1.39999999999999994e-74Initial program 99.3%
Simplified99.3%
clear-num99.1%
un-div-inv99.1%
fma-define99.1%
fma-undefine99.1%
*-commutative99.1%
fma-define99.1%
fma-define99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 72.0%
associate-*l/72.1%
*-lft-identity72.1%
times-frac72.1%
/-rgt-identity72.1%
+-commutative72.1%
unpow272.1%
fma-undefine72.1%
Simplified72.1%
associate-*r/72.1%
sqrt-div72.3%
metadata-eval72.3%
un-div-inv72.3%
Applied egg-rr72.3%
associate-/l/72.2%
Simplified72.2%
Taylor expanded in F around 0 71.1%
if -1.39999999999999994e-74 < F < 4.9999999999999998e-179Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 80.7%
mul-1-neg80.7%
distribute-frac-neg280.7%
Simplified80.7%
if 4.9999999999999998e-179 < F < 0.0019499999999999999Initial program 99.3%
Simplified99.6%
clear-num99.4%
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 x around 0 62.7%
associate-*l/62.8%
*-lft-identity62.8%
times-frac62.7%
/-rgt-identity62.7%
+-commutative62.7%
unpow262.7%
fma-undefine62.7%
Simplified62.7%
Taylor expanded in F around 0 62.3%
if 0.0019499999999999999 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
Taylor expanded in B around 0 85.4%
(FPCore (F B x)
:precision binary64
(if (<= F -50000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.5e-83)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F 2.45e-179)
(/ (- x) (tan B))
(if (<= F 0.122)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.5e-83) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= 2.45e-179) {
tmp = -x / tan(B);
} else if (F <= 0.122) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-50000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.5d-83)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= 2.45d-179) then
tmp = -x / tan(b)
else if (f <= 0.122d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.5e-83) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= 2.45e-179) {
tmp = -x / Math.tan(B);
} else if (F <= 0.122) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -50000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.5e-83: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= 2.45e-179: tmp = -x / math.tan(B) elif F <= 0.122: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -50000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.5e-83) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= 2.45e-179) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.122) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -50000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.5e-83) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= 2.45e-179) tmp = -x / tan(B); elseif (F <= 0.122) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -50000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.5e-83], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e-179], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.122], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -50000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{-83}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{-179}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.122:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5e7Initial program 53.1%
Simplified67.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.0%
if -5e7 < F < -6.5e-83Initial program 99.3%
Simplified99.3%
clear-num99.1%
un-div-inv99.1%
fma-define99.1%
fma-undefine99.1%
*-commutative99.1%
fma-define99.1%
fma-define99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 72.0%
associate-*l/72.1%
*-lft-identity72.1%
times-frac72.1%
/-rgt-identity72.1%
+-commutative72.1%
unpow272.1%
fma-undefine72.1%
Simplified72.1%
associate-*r/72.1%
sqrt-div72.3%
metadata-eval72.3%
un-div-inv72.3%
Applied egg-rr72.3%
associate-/l/72.2%
Simplified72.2%
Taylor expanded in F around 0 71.1%
if -6.5e-83 < F < 2.45e-179Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 80.7%
mul-1-neg80.7%
*-commutative80.7%
associate-*r/80.6%
distribute-rgt-neg-in80.6%
distribute-neg-frac80.6%
Simplified80.6%
*-commutative80.6%
distribute-frac-neg80.6%
distribute-lft-neg-out80.6%
associate-/r/80.6%
tan-quot80.6%
neg-sub080.6%
Applied egg-rr80.6%
neg-sub080.6%
distribute-frac-neg280.6%
Simplified80.6%
if 2.45e-179 < F < 0.122Initial program 99.3%
Simplified99.6%
clear-num99.4%
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 x around 0 62.7%
associate-*l/62.8%
*-lft-identity62.8%
times-frac62.7%
/-rgt-identity62.7%
+-commutative62.7%
unpow262.7%
fma-undefine62.7%
Simplified62.7%
Taylor expanded in F around 0 62.3%
if 0.122 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
Taylor expanded in B around 0 85.4%
Final simplification78.6%
(FPCore (F B x)
:precision binary64
(if (<= F -50000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.9e-80)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F 2.45e-179)
(/ (- x) (tan B))
(if (<= F 5.3e-5)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.9e-80) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= 2.45e-179) {
tmp = -x / tan(B);
} else if (F <= 5.3e-5) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-50000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.9d-80)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= 2.45d-179) then
tmp = -x / tan(b)
else if (f <= 5.3d-5) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.9e-80) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= 2.45e-179) {
tmp = -x / Math.tan(B);
} else if (F <= 5.3e-5) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -50000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.9e-80: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= 2.45e-179: tmp = -x / math.tan(B) elif F <= 5.3e-5: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -50000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.9e-80) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= 2.45e-179) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 5.3e-5) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -50000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.9e-80) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= 2.45e-179) tmp = -x / tan(B); elseif (F <= 5.3e-5) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -50000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.9e-80], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.45e-179], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.3e-5], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -50000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.9 \cdot 10^{-80}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{-179}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{-5}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5e7Initial program 53.1%
Simplified67.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.0%
if -5e7 < F < -1.89999999999999983e-80Initial program 99.3%
Simplified99.3%
clear-num99.1%
un-div-inv99.1%
fma-define99.1%
fma-undefine99.1%
*-commutative99.1%
fma-define99.1%
fma-define99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 72.0%
associate-*l/72.1%
*-lft-identity72.1%
times-frac72.1%
/-rgt-identity72.1%
+-commutative72.1%
unpow272.1%
fma-undefine72.1%
Simplified72.1%
associate-*r/72.1%
sqrt-div72.3%
metadata-eval72.3%
un-div-inv72.3%
Applied egg-rr72.3%
associate-/l/72.2%
Simplified72.2%
Taylor expanded in F around 0 71.1%
if -1.89999999999999983e-80 < F < 2.45e-179Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 80.7%
mul-1-neg80.7%
*-commutative80.7%
associate-*r/80.6%
distribute-rgt-neg-in80.6%
distribute-neg-frac80.6%
Simplified80.6%
*-commutative80.6%
distribute-frac-neg80.6%
distribute-lft-neg-out80.6%
associate-/r/80.6%
tan-quot80.6%
neg-sub080.6%
Applied egg-rr80.6%
neg-sub080.6%
distribute-frac-neg280.6%
Simplified80.6%
if 2.45e-179 < F < 5.3000000000000001e-5Initial program 99.3%
Simplified99.6%
clear-num99.4%
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 x around 0 62.7%
associate-*l/62.8%
*-lft-identity62.8%
times-frac62.7%
/-rgt-identity62.7%
+-commutative62.7%
unpow262.7%
fma-undefine62.7%
Simplified62.7%
Taylor expanded in F around 0 62.3%
associate-/l*62.2%
Simplified62.2%
if 5.3000000000000001e-5 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
Taylor expanded in B around 0 85.4%
Final simplification78.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))))
(if (<= F -50000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.8e-70)
t_0
(if (<= F 5e-179)
(/ (- x) (tan B))
(if (<= F 0.038) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.8e-70) {
tmp = t_0;
} else if (F <= 5e-179) {
tmp = -x / tan(B);
} else if (F <= 0.038) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
if (f <= (-50000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.8d-70)) then
tmp = t_0
else if (f <= 5d-179) then
tmp = -x / tan(b)
else if (f <= 0.038d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double tmp;
if (F <= -50000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.8e-70) {
tmp = t_0;
} else if (F <= 5e-179) {
tmp = -x / Math.tan(B);
} else if (F <= 0.038) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) tmp = 0 if F <= -50000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.8e-70: tmp = t_0 elif F <= 5e-179: tmp = -x / math.tan(B) elif F <= 0.038: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) tmp = 0.0 if (F <= -50000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.8e-70) tmp = t_0; elseif (F <= 5e-179) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 0.038) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); tmp = 0.0; if (F <= -50000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.8e-70) tmp = t_0; elseif (F <= 5e-179) tmp = -x / tan(B); elseif (F <= 0.038) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -50000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.8e-70], t$95$0, If[LessEqual[F, 5e-179], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.038], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -50000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.8 \cdot 10^{-70}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-179}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 0.038:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5e7Initial program 53.1%
Simplified67.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 80.0%
if -5e7 < F < -9.8000000000000001e-70 or 4.9999999999999998e-179 < F < 0.0379999999999999991Initial program 99.3%
Simplified99.5%
clear-num99.3%
un-div-inv99.3%
fma-define99.3%
fma-undefine99.3%
*-commutative99.3%
fma-define99.3%
fma-define99.3%
Applied egg-rr99.3%
Taylor expanded in x around 0 65.6%
associate-*l/65.7%
*-lft-identity65.7%
times-frac65.7%
/-rgt-identity65.7%
+-commutative65.7%
unpow265.7%
fma-undefine65.7%
Simplified65.7%
Taylor expanded in F around 0 65.0%
associate-/l*65.0%
Simplified65.0%
if -9.8000000000000001e-70 < F < 4.9999999999999998e-179Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
fma-define99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 80.7%
mul-1-neg80.7%
*-commutative80.7%
associate-*r/80.6%
distribute-rgt-neg-in80.6%
distribute-neg-frac80.6%
Simplified80.6%
*-commutative80.6%
distribute-frac-neg80.6%
distribute-lft-neg-out80.6%
associate-/r/80.6%
tan-quot80.6%
neg-sub080.6%
Applied egg-rr80.6%
neg-sub080.6%
distribute-frac-neg280.6%
Simplified80.6%
if 0.0379999999999999991 < F Initial program 59.0%
Simplified74.4%
Taylor expanded in F around inf 98.5%
Taylor expanded in B around 0 85.4%
Final simplification78.6%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+35)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 10.5)
(/ (- x) (tan B))
(if (<= F 1.5e+185) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+35) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 10.5) {
tmp = -x / tan(B);
} else if (F <= 1.5e+185) {
tmp = 1.0 / sin(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 <= (-7.2d+35)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 10.5d0) then
tmp = -x / tan(b)
else if (f <= 1.5d+185) then
tmp = 1.0d0 / sin(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 <= -7.2e+35) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 10.5) {
tmp = -x / Math.tan(B);
} else if (F <= 1.5e+185) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+35: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 10.5: tmp = -x / math.tan(B) elif F <= 1.5e+185: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+35) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 10.5) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.5e+185) tmp = Float64(1.0 / sin(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 <= -7.2e+35) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 10.5) tmp = -x / tan(B); elseif (F <= 1.5e+185) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 10.5], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e+185], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10.5:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{+185}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.2000000000000001e35Initial program 49.8%
Simplified65.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 81.3%
if -7.2000000000000001e35 < F < 10.5Initial program 99.3%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 61.4%
mul-1-neg61.4%
*-commutative61.4%
associate-*r/61.3%
distribute-rgt-neg-in61.3%
distribute-neg-frac61.3%
Simplified61.3%
*-commutative61.3%
distribute-frac-neg61.3%
distribute-lft-neg-out61.3%
associate-/r/61.3%
tan-quot61.3%
neg-sub061.3%
Applied egg-rr61.3%
neg-sub061.3%
distribute-frac-neg261.3%
Simplified61.3%
if 10.5 < F < 1.49999999999999997e185Initial program 79.3%
Simplified86.8%
clear-num86.6%
un-div-inv86.8%
fma-define86.8%
fma-undefine86.8%
*-commutative86.8%
fma-define86.8%
fma-define86.8%
Applied egg-rr86.8%
Taylor expanded in x around 0 53.2%
associate-*l/58.3%
*-lft-identity58.3%
times-frac58.2%
/-rgt-identity58.2%
+-commutative58.2%
unpow258.2%
fma-undefine58.2%
Simplified58.2%
associate-*r/58.3%
sqrt-div58.3%
metadata-eval58.3%
un-div-inv58.4%
Applied egg-rr58.4%
associate-/l/58.2%
Simplified58.2%
Taylor expanded in F around inf 68.8%
if 1.49999999999999997e185 < F Initial program 27.9%
Simplified55.4%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 67.1%
Final simplification68.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.1e-69)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 12.6)
(/ (- x) (tan B))
(if (<= F 1.4e+185) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-69) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 12.6) {
tmp = -x / tan(B);
} else if (F <= 1.4e+185) {
tmp = 1.0 / sin(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.1d-69)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 12.6d0) then
tmp = -x / tan(b)
else if (f <= 1.4d+185) then
tmp = 1.0d0 / sin(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.1e-69) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 12.6) {
tmp = -x / Math.tan(B);
} else if (F <= 1.4e+185) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e-69: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 12.6: tmp = -x / math.tan(B) elif F <= 1.4e+185: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e-69) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 12.6) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 1.4e+185) tmp = Float64(1.0 / sin(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.1e-69) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 12.6) tmp = -x / tan(B); elseif (F <= 1.4e+185) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e-69], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12.6], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e+185], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{-69}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 12.6:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{+185}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.1e-69Initial program 61.2%
Simplified73.3%
Taylor expanded in F around -inf 87.6%
Taylor expanded in B around 0 63.3%
if -1.1e-69 < F < 12.5999999999999996Initial program 99.3%
Simplified99.6%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 66.4%
mul-1-neg66.4%
*-commutative66.4%
associate-*r/66.3%
distribute-rgt-neg-in66.3%
distribute-neg-frac66.3%
Simplified66.3%
*-commutative66.3%
distribute-frac-neg66.3%
distribute-lft-neg-out66.3%
associate-/r/66.3%
tan-quot66.3%
neg-sub066.3%
Applied egg-rr66.3%
neg-sub066.3%
distribute-frac-neg266.3%
Simplified66.3%
if 12.5999999999999996 < F < 1.39999999999999991e185Initial program 79.3%
Simplified86.8%
clear-num86.6%
un-div-inv86.8%
fma-define86.8%
fma-undefine86.8%
*-commutative86.8%
fma-define86.8%
fma-define86.8%
Applied egg-rr86.8%
Taylor expanded in x around 0 53.2%
associate-*l/58.3%
*-lft-identity58.3%
times-frac58.2%
/-rgt-identity58.2%
+-commutative58.2%
unpow258.2%
fma-undefine58.2%
Simplified58.2%
associate-*r/58.3%
sqrt-div58.3%
metadata-eval58.3%
un-div-inv58.4%
Applied egg-rr58.4%
associate-/l/58.2%
Simplified58.2%
Taylor expanded in F around inf 68.8%
if 1.39999999999999991e185 < F Initial program 27.9%
Simplified55.4%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 67.1%
Final simplification65.7%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+35)
(/ -1.0 (sin B))
(if (<= F 12.6)
(/ (- x) (tan B))
(if (<= F 2e+184) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+35) {
tmp = -1.0 / sin(B);
} else if (F <= 12.6) {
tmp = -x / tan(B);
} else if (F <= 2e+184) {
tmp = 1.0 / sin(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 <= (-7.2d+35)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 12.6d0) then
tmp = -x / tan(b)
else if (f <= 2d+184) then
tmp = 1.0d0 / sin(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 <= -7.2e+35) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 12.6) {
tmp = -x / Math.tan(B);
} else if (F <= 2e+184) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+35: tmp = -1.0 / math.sin(B) elif F <= 12.6: tmp = -x / math.tan(B) elif F <= 2e+184: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+35) tmp = Float64(-1.0 / sin(B)); elseif (F <= 12.6) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 2e+184) tmp = Float64(1.0 / sin(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 <= -7.2e+35) tmp = -1.0 / sin(B); elseif (F <= 12.6) tmp = -x / tan(B); elseif (F <= 2e+184) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+35], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 12.6], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e+184], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 12.6:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+184}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.2000000000000001e35Initial program 49.8%
Simplified65.5%
clear-num65.5%
un-div-inv65.5%
fma-define65.5%
fma-undefine65.5%
*-commutative65.5%
fma-define65.5%
fma-define65.5%
Applied egg-rr65.5%
Taylor expanded in x around 0 19.0%
associate-*l/22.0%
*-lft-identity22.0%
times-frac22.0%
/-rgt-identity22.0%
+-commutative22.0%
unpow222.0%
fma-undefine22.0%
Simplified22.0%
associate-*r/22.0%
sqrt-div22.0%
metadata-eval22.0%
un-div-inv22.0%
Applied egg-rr22.0%
associate-/l/22.0%
Simplified22.0%
Taylor expanded in F around -inf 55.6%
if -7.2000000000000001e35 < F < 12.5999999999999996Initial program 99.3%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 61.4%
mul-1-neg61.4%
*-commutative61.4%
associate-*r/61.3%
distribute-rgt-neg-in61.3%
distribute-neg-frac61.3%
Simplified61.3%
*-commutative61.3%
distribute-frac-neg61.3%
distribute-lft-neg-out61.3%
associate-/r/61.3%
tan-quot61.3%
neg-sub061.3%
Applied egg-rr61.3%
neg-sub061.3%
distribute-frac-neg261.3%
Simplified61.3%
if 12.5999999999999996 < F < 2.00000000000000003e184Initial program 79.3%
Simplified86.8%
clear-num86.6%
un-div-inv86.8%
fma-define86.8%
fma-undefine86.8%
*-commutative86.8%
fma-define86.8%
fma-define86.8%
Applied egg-rr86.8%
Taylor expanded in x around 0 53.2%
associate-*l/58.3%
*-lft-identity58.3%
times-frac58.2%
/-rgt-identity58.2%
+-commutative58.2%
unpow258.2%
fma-undefine58.2%
Simplified58.2%
associate-*r/58.3%
sqrt-div58.3%
metadata-eval58.3%
un-div-inv58.4%
Applied egg-rr58.4%
associate-/l/58.2%
Simplified58.2%
Taylor expanded in F around inf 68.8%
if 2.00000000000000003e184 < F Initial program 27.9%
Simplified55.4%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 67.1%
Final simplification61.4%
(FPCore (F B x)
:precision binary64
(if (<= F -4.6e-49)
(/ -1.0 (sin B))
(if (<= F 8.5)
(/ x (- B))
(if (<= F 7.5e+176) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.6e-49) {
tmp = -1.0 / sin(B);
} else if (F <= 8.5) {
tmp = x / -B;
} else if (F <= 7.5e+176) {
tmp = 1.0 / sin(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 <= (-4.6d-49)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 8.5d0) then
tmp = x / -b
else if (f <= 7.5d+176) then
tmp = 1.0d0 / sin(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 <= -4.6e-49) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 8.5) {
tmp = x / -B;
} else if (F <= 7.5e+176) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.6e-49: tmp = -1.0 / math.sin(B) elif F <= 8.5: tmp = x / -B elif F <= 7.5e+176: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.6e-49) tmp = Float64(-1.0 / sin(B)); elseif (F <= 8.5) tmp = Float64(x / Float64(-B)); elseif (F <= 7.5e+176) tmp = Float64(1.0 / sin(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 <= -4.6e-49) tmp = -1.0 / sin(B); elseif (F <= 8.5) tmp = x / -B; elseif (F <= 7.5e+176) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.6e-49], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 7.5e+176], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.6 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 8.5:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+176}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.5999999999999998e-49Initial program 60.0%
Simplified72.4%
clear-num72.4%
un-div-inv72.5%
fma-define72.5%
fma-undefine72.5%
*-commutative72.5%
fma-define72.5%
fma-define72.5%
Applied egg-rr72.5%
Taylor expanded in x around 0 27.3%
associate-*l/29.8%
*-lft-identity29.8%
times-frac29.7%
/-rgt-identity29.7%
+-commutative29.7%
unpow229.7%
fma-undefine29.7%
Simplified29.7%
associate-*r/29.8%
sqrt-div29.8%
metadata-eval29.8%
un-div-inv29.8%
Applied egg-rr29.8%
associate-/l/29.8%
Simplified29.8%
Taylor expanded in F around -inf 46.8%
if -4.5999999999999998e-49 < F < 8.5Initial program 99.3%
Simplified99.6%
Taylor expanded in F around inf 31.5%
Taylor expanded in B around 0 20.9%
Taylor expanded in x around inf 34.0%
neg-mul-134.0%
Simplified34.0%
if 8.5 < F < 7.499999999999999e176Initial program 79.3%
Simplified86.8%
clear-num86.6%
un-div-inv86.8%
fma-define86.8%
fma-undefine86.8%
*-commutative86.8%
fma-define86.8%
fma-define86.8%
Applied egg-rr86.8%
Taylor expanded in x around 0 53.2%
associate-*l/58.3%
*-lft-identity58.3%
times-frac58.2%
/-rgt-identity58.2%
+-commutative58.2%
unpow258.2%
fma-undefine58.2%
Simplified58.2%
associate-*r/58.3%
sqrt-div58.3%
metadata-eval58.3%
un-div-inv58.4%
Applied egg-rr58.4%
associate-/l/58.2%
Simplified58.2%
Taylor expanded in F around inf 68.8%
if 7.499999999999999e176 < F Initial program 27.9%
Simplified55.4%
Taylor expanded in F around inf 99.4%
Taylor expanded in B around 0 67.1%
Final simplification46.9%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e+35) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 3e-12) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+35) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3e-12) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+35)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3d-12) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+35) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3e-12) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+35: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3e-12: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+35) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3e-12) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+35) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3e-12) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+35], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-12], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+35}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.2000000000000001e35Initial program 49.8%
Simplified65.5%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 81.3%
if -7.2000000000000001e35 < F < 3.0000000000000001e-12Initial program 99.3%
Simplified99.5%
clear-num99.5%
un-div-inv99.5%
fma-define99.5%
fma-undefine99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 62.0%
mul-1-neg62.0%
*-commutative62.0%
associate-*r/61.9%
distribute-rgt-neg-in61.9%
distribute-neg-frac61.9%
Simplified61.9%
*-commutative61.9%
distribute-frac-neg61.9%
distribute-lft-neg-out61.9%
associate-/r/61.9%
tan-quot61.9%
neg-sub061.9%
Applied egg-rr61.9%
neg-sub061.9%
distribute-frac-neg261.9%
Simplified61.9%
if 3.0000000000000001e-12 < F Initial program 60.2%
Simplified75.2%
Taylor expanded in F around inf 95.9%
Taylor expanded in B around 0 83.2%
Final simplification72.8%
(FPCore (F B x) :precision binary64 (if (<= F -4.8e-49) (/ -1.0 (sin B)) (if (<= F 1.15e-55) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-49) {
tmp = -1.0 / sin(B);
} else if (F <= 1.15e-55) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.8d-49)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.15d-55) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-49) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.15e-55) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-49: tmp = -1.0 / math.sin(B) elif F <= 1.15e-55: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-49) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.15e-55) 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 <= -4.8e-49) tmp = -1.0 / sin(B); elseif (F <= 1.15e-55) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-49], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e-55], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.79999999999999985e-49Initial program 60.0%
Simplified72.4%
clear-num72.4%
un-div-inv72.5%
fma-define72.5%
fma-undefine72.5%
*-commutative72.5%
fma-define72.5%
fma-define72.5%
Applied egg-rr72.5%
Taylor expanded in x around 0 27.3%
associate-*l/29.8%
*-lft-identity29.8%
times-frac29.7%
/-rgt-identity29.7%
+-commutative29.7%
unpow229.7%
fma-undefine29.7%
Simplified29.7%
associate-*r/29.8%
sqrt-div29.8%
metadata-eval29.8%
un-div-inv29.8%
Applied egg-rr29.8%
associate-/l/29.8%
Simplified29.8%
Taylor expanded in F around -inf 46.8%
if -4.79999999999999985e-49 < F < 1.15000000000000006e-55Initial program 99.3%
Simplified99.6%
Taylor expanded in F around inf 31.4%
Taylor expanded in B around 0 20.8%
Taylor expanded in x around inf 35.6%
neg-mul-135.6%
Simplified35.6%
if 1.15000000000000006e-55 < F Initial program 64.4%
Simplified77.8%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 46.6%
Final simplification42.7%
(FPCore (F B x) :precision binary64 (if (<= F -1e-81) (/ (- -1.0 x) B) (if (<= F 3e-55) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e-81) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-55) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1d-81)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3d-55) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1e-81) {
tmp = (-1.0 - x) / B;
} else if (F <= 3e-55) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1e-81: tmp = (-1.0 - x) / B elif F <= 3e-55: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1e-81) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3e-55) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1e-81) tmp = (-1.0 - x) / B; elseif (F <= 3e-55) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1e-81], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3e-55], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{-81}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.9999999999999996e-82Initial program 61.2%
Simplified73.3%
Taylor expanded in F around -inf 87.4%
Taylor expanded in B around 0 43.8%
associate-*r/43.8%
neg-mul-143.8%
distribute-neg-in43.8%
metadata-eval43.8%
unsub-neg43.8%
Simplified43.8%
if -9.9999999999999996e-82 < F < 3.00000000000000016e-55Initial program 99.3%
Simplified99.6%
Taylor expanded in F around inf 31.3%
Taylor expanded in B around 0 20.3%
Taylor expanded in x around inf 35.5%
neg-mul-135.5%
Simplified35.5%
if 3.00000000000000016e-55 < F Initial program 64.4%
Simplified77.8%
Taylor expanded in F around inf 88.8%
Taylor expanded in B around 0 46.6%
Final simplification41.7%
(FPCore (F B x) :precision binary64 (if (or (<= x -6e-70) (not (<= x 1.1e-203))) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -6e-70) || !(x <= 1.1e-203)) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-6d-70)) .or. (.not. (x <= 1.1d-203))) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -6e-70) || !(x <= 1.1e-203)) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -6e-70) or not (x <= 1.1e-203): tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -6e-70) || !(x <= 1.1e-203)) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -6e-70) || ~((x <= 1.1e-203))) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -6e-70], N[Not[LessEqual[x, 1.1e-203]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{-70} \lor \neg \left(x \leq 1.1 \cdot 10^{-203}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -6.0000000000000003e-70 or 1.1e-203 < x Initial program 79.9%
Simplified90.4%
Taylor expanded in F around inf 64.1%
Taylor expanded in B around 0 35.5%
Taylor expanded in x around inf 40.9%
neg-mul-140.9%
Simplified40.9%
if -6.0000000000000003e-70 < x < 1.1e-203Initial program 66.5%
Simplified70.2%
Taylor expanded in F around inf 27.5%
Taylor expanded in B around 0 16.7%
Taylor expanded in x around 0 16.7%
Final simplification33.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.06e-80) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-80) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.06d-80)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.06e-80) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.06e-80: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.06e-80) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.06e-80) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.06e-80], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.06 \cdot 10^{-80}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.0600000000000001e-80Initial program 61.2%
Simplified73.3%
Taylor expanded in F around -inf 87.4%
Taylor expanded in B around 0 43.8%
associate-*r/43.8%
neg-mul-143.8%
distribute-neg-in43.8%
metadata-eval43.8%
unsub-neg43.8%
Simplified43.8%
if -1.0600000000000001e-80 < F Initial program 83.5%
Simplified89.7%
Taylor expanded in F around inf 57.4%
Taylor expanded in B around 0 32.3%
Taylor expanded in x around inf 32.0%
neg-mul-132.0%
Simplified32.0%
Final simplification36.2%
(FPCore (F B x) :precision binary64 (if (<= F 1.05e-183) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.05e-183) {
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.05d-183) 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.05e-183) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.05e-183: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.05e-183) 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.05e-183) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.05e-183], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.05 \cdot 10^{-183}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.0500000000000001e-183Initial program 76.7%
Simplified84.0%
clear-num83.9%
un-div-inv84.0%
fma-define84.0%
fma-undefine84.0%
*-commutative84.0%
fma-define84.0%
fma-define84.0%
Applied egg-rr84.0%
Taylor expanded in x around 0 25.3%
associate-*l/26.7%
*-lft-identity26.7%
times-frac26.7%
/-rgt-identity26.7%
+-commutative26.7%
unpow226.7%
fma-undefine26.7%
Simplified26.7%
Taylor expanded in F around -inf 30.0%
Taylor expanded in B around 0 14.3%
if 1.0500000000000001e-183 < F Initial program 73.9%
Simplified83.7%
Taylor expanded in F around inf 71.6%
Taylor expanded in B around 0 38.0%
Taylor expanded in x around 0 17.1%
(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.6%
Simplified83.9%
clear-num83.8%
un-div-inv83.8%
fma-define83.8%
fma-undefine83.8%
*-commutative83.8%
fma-define83.8%
fma-define83.8%
Applied egg-rr83.8%
Taylor expanded in x around 0 32.2%
associate-*l/33.8%
*-lft-identity33.8%
times-frac33.8%
/-rgt-identity33.8%
+-commutative33.8%
unpow233.8%
fma-undefine33.8%
Simplified33.8%
Taylor expanded in F around -inf 18.9%
Taylor expanded in B around 0 9.8%
herbie shell --seed 2024181
(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))))))