
(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 22 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.35e+154)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 10000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.35e+154) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 10000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.35e+154) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 10000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35e+154], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 10000000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 10000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.35000000000000003e154Initial program 41.1%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.7%
associate-/l*99.8%
Simplified99.8%
if -1.35000000000000003e154 < F < 1e7Initial program 98.2%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.5%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if 1e7 < F Initial program 58.4%
Simplified76.0%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -10000000000.0)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 116000000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -10000000000.0) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 116000000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-10000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 116000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -10000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 116000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -10000000000.0: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 116000000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -10000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 116000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -10000000000.0) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 116000000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -10000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 116000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -10000000000:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 116000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1e10Initial program 66.4%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around 0 99.8%
associate-/l*99.8%
Simplified99.8%
if -1e10 < F < 1.16e8Initial program 99.5%
if 1.16e8 < F Initial program 58.4%
Simplified76.0%
Taylor expanded in x around 0 75.9%
associate-*l/76.0%
*-lft-identity76.0%
+-commutative76.0%
unpow276.0%
fma-undefine76.0%
Simplified76.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 8.2e-6)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 8.2e-6) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 8.2d-6) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 8.2e-6) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 8.2e-6: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 8.2e-6) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 8.2e-6) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 67.7%
Taylor expanded in F around -inf 99.2%
if -1.44999999999999996 < F < 8.1999999999999994e-6Initial program 99.5%
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%
Taylor expanded in F around 0 99.0%
if 8.1999999999999994e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 8.2e-6)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 8.2e-6) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 8.2d-6) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 8.2e-6) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 8.2e-6: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 8.2e-6) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 8.2e-6) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 67.7%
Taylor expanded in F around -inf 99.2%
if -1.44999999999999996 < F < 8.1999999999999994e-6Initial program 99.5%
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%
Taylor expanded in F around 0 99.0%
clear-num98.9%
un-div-inv99.0%
Applied egg-rr99.0%
if 8.1999999999999994e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 8.2e-6)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 8.2e-6) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.5d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 8.2d-6) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.5) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 8.2e-6) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.5: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 8.2e-6: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 8.2e-6) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.5) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 8.2e-6) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.5Initial program 67.7%
Taylor expanded in F around -inf 99.2%
if -1.5 < F < 8.1999999999999994e-6Initial program 99.5%
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%
associate-*r/99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.0%
if 8.1999999999999994e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.45)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 8.2e-6)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 8.2e-6) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 8.2d-6) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 8.2e-6) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 8.2e-6: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 8.2e-6) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 8.2e-6) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 67.7%
Taylor expanded in F around -inf 99.2%
Taylor expanded in x around 0 99.2%
associate-/l*99.2%
Simplified99.2%
if -1.44999999999999996 < F < 8.1999999999999994e-6Initial program 99.5%
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%
associate-*r/99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in F around 0 99.0%
if 8.1999999999999994e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e-15)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 1.35e-66)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 8.2e-6)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e-15) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 1.35e-66) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 8.2e-6) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3d-15)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 1.35d-66) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 8.2d-6) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3e-15) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 1.35e-66) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 8.2e-6) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3e-15: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 1.35e-66: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 8.2e-6: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3e-15) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 1.35e-66) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 8.2e-6) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3e-15) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 1.35e-66) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 8.2e-6) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-66], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.2e-6], 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], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-66}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3e-15Initial program 68.1%
Taylor expanded in F around -inf 98.0%
if -3e-15 < F < 1.34999999999999998e-66Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 84.1%
if 1.34999999999999998e-66 < F < 8.1999999999999994e-6Initial program 99.5%
Taylor expanded in B around 0 89.6%
if 8.1999999999999994e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification93.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (t_1 (/ x (tan B))))
(if (<= F -30000000.0)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 7.5e-68)
(- (* t_0 (/ F B)) t_1)
(if (<= F 8.2e-6)
(- (* (/ F (sin B)) t_0) (/ x B))
(- (/ 1.0 (sin B)) t_1))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -30000000.0) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 7.5e-68) {
tmp = (t_0 * (F / B)) - t_1;
} else if (F <= 8.2e-6) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
if (f <= (-30000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 7.5d-68) then
tmp = (t_0 * (f / b)) - t_1
else if (f <= 8.2d-6) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -30000000.0) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 7.5e-68) {
tmp = (t_0 * (F / B)) - t_1;
} else if (F <= 8.2e-6) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -30000000.0: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 7.5e-68: tmp = (t_0 * (F / B)) - t_1 elif F <= 8.2e-6: tmp = ((F / math.sin(B)) * t_0) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -30000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 7.5e-68) tmp = Float64(Float64(t_0 * Float64(F / B)) - t_1); elseif (F <= 8.2e-6) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); tmp = 0.0; if (F <= -30000000.0) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 7.5e-68) tmp = (t_0 * (F / B)) - t_1; elseif (F <= 8.2e-6) tmp = ((F / sin(B)) * t_0) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -30000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e-68], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -30000000:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{-68}:\\
\;\;\;\;t\_0 \cdot \frac{F}{B} - t\_1\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -3e7Initial program 66.8%
Taylor expanded in F around -inf 99.8%
if -3e7 < F < 7.50000000000000081e-68Initial program 99.5%
div-inv99.6%
clear-num99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 83.4%
*-un-lft-identity83.4%
clear-num83.5%
Applied egg-rr83.5%
*-lft-identity83.5%
Simplified83.5%
if 7.50000000000000081e-68 < F < 8.1999999999999994e-6Initial program 99.5%
Taylor expanded in B around 0 89.6%
if 8.1999999999999994e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification93.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.2e+144)
(- (/ -1.0 B) t_0)
(if (<= F -0.054)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.3e-27)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 5.4e-67)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 7.6e-6)
(* (/ F (sin B)) (sqrt 0.5))
(- (/ 1.0 (sin B)) t_0))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.2e+144) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.054) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.3e-27) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 5.4e-67) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 7.6e-6) {
tmp = (F / sin(B)) * sqrt(0.5);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.2d+144)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.054d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.3d-27)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 5.4d-67) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 7.6d-6) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.2e+144) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.054) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.3e-27) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 5.4e-67) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 7.6e-6) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.2e+144: tmp = (-1.0 / B) - t_0 elif F <= -0.054: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.3e-27: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 5.4e-67: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 7.6e-6: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.2e+144) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.054) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.3e-27) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 5.4e-67) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 7.6e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.2e+144) tmp = (-1.0 / B) - t_0; elseif (F <= -0.054) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.3e-27) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 5.4e-67) tmp = (cos(B) * -x) / sin(B); elseif (F <= 7.6e-6) tmp = (F / sin(B)) * sqrt(0.5); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.2e+144], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.054], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.3e-27], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.4e-67], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.6e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{+144}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -0.054:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.3 \cdot 10^{-27}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 5.4 \cdot 10^{-67}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 7.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.2000000000000001e144Initial program 44.1%
Simplified55.2%
Taylor expanded in x around 0 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
fma-undefine55.2%
Simplified55.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.2%
if -3.2000000000000001e144 < F < -0.0539999999999999994Initial program 94.0%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 87.6%
Taylor expanded in x around 0 87.6%
mul-1-neg87.6%
neg-sub087.6%
associate--r+87.6%
+-commutative87.6%
associate--r+87.6%
neg-sub087.6%
distribute-frac-neg87.6%
metadata-eval87.6%
Simplified87.6%
if -0.0539999999999999994 < F < -6.3000000000000001e-27Initial program 99.0%
Simplified99.2%
Taylor expanded in x around 0 98.9%
associate-*l/98.7%
*-lft-identity98.7%
+-commutative98.7%
unpow298.7%
fma-undefine98.7%
Simplified98.7%
Taylor expanded in F around 0 98.7%
Taylor expanded in F around inf 76.1%
if -6.3000000000000001e-27 < F < 5.40000000000000032e-67Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around -inf 37.7%
Taylor expanded in B around 0 51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in B around inf 70.5%
associate-*r/70.5%
neg-mul-170.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
if 5.40000000000000032e-67 < F < 7.6000000000000001e-6Initial program 99.5%
Simplified98.9%
Taylor expanded in x around 0 98.6%
associate-*l/98.9%
*-lft-identity98.9%
+-commutative98.9%
unpow298.9%
fma-undefine98.9%
Simplified98.9%
Taylor expanded in F around 0 93.5%
Taylor expanded in F around inf 83.8%
associate-*l/84.2%
Simplified84.2%
if 7.6000000000000001e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification84.7%
(FPCore (F B x)
:precision binary64
(if (<= F -3.6e+142)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -0.38)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.1e-27)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 2e-67)
(* x (/ (cos B) (- (sin B))))
(if (<= F 7.4e-6)
(* (/ F (sin B)) (sqrt 0.5))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e+142) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -0.38) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.1e-27) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 2e-67) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 7.4e-6) {
tmp = (F / sin(B)) * sqrt(0.5);
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d+142)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-0.38d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.1d-27)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 2d-67) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 7.4d-6) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e+142) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -0.38) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.1e-27) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 2e-67) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 7.4e-6) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e+142: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -0.38: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.1e-27: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 2e-67: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 7.4e-6: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e+142) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -0.38) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.1e-27) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 2e-67) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 7.4e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e+142) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -0.38) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.1e-27) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 2e-67) tmp = x * (cos(B) / -sin(B)); elseif (F <= 7.4e-6) tmp = (F / sin(B)) * sqrt(0.5); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e+142], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.1e-27], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-67], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.4e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{+142}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -0.38:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-67}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 7.4 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -3.6000000000000001e142Initial program 44.1%
Simplified55.2%
Taylor expanded in x around 0 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
fma-undefine55.2%
Simplified55.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.2%
if -3.6000000000000001e142 < F < -0.38Initial program 94.0%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 87.6%
Taylor expanded in x around 0 87.6%
mul-1-neg87.6%
neg-sub087.6%
associate--r+87.6%
+-commutative87.6%
associate--r+87.6%
neg-sub087.6%
distribute-frac-neg87.6%
metadata-eval87.6%
Simplified87.6%
if -0.38 < F < -6.0999999999999999e-27Initial program 99.0%
Simplified99.2%
Taylor expanded in x around 0 98.9%
associate-*l/98.7%
*-lft-identity98.7%
+-commutative98.7%
unpow298.7%
fma-undefine98.7%
Simplified98.7%
Taylor expanded in F around 0 98.7%
Taylor expanded in F around inf 76.1%
if -6.0999999999999999e-27 < F < 1.99999999999999989e-67Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around -inf 37.7%
Taylor expanded in B around 0 51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in B around inf 70.5%
mul-1-neg70.5%
associate-/l*70.5%
distribute-rgt-neg-in70.5%
distribute-frac-neg270.5%
Simplified70.5%
if 1.99999999999999989e-67 < F < 7.4000000000000003e-6Initial program 99.5%
Simplified98.9%
Taylor expanded in x around 0 98.6%
associate-*l/98.9%
*-lft-identity98.9%
+-commutative98.9%
unpow298.9%
fma-undefine98.9%
Simplified98.9%
Taylor expanded in F around 0 93.5%
Taylor expanded in F around inf 83.8%
associate-*l/84.2%
Simplified84.2%
if 7.4000000000000003e-6 < F Initial program 59.9%
div-inv60.0%
clear-num60.0%
Applied egg-rr60.0%
Taylor expanded in B around 0 47.1%
Taylor expanded in F around inf 77.1%
Final simplification77.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e+143)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -8.2e-7)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.1e-27)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 4.5e-67)
(/ (* (cos B) (- x)) (sin B))
(if (<= F 8.2e-6)
(* (/ F (sin B)) (sqrt 0.5))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e+143) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -8.2e-7) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.1e-27) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 4.5e-67) {
tmp = (cos(B) * -x) / sin(B);
} else if (F <= 8.2e-6) {
tmp = (F / sin(B)) * sqrt(0.5);
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.35d+143)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-8.2d-7)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.1d-27)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 4.5d-67) then
tmp = (cos(b) * -x) / sin(b)
else if (f <= 8.2d-6) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e+143) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -8.2e-7) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.1e-27) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 4.5e-67) {
tmp = (Math.cos(B) * -x) / Math.sin(B);
} else if (F <= 8.2e-6) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e+143: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -8.2e-7: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.1e-27: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 4.5e-67: tmp = (math.cos(B) * -x) / math.sin(B) elif F <= 8.2e-6: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e+143) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -8.2e-7) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.1e-27) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 4.5e-67) tmp = Float64(Float64(cos(B) * Float64(-x)) / sin(B)); elseif (F <= 8.2e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.35e+143) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -8.2e-7) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.1e-27) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 4.5e-67) tmp = (cos(B) * -x) / sin(B); elseif (F <= 8.2e-6) tmp = (F / sin(B)) * sqrt(0.5); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e+143], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.2e-7], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.1e-27], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-67], N[(N[(N[Cos[B], $MachinePrecision] * (-x)), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{+143}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -8.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-67}:\\
\;\;\;\;\frac{\cos B \cdot \left(-x\right)}{\sin B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.3500000000000001e143Initial program 44.1%
Simplified55.2%
Taylor expanded in x around 0 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
fma-undefine55.2%
Simplified55.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.2%
if -1.3500000000000001e143 < F < -8.1999999999999998e-7Initial program 94.0%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 87.6%
Taylor expanded in x around 0 87.6%
mul-1-neg87.6%
neg-sub087.6%
associate--r+87.6%
+-commutative87.6%
associate--r+87.6%
neg-sub087.6%
distribute-frac-neg87.6%
metadata-eval87.6%
Simplified87.6%
if -8.1999999999999998e-7 < F < -6.0999999999999999e-27Initial program 99.0%
Simplified99.2%
Taylor expanded in x around 0 98.9%
associate-*l/98.7%
*-lft-identity98.7%
+-commutative98.7%
unpow298.7%
fma-undefine98.7%
Simplified98.7%
Taylor expanded in F around 0 98.7%
Taylor expanded in F around inf 76.1%
if -6.0999999999999999e-27 < F < 4.50000000000000015e-67Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around -inf 37.7%
Taylor expanded in B around 0 51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in B around inf 70.5%
associate-*r/70.5%
neg-mul-170.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
if 4.50000000000000015e-67 < F < 8.1999999999999994e-6Initial program 99.5%
Simplified98.9%
Taylor expanded in x around 0 98.6%
associate-*l/98.9%
*-lft-identity98.9%
+-commutative98.9%
unpow298.9%
fma-undefine98.9%
Simplified98.9%
Taylor expanded in F around 0 93.5%
Taylor expanded in F around inf 83.8%
associate-*l/84.2%
Simplified84.2%
if 8.1999999999999994e-6 < F Initial program 59.9%
div-inv60.0%
clear-num60.0%
Applied egg-rr60.0%
Taylor expanded in B around 0 47.1%
Taylor expanded in F around inf 77.1%
Final simplification77.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e+143)
(- (/ -1.0 B) t_0)
(if (<= F -3e-15)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3e-66)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 8.2e-6)
(* (/ F (sin B)) (sqrt 0.5))
(- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6e+143) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3e-15) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3e-66) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 8.2e-6) {
tmp = (F / sin(B)) * sqrt(0.5);
} 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 <= (-6d+143)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3d-15)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3d-66) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 8.2d-6) then
tmp = (f / sin(b)) * sqrt(0.5d0)
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 <= -6e+143) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3e-15) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3e-66) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 8.2e-6) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} 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 <= -6e+143: tmp = (-1.0 / B) - t_0 elif F <= -3e-15: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3e-66: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 8.2e-6: tmp = (F / math.sin(B)) * math.sqrt(0.5) 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 <= -6e+143) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3e-15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3e-66) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 8.2e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); 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 <= -6e+143) tmp = (-1.0 / B) - t_0; elseif (F <= -3e-15) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3e-66) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 8.2e-6) tmp = (F / sin(B)) * sqrt(0.5); 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, -6e+143], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-66], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.2e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $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 -6 \cdot 10^{+143}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-66}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.0000000000000001e143Initial program 44.1%
Simplified55.2%
Taylor expanded in x around 0 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
fma-undefine55.2%
Simplified55.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.2%
if -6.0000000000000001e143 < F < -3e-15Initial program 94.2%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 85.5%
Taylor expanded in x around 0 85.5%
mul-1-neg85.5%
neg-sub085.5%
associate--r+85.5%
+-commutative85.5%
associate--r+85.5%
neg-sub085.5%
distribute-frac-neg85.5%
metadata-eval85.5%
Simplified85.5%
if -3e-15 < F < 3.0000000000000002e-66Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 84.1%
if 3.0000000000000002e-66 < F < 8.1999999999999994e-6Initial program 99.5%
Simplified98.9%
Taylor expanded in x around 0 98.6%
associate-*l/98.9%
*-lft-identity98.9%
+-commutative98.9%
unpow298.9%
fma-undefine98.9%
Simplified98.9%
Taylor expanded in F around 0 93.5%
Taylor expanded in F around inf 83.8%
associate-*l/84.2%
Simplified84.2%
if 8.1999999999999994e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification89.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e-15)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 1.9e-67)
(- (* F (/ (sqrt 0.5) B)) t_0)
(if (<= F 8e-6)
(* (/ F (sin B)) (sqrt 0.5))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e-15) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 1.9e-67) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else if (F <= 8e-6) {
tmp = (F / sin(B)) * sqrt(0.5);
} 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 <= (-3d-15)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 1.9d-67) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else if (f <= 8d-6) then
tmp = (f / sin(b)) * sqrt(0.5d0)
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 <= -3e-15) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 1.9e-67) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else if (F <= 8e-6) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} 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 <= -3e-15: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 1.9e-67: tmp = (F * (math.sqrt(0.5) / B)) - t_0 elif F <= 8e-6: tmp = (F / math.sin(B)) * math.sqrt(0.5) 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 <= -3e-15) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 1.9e-67) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); elseif (F <= 8e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); 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 <= -3e-15) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 1.9e-67) tmp = (F * (sqrt(0.5) / B)) - t_0; elseif (F <= 8e-6) tmp = (F / sin(B)) * sqrt(0.5); 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, -3e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.9e-67], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-67}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3e-15Initial program 68.1%
Taylor expanded in F around -inf 98.0%
if -3e-15 < F < 1.89999999999999994e-67Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 84.1%
if 1.89999999999999994e-67 < F < 7.99999999999999964e-6Initial program 99.5%
Simplified98.9%
Taylor expanded in x around 0 98.6%
associate-*l/98.9%
*-lft-identity98.9%
+-commutative98.9%
unpow298.9%
fma-undefine98.9%
Simplified98.9%
Taylor expanded in F around 0 93.5%
Taylor expanded in F around inf 83.8%
associate-*l/84.2%
Simplified84.2%
if 7.99999999999999964e-6 < F Initial program 59.9%
Simplified76.9%
Taylor expanded in x around 0 76.8%
associate-*l/76.9%
*-lft-identity76.9%
+-commutative76.9%
unpow276.9%
fma-undefine76.9%
Simplified76.9%
Taylor expanded in F around inf 99.3%
Final simplification92.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (/ -1.0 (/ (tan B) x)) (/ 1.0 B))))
(if (<= x -1.15e-83)
t_0
(if (<= x -2.2e-276)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= x 1.85e-83) (* (/ F (sin B)) (sqrt 0.5)) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / (tan(B) / x)) + (1.0 / B);
double tmp;
if (x <= -1.15e-83) {
tmp = t_0;
} else if (x <= -2.2e-276) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (x <= 1.85e-83) {
tmp = (F / sin(B)) * sqrt(0.5);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / b)
if (x <= (-1.15d-83)) then
tmp = t_0
else if (x <= (-2.2d-276)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (x <= 1.85d-83) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / (Math.tan(B) / x)) + (1.0 / B);
double tmp;
if (x <= -1.15e-83) {
tmp = t_0;
} else if (x <= -2.2e-276) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (x <= 1.85e-83) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / (math.tan(B) / x)) + (1.0 / B) tmp = 0 if x <= -1.15e-83: tmp = t_0 elif x <= -2.2e-276: tmp = (-1.0 / math.sin(B)) - (x / B) elif x <= 1.85e-83: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / B)) tmp = 0.0 if (x <= -1.15e-83) tmp = t_0; elseif (x <= -2.2e-276) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (x <= 1.85e-83) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / (tan(B) / x)) + (1.0 / B); tmp = 0.0; if (x <= -1.15e-83) tmp = t_0; elseif (x <= -2.2e-276) tmp = (-1.0 / sin(B)) - (x / B); elseif (x <= 1.85e-83) tmp = (F / sin(B)) * sqrt(0.5); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e-83], t$95$0, If[LessEqual[x, -2.2e-276], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e-83], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}} + \frac{1}{B}\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{-83}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-276}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-83}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.14999999999999995e-83 or 1.84999999999999997e-83 < x Initial program 82.0%
div-inv82.2%
clear-num82.0%
Applied egg-rr82.0%
Taylor expanded in B around 0 79.0%
Taylor expanded in F around inf 84.6%
if -1.14999999999999995e-83 < x < -2.19999999999999981e-276Initial program 58.1%
Taylor expanded in F around -inf 47.7%
Taylor expanded in B around 0 47.7%
Taylor expanded in x around 0 47.7%
mul-1-neg47.7%
neg-sub047.7%
associate--r+47.7%
+-commutative47.7%
associate--r+47.7%
neg-sub047.7%
distribute-frac-neg47.7%
metadata-eval47.7%
Simplified47.7%
if -2.19999999999999981e-276 < x < 1.84999999999999997e-83Initial program 83.9%
Simplified84.1%
Taylor expanded in x around 0 84.0%
associate-*l/84.0%
*-lft-identity84.0%
+-commutative84.0%
unpow284.0%
fma-undefine84.0%
Simplified84.0%
Taylor expanded in F around 0 57.2%
Taylor expanded in F around inf 46.7%
associate-*l/46.8%
Simplified46.8%
Final simplification68.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (/ -1.0 (/ (tan B) x)) (/ 1.0 B))))
(if (<= x -6.2e-79)
t_0
(if (<= x -1.8e-276)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= x 1.28e-76)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / (tan(B) / x)) + (1.0 / B);
double tmp;
if (x <= -6.2e-79) {
tmp = t_0;
} else if (x <= -1.8e-276) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (x <= 1.28e-76) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / b)
if (x <= (-6.2d-79)) then
tmp = t_0
else if (x <= (-1.8d-276)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (x <= 1.28d-76) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / (Math.tan(B) / x)) + (1.0 / B);
double tmp;
if (x <= -6.2e-79) {
tmp = t_0;
} else if (x <= -1.8e-276) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (x <= 1.28e-76) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / (math.tan(B) / x)) + (1.0 / B) tmp = 0 if x <= -6.2e-79: tmp = t_0 elif x <= -1.8e-276: tmp = (-1.0 / math.sin(B)) - (x / B) elif x <= 1.28e-76: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / B)) tmp = 0.0 if (x <= -6.2e-79) tmp = t_0; elseif (x <= -1.8e-276) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (x <= 1.28e-76) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / (tan(B) / x)) + (1.0 / B); tmp = 0.0; if (x <= -6.2e-79) tmp = t_0; elseif (x <= -1.8e-276) tmp = (-1.0 / sin(B)) - (x / B); elseif (x <= 1.28e-76) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e-79], t$95$0, If[LessEqual[x, -1.8e-276], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.28e-76], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{\frac{\tan B}{x}} + \frac{1}{B}\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-276}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;x \leq 1.28 \cdot 10^{-76}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.1999999999999999e-79 or 1.28e-76 < x Initial program 81.4%
div-inv81.5%
clear-num81.4%
Applied egg-rr81.4%
Taylor expanded in B around 0 78.2%
Taylor expanded in F around inf 86.6%
if -6.1999999999999999e-79 < x < -1.79999999999999997e-276Initial program 58.1%
Taylor expanded in F around -inf 47.7%
Taylor expanded in B around 0 47.7%
Taylor expanded in x around 0 47.7%
mul-1-neg47.7%
neg-sub047.7%
associate--r+47.7%
+-commutative47.7%
associate--r+47.7%
neg-sub047.7%
distribute-frac-neg47.7%
metadata-eval47.7%
Simplified47.7%
if -1.79999999999999997e-276 < x < 1.28e-76Initial program 85.1%
div-inv85.1%
clear-num85.0%
Applied egg-rr85.0%
Taylor expanded in B around 0 50.9%
Taylor expanded in B around 0 41.6%
Final simplification67.5%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e+140)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3e-15)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6.5e-117)
(- (/ (- x) (tan B)) (/ (/ F B) F))
(if (<= F 1.6e-85)
(/ (- (* F (sqrt 0.5)) x) B)
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+140) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3e-15) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6.5e-117) {
tmp = (-x / tan(B)) - ((F / B) / F);
} else if (F <= 1.6e-85) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d+140)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3d-15)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 6.5d-117) then
tmp = (-x / tan(b)) - ((f / b) / f)
else if (f <= 1.6d-85) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e+140) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3e-15) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 6.5e-117) {
tmp = (-x / Math.tan(B)) - ((F / B) / F);
} else if (F <= 1.6e-85) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e+140: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3e-15: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 6.5e-117: tmp = (-x / math.tan(B)) - ((F / B) / F) elif F <= 1.6e-85: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e+140) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3e-15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6.5e-117) tmp = Float64(Float64(Float64(-x) / tan(B)) - Float64(Float64(F / B) / F)); elseif (F <= 1.6e-85) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e+140) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3e-15) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 6.5e-117) tmp = (-x / tan(B)) - ((F / B) / F); elseif (F <= 1.6e-85) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (-1.0 / (tan(B) / x)) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e+140], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-117], N[(N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision] - N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-85], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{+140}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-117}:\\
\;\;\;\;\frac{-x}{\tan B} - \frac{\frac{F}{B}}{F}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-85}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e140Initial program 44.1%
Simplified55.2%
Taylor expanded in x around 0 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
fma-undefine55.2%
Simplified55.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.2%
if -7.1999999999999999e140 < F < -3e-15Initial program 94.2%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 85.5%
Taylor expanded in x around 0 85.5%
mul-1-neg85.5%
neg-sub085.5%
associate--r+85.5%
+-commutative85.5%
associate--r+85.5%
neg-sub085.5%
distribute-frac-neg85.5%
metadata-eval85.5%
Simplified85.5%
if -3e-15 < F < 6.5000000000000001e-117Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 49.5%
*-commutative49.5%
Simplified49.5%
associate-*r/49.5%
*-commutative49.5%
associate-/r*51.6%
*-commutative51.6%
neg-mul-151.6%
Applied egg-rr51.6%
if 6.5000000000000001e-117 < F < 1.60000000000000014e-85Initial program 99.1%
Simplified99.8%
Taylor expanded in x around 0 99.8%
associate-*l/99.8%
*-lft-identity99.8%
+-commutative99.8%
unpow299.8%
fma-undefine99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 100.0%
if 1.60000000000000014e-85 < F Initial program 65.1%
div-inv65.2%
clear-num65.2%
Applied egg-rr65.2%
Taylor expanded in B around 0 46.7%
Taylor expanded in F around inf 70.7%
Final simplification69.6%
(FPCore (F B x)
:precision binary64
(if (<= F -4.4e+143)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3e-15)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.4e-117)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (<= F 2.1e-80)
(/ (- (* F (sqrt 0.5)) x) B)
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.4e+143) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3e-15) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.4e-117) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 2.1e-80) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.4d+143)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3d-15)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.4d-117) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if (f <= 2.1d-80) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.4e+143) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3e-15) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.4e-117) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 2.1e-80) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.4e+143: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3e-15: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.4e-117: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif F <= 2.1e-80: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.4e+143) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3e-15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.4e-117) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 2.1e-80) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.4e+143) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3e-15) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.4e-117) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif (F <= 2.1e-80) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (-1.0 / (tan(B) / x)) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.4e+143], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-117], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e-80], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.4 \cdot 10^{+143}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-117}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-80}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -4.40000000000000028e143Initial program 44.1%
Simplified55.2%
Taylor expanded in x around 0 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
fma-undefine55.2%
Simplified55.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.2%
if -4.40000000000000028e143 < F < -3e-15Initial program 94.2%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 85.5%
Taylor expanded in x around 0 85.5%
mul-1-neg85.5%
neg-sub085.5%
associate--r+85.5%
+-commutative85.5%
associate--r+85.5%
neg-sub085.5%
distribute-frac-neg85.5%
metadata-eval85.5%
Simplified85.5%
if -3e-15 < F < 2.40000000000000014e-117Initial program 99.5%
Taylor expanded in F around -inf 35.6%
Taylor expanded in B around 0 51.6%
if 2.40000000000000014e-117 < F < 2.10000000000000001e-80Initial program 99.1%
Simplified99.8%
Taylor expanded in x around 0 99.8%
associate-*l/99.8%
*-lft-identity99.8%
+-commutative99.8%
unpow299.8%
fma-undefine99.8%
Simplified99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in B around 0 100.0%
if 2.10000000000000001e-80 < F Initial program 65.1%
div-inv65.2%
clear-num65.2%
Applied egg-rr65.2%
Taylor expanded in B around 0 46.7%
Taylor expanded in F around inf 70.7%
Final simplification69.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.15e+141)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -3e-15)
(- (/ -1.0 (sin B)) (/ x B))
(+ (/ -1.0 (/ (tan B) x)) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e+141) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -3e-15) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (-1.0 / (tan(B) / x)) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.15d+141)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-3d-15)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = ((-1.0d0) / (tan(b) / x)) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.15e+141) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -3e-15) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (-1.0 / (Math.tan(B) / x)) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.15e+141: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -3e-15: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (-1.0 / (math.tan(B) / x)) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.15e+141) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -3e-15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.15e+141) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -3e-15) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (-1.0 / (tan(B) / x)) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.15e+141], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.15 \cdot 10^{+141}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.1500000000000001e141Initial program 44.1%
Simplified55.2%
Taylor expanded in x around 0 55.2%
associate-*l/55.2%
*-lft-identity55.2%
+-commutative55.2%
unpow255.2%
fma-undefine55.2%
Simplified55.2%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 85.2%
if -1.1500000000000001e141 < F < -3e-15Initial program 94.2%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 85.5%
Taylor expanded in x around 0 85.5%
mul-1-neg85.5%
neg-sub085.5%
associate--r+85.5%
+-commutative85.5%
associate--r+85.5%
neg-sub085.5%
distribute-frac-neg85.5%
metadata-eval85.5%
Simplified85.5%
if -3e-15 < F Initial program 82.2%
div-inv82.3%
clear-num82.2%
Applied egg-rr82.2%
Taylor expanded in B around 0 65.0%
Taylor expanded in F around inf 59.7%
Final simplification67.2%
(FPCore (F B x) :precision binary64 (if (or (<= F -1.5e+144) (not (<= F -2.9e-15))) (- (/ -1.0 B) (/ x (tan B))) (- (/ -1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((F <= -1.5e+144) || !(F <= -2.9e-15)) {
tmp = (-1.0 / B) - (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 <= (-1.5d+144)) .or. (.not. (f <= (-2.9d-15)))) then
tmp = ((-1.0d0) / b) - (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 <= -1.5e+144) || !(F <= -2.9e-15)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (-1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -1.5e+144) or not (F <= -2.9e-15): tmp = (-1.0 / B) - (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 <= -1.5e+144) || !(F <= -2.9e-15)) tmp = Float64(Float64(-1.0 / B) - 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 <= -1.5e+144) || ~((F <= -2.9e-15))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (-1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -1.5e+144], N[Not[LessEqual[F, -2.9e-15]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[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 -1.5 \cdot 10^{+144} \lor \neg \left(F \leq -2.9 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.49999999999999995e144 or -2.90000000000000019e-15 < F Initial program 75.5%
Simplified83.5%
Taylor expanded in x around 0 83.5%
associate-*l/83.5%
*-lft-identity83.5%
+-commutative83.5%
unpow283.5%
fma-undefine83.5%
Simplified83.5%
Taylor expanded in F around -inf 52.5%
Taylor expanded in B around 0 56.5%
if -1.49999999999999995e144 < F < -2.90000000000000019e-15Initial program 94.2%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 85.5%
Taylor expanded in x around 0 85.5%
mul-1-neg85.5%
neg-sub085.5%
associate--r+85.5%
+-commutative85.5%
associate--r+85.5%
neg-sub085.5%
distribute-frac-neg85.5%
metadata-eval85.5%
Simplified85.5%
Final simplification60.5%
(FPCore (F B x) :precision binary64 (- (/ -1.0 B) (/ x (tan B))))
double code(double F, double B, double x) {
return (-1.0 / B) - (x / tan(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) - (x / tan(b))
end function
public static double code(double F, double B, double x) {
return (-1.0 / B) - (x / Math.tan(B));
}
def code(F, B, x): return (-1.0 / B) - (x / math.tan(B))
function code(F, B, x) return Float64(Float64(-1.0 / B) - Float64(x / tan(B))) end
function tmp = code(F, B, x) tmp = (-1.0 / B) - (x / tan(B)); end
code[F_, B_, x_] := N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B} - \frac{x}{\tan B}
\end{array}
Initial program 78.1%
Simplified85.8%
Taylor expanded in x around 0 85.7%
associate-*l/85.7%
*-lft-identity85.7%
+-commutative85.7%
unpow285.7%
fma-undefine85.7%
Simplified85.7%
Taylor expanded in F around -inf 58.6%
Taylor expanded in B around 0 57.4%
Final simplification57.4%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e-31) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-31) {
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 <= (-7.2d-31)) 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 <= -7.2e-31) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-31: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-31) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-31) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-31], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -7.20000000000000007e-31Initial program 71.4%
Taylor expanded in F around -inf 89.5%
Taylor expanded in B around 0 67.6%
Taylor expanded in B around 0 46.7%
mul-1-neg46.7%
distribute-neg-frac246.7%
Simplified46.7%
if -7.20000000000000007e-31 < F Initial program 81.3%
Taylor expanded in F around -inf 44.1%
Taylor expanded in B around 0 20.9%
Taylor expanded in x around inf 27.8%
mul-1-neg27.8%
distribute-neg-frac227.8%
Simplified27.8%
Final simplification34.0%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 78.1%
Taylor expanded in F around -inf 59.0%
Taylor expanded in B around 0 36.3%
Taylor expanded in x around inf 24.6%
mul-1-neg24.6%
distribute-neg-frac224.6%
Simplified24.6%
Final simplification24.6%
herbie shell --seed 2024072
(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))))))