
(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 -4e+47)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 20000000.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 <= -4e+47) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 20000000.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 <= -4e+47) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 20000000.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, -4e+47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000.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 -4 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\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 < -4.0000000000000002e47Initial program 75.4%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
if -4.0000000000000002e47 < F < 2e7Initial program 98.6%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.5%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if 2e7 < F Initial program 63.3%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -4.4e+15)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 100000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.4e+15) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 100000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} 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 <= (-4.4d+15)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 100000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
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 <= -4.4e+15) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 100000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.4e+15: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 100000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.4e+15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); 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 <= -4.4e+15) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 100000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.4e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 100000000.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 * N[(-1.0 / N[Tan[B], $MachinePrecision]), $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 -4.4 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4.4e15Initial program 75.4%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
if -4.4e15 < F < 1e8Initial program 99.4%
if 1e8 < F Initial program 63.3%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -4e+14)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 20000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ 1.0 (/ (tan B) x)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e+14) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 20000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (1.0 / (tan(B) / x));
} 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 <= (-4d+14)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 20000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (1.0d0 / (tan(b) / x))
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 <= -4e+14) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 20000000.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 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e+14: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 20000000.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 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e+14) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 20000000.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 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e+14) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 20000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (1.0 / (tan(B) / x)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000.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[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;\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}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -4e14Initial program 75.4%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
if -4e14 < F < 2e7Initial program 99.4%
div-inv99.5%
clear-num99.4%
Applied egg-rr99.4%
if 2e7 < F Initial program 63.3%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* 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.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
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.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) 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.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
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.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: 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.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) 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.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) 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.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], 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.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;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.4199999999999999Initial program 77.1%
Simplified84.4%
Taylor expanded in x around 0 84.3%
associate-*l/84.3%
*-lft-identity84.3%
+-commutative84.3%
unpow284.3%
fma-undefine84.3%
Simplified84.3%
Taylor expanded in F around -inf 97.7%
if -1.4199999999999999 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.3%
if 1.4199999999999999 < F Initial program 63.8%
Simplified80.8%
Taylor expanded in x around 0 80.8%
associate-*l/80.9%
*-lft-identity80.9%
+-commutative80.9%
unpow280.9%
fma-undefine80.9%
Simplified80.9%
Taylor expanded in F around inf 99.1%
Final simplification98.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (/ (/ 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.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
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.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) 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.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
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.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: 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.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) 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.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) 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.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], 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.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 77.1%
Simplified84.4%
Taylor expanded in x around 0 84.3%
associate-*l/84.3%
*-lft-identity84.3%
+-commutative84.3%
unpow284.3%
fma-undefine84.3%
Simplified84.3%
Taylor expanded in F around -inf 97.7%
if -1.4199999999999999 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 98.3%
if 1.4199999999999999 < F Initial program 63.8%
Simplified80.8%
Taylor expanded in x around 0 80.8%
associate-*l/80.9%
*-lft-identity80.9%
+-commutative80.9%
unpow280.9%
fma-undefine80.9%
Simplified80.9%
Taylor expanded in F around inf 99.1%
Final simplification98.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) (/ (* x (cos B)) (sin B)))
(if (<= F 1.42)
(- (/ (/ 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.42) {
tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B));
} else if (F <= 1.42) {
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.42d0)) then
tmp = ((-1.0d0) / sin(b)) - ((x * cos(b)) / sin(b))
else if (f <= 1.42d0) 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.42) {
tmp = (-1.0 / Math.sin(B)) - ((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.42) {
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.42: tmp = (-1.0 / math.sin(B)) - ((x * math.cos(B)) / math.sin(B)) elif F <= 1.42: 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.42) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.42) 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.42) tmp = (-1.0 / sin(B)) - ((x * cos(B)) / sin(B)); elseif (F <= 1.42) 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.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], 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.42:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 77.1%
Taylor expanded in F around -inf 97.7%
Taylor expanded in x around 0 97.8%
if -1.4199999999999999 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
associate-*r/99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 98.3%
if 1.4199999999999999 < F Initial program 63.8%
Simplified80.8%
Taylor expanded in x around 0 80.8%
associate-*l/80.9%
*-lft-identity80.9%
+-commutative80.9%
unpow280.9%
fma-undefine80.9%
Simplified80.9%
Taylor expanded in F around inf 99.1%
Final simplification98.4%
(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 -4e+14)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3.1e-70)
t_0
(if (<= F 1.62e-65)
(- (* F (/ (sqrt 0.5) B)) t_1)
(if (<= F 920000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
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 <= -4e+14) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3.1e-70) {
tmp = t_0;
} else if (F <= 1.62e-65) {
tmp = (F * (sqrt(0.5) / B)) - t_1;
} else if (F <= 920000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-4d+14)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3.1d-70)) then
tmp = t_0
else if (f <= 1.62d-65) then
tmp = (f * (sqrt(0.5d0) / b)) - t_1
else if (f <= 920000.0d0) then
tmp = t_0
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 = ((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 <= -4e+14) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3.1e-70) {
tmp = t_0;
} else if (F <= 1.62e-65) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_1;
} else if (F <= 920000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
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 <= -4e+14: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3.1e-70: tmp = t_0 elif F <= 1.62e-65: tmp = (F * (math.sqrt(0.5) / B)) - t_1 elif F <= 920000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 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 <= -4e+14) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3.1e-70) tmp = t_0; elseif (F <= 1.62e-65) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_1); elseif (F <= 920000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); 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 <= -4e+14) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3.1e-70) tmp = t_0; elseif (F <= 1.62e-65) tmp = (F * (sqrt(0.5) / B)) - t_1; elseif (F <= 920000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; 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, -4e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.1e-70], t$95$0, If[LessEqual[F, 1.62e-65], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 920000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $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 -4 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-70}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.62 \cdot 10^{-65}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_1\\
\mathbf{elif}\;F \leq 920000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -4e14Initial program 75.4%
Simplified83.2%
Taylor expanded in x around 0 83.2%
associate-*l/83.2%
*-lft-identity83.2%
+-commutative83.2%
unpow283.2%
fma-undefine83.2%
Simplified83.2%
Taylor expanded in F around -inf 99.8%
if -4e14 < F < -3.1e-70 or 1.6200000000000001e-65 < F < 9.2e5Initial program 99.2%
Taylor expanded in B around 0 94.4%
if -3.1e-70 < F < 1.6200000000000001e-65Initial 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 B around 0 85.8%
associate-*l/85.8%
*-lft-identity85.8%
+-commutative85.8%
unpow285.8%
fma-undefine85.8%
unpow-185.8%
metadata-eval85.8%
pow-sqr85.8%
rem-sqrt-square85.8%
rem-square-sqrt85.7%
fabs-sqr85.7%
rem-square-sqrt85.8%
Simplified85.8%
Taylor expanded in F around 0 85.8%
if 9.2e5 < F Initial program 63.3%
Simplified80.5%
Taylor expanded in x around 0 80.6%
associate-*l/80.6%
*-lft-identity80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 99.9%
Final simplification94.5%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e+125)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F -0.0065)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.3e-59)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 8.5e-36)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e+125) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= -0.0065) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.3e-59) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 8.5e-36) {
tmp = (x * cos(B)) / -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 <= (-9.5d+125)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= (-0.0065d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.3d-59)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 8.5d-36) then
tmp = (x * cos(b)) / -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 <= -9.5e+125) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= -0.0065) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.3e-59) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 8.5e-36) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e+125: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= -0.0065: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.3e-59: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 8.5e-36: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e+125) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= -0.0065) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.3e-59) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 8.5e-36) tmp = Float64(Float64(x * cos(B)) / Float64(-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 <= -9.5e+125) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= -0.0065) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.3e-59) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 8.5e-36) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e+125], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -0.0065], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.3e-59], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-36], N[(N[(x * N[Cos[B], $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 -9.5 \cdot 10^{+125}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -0.0065:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-59}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.50000000000000041e125Initial program 62.5%
Simplified72.9%
Taylor expanded in x around 0 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
fma-undefine72.9%
Simplified72.9%
Taylor expanded in B around 0 65.2%
associate-*l/65.2%
*-lft-identity65.2%
+-commutative65.2%
unpow265.2%
fma-undefine65.2%
unpow-165.2%
metadata-eval65.2%
pow-sqr65.2%
rem-sqrt-square65.2%
rem-square-sqrt65.2%
fabs-sqr65.2%
rem-square-sqrt65.2%
Simplified65.2%
Taylor expanded in F around -inf 81.6%
if -9.50000000000000041e125 < F < -0.0064999999999999997Initial program 96.5%
Taylor expanded in F around -inf 90.1%
Taylor expanded in B around 0 71.6%
Taylor expanded in x around 0 71.6%
sub-neg71.6%
distribute-neg-frac71.6%
metadata-eval71.6%
+-commutative71.6%
mul-1-neg71.6%
sub-neg71.6%
Simplified71.6%
if -0.0064999999999999997 < F < -2.29999999999999979e-59Initial program 99.2%
Simplified99.6%
Taylor expanded in x around 0 99.2%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 83.0%
associate-*l/83.4%
*-lft-identity83.4%
+-commutative83.4%
unpow283.4%
fma-undefine83.4%
unpow-183.4%
metadata-eval83.4%
pow-sqr83.4%
rem-sqrt-square83.4%
rem-square-sqrt82.8%
fabs-sqr82.8%
rem-square-sqrt83.4%
Simplified83.4%
Taylor expanded in F around 0 81.9%
Taylor expanded in B around 0 82.2%
if -2.29999999999999979e-59 < F < 8.5000000000000007e-36Initial program 99.4%
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 B around 0 81.0%
associate-*l/81.1%
*-lft-identity81.1%
+-commutative81.1%
unpow281.1%
fma-undefine81.1%
unpow-181.1%
metadata-eval81.1%
pow-sqr81.1%
rem-sqrt-square81.1%
rem-square-sqrt80.9%
fabs-sqr80.9%
rem-square-sqrt81.1%
Simplified81.1%
Taylor expanded in F around 0 81.1%
Taylor expanded in F around 0 71.5%
mul-1-neg71.5%
Simplified71.5%
if 8.5000000000000007e-36 < F Initial program 66.5%
Taylor expanded in F around -inf 46.8%
Taylor expanded in B around 0 31.5%
*-un-lft-identity31.5%
*-commutative31.5%
add-sqr-sqrt17.1%
sqrt-unprod40.4%
frac-times40.4%
metadata-eval40.4%
metadata-eval40.4%
frac-times40.4%
rgt-mult-inverse40.4%
associate-*l/36.6%
rgt-mult-inverse36.6%
associate-*l/36.5%
sqrt-unprod24.3%
add-sqr-sqrt52.9%
associate-*l/75.5%
rgt-mult-inverse75.6%
Applied egg-rr75.6%
Final simplification74.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0029)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -4.95e-54)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 8.5e-36)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0029) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -4.95e-54) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 8.5e-36) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.0029d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-4.95d-54)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 8.5d-36) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.0029) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -4.95e-54) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 8.5e-36) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0029: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -4.95e-54: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 8.5e-36: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0029) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -4.95e-54) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 8.5e-36) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0029) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -4.95e-54) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 8.5e-36) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0029], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.95e-54], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-36], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0029:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4.95 \cdot 10^{-54}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.0029Initial program 77.7%
Simplified84.7%
Taylor expanded in x around 0 84.7%
associate-*l/84.7%
*-lft-identity84.7%
+-commutative84.7%
unpow284.7%
fma-undefine84.7%
Simplified84.7%
Taylor expanded in F around -inf 95.5%
if -0.0029 < F < -4.95000000000000018e-54Initial program 99.2%
Simplified99.6%
Taylor expanded in x around 0 99.2%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 83.0%
associate-*l/83.4%
*-lft-identity83.4%
+-commutative83.4%
unpow283.4%
fma-undefine83.4%
unpow-183.4%
metadata-eval83.4%
pow-sqr83.4%
rem-sqrt-square83.4%
rem-square-sqrt82.8%
fabs-sqr82.8%
rem-square-sqrt83.4%
Simplified83.4%
Taylor expanded in F around 0 81.9%
Taylor expanded in B around 0 82.2%
if -4.95000000000000018e-54 < F < 8.5000000000000007e-36Initial program 99.4%
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 B around 0 81.0%
associate-*l/81.1%
*-lft-identity81.1%
+-commutative81.1%
unpow281.1%
fma-undefine81.1%
unpow-181.1%
metadata-eval81.1%
pow-sqr81.1%
rem-sqrt-square81.1%
rem-square-sqrt80.9%
fabs-sqr80.9%
rem-square-sqrt81.1%
Simplified81.1%
Taylor expanded in F around 0 81.1%
Taylor expanded in F around 0 71.5%
mul-1-neg71.5%
Simplified71.5%
if 8.5000000000000007e-36 < F Initial program 66.5%
Simplified82.2%
Taylor expanded in x around 0 82.2%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
Taylor expanded in F around inf 92.1%
Final simplification85.1%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0021)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.2e-54)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 8.5e-36)
(/ (* x (cos B)) (- (sin B)))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0021) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.2e-54) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 8.5e-36) {
tmp = (x * cos(B)) / -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.0021d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.2d-54)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 8.5d-36) then
tmp = (x * cos(b)) / -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.0021) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.2e-54) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 8.5e-36) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0021: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.2e-54: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 8.5e-36: tmp = (x * math.cos(B)) / -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.0021) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.2e-54) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 8.5e-36) tmp = Float64(Float64(x * cos(B)) / Float64(-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.0021) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.2e-54) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 8.5e-36) tmp = (x * cos(B)) / -sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0021], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.2e-54], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.5e-36], N[(N[(x * N[Cos[B], $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.0021:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-54}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-36}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.00209999999999999987Initial program 77.7%
Simplified84.7%
Taylor expanded in x around 0 84.7%
associate-*l/84.7%
*-lft-identity84.7%
+-commutative84.7%
unpow284.7%
fma-undefine84.7%
Simplified84.7%
Taylor expanded in F around -inf 95.5%
if -0.00209999999999999987 < F < -1.20000000000000007e-54Initial program 99.2%
Simplified99.6%
Taylor expanded in x around 0 99.2%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 83.0%
associate-*l/83.4%
*-lft-identity83.4%
+-commutative83.4%
unpow283.4%
fma-undefine83.4%
unpow-183.4%
metadata-eval83.4%
pow-sqr83.4%
rem-sqrt-square83.4%
rem-square-sqrt82.8%
fabs-sqr82.8%
rem-square-sqrt83.4%
Simplified83.4%
Taylor expanded in F around 0 81.9%
Taylor expanded in B around 0 82.2%
if -1.20000000000000007e-54 < F < 8.5000000000000007e-36Initial program 99.4%
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 B around 0 81.0%
associate-*l/81.1%
*-lft-identity81.1%
+-commutative81.1%
unpow281.1%
fma-undefine81.1%
unpow-181.1%
metadata-eval81.1%
pow-sqr81.1%
rem-sqrt-square81.1%
rem-square-sqrt80.9%
fabs-sqr80.9%
rem-square-sqrt81.1%
Simplified81.1%
Taylor expanded in F around 0 81.1%
Taylor expanded in F around 0 71.5%
mul-1-neg71.5%
Simplified71.5%
if 8.5000000000000007e-36 < F Initial program 66.5%
Taylor expanded in F around -inf 46.8%
Taylor expanded in B around 0 31.5%
*-un-lft-identity31.5%
*-commutative31.5%
add-sqr-sqrt17.1%
sqrt-unprod40.4%
frac-times40.4%
metadata-eval40.4%
metadata-eval40.4%
frac-times40.4%
rgt-mult-inverse40.4%
associate-*l/36.6%
rgt-mult-inverse36.6%
associate-*l/36.5%
sqrt-unprod24.3%
add-sqr-sqrt52.9%
associate-*l/75.5%
rgt-mult-inverse75.6%
Applied egg-rr75.6%
Final simplification80.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0065)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.085)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0065) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.085) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.0065d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.085d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.0065) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.085) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0065: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.085: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0065) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.085) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0065) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.085) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0065], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.085], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0065:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.085:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.0064999999999999997Initial program 77.7%
Simplified84.7%
Taylor expanded in x around 0 84.7%
associate-*l/84.7%
*-lft-identity84.7%
+-commutative84.7%
unpow284.7%
fma-undefine84.7%
Simplified84.7%
Taylor expanded in F around -inf 95.5%
if -0.0064999999999999997 < F < 0.0850000000000000061Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 80.5%
associate-*l/80.5%
*-lft-identity80.5%
+-commutative80.5%
unpow280.5%
fma-undefine80.5%
unpow-180.5%
metadata-eval80.5%
pow-sqr80.5%
rem-sqrt-square80.5%
rem-square-sqrt80.3%
fabs-sqr80.3%
rem-square-sqrt80.5%
Simplified80.5%
Taylor expanded in F around 0 80.4%
if 0.0850000000000000061 < F Initial program 63.8%
Simplified80.8%
Taylor expanded in x around 0 80.8%
associate-*l/80.9%
*-lft-identity80.9%
+-commutative80.9%
unpow280.9%
fma-undefine80.9%
Simplified80.9%
Taylor expanded in F around inf 99.1%
Final simplification90.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e+126)
(- (/ -1.0 B) t_0)
(if (<= F -0.006)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.6e-246)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 6e-202)
(- (/ (/ F B) F) t_0)
(if (<= F 0.0019)
(- (* F (/ (sqrt 0.5) B)) (/ x B))
(if (or (<= F 4.55e+77) (not (<= F 3.9e+125)))
(- (/ 1.0 (sin B)) (/ x B))
(- (* F (/ (/ 1.0 F) B)) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.6e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.006) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.6e-246) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 6e-202) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 0.0019) {
tmp = (F * (sqrt(0.5) / B)) - (x / B);
} else if ((F <= 4.55e+77) || !(F <= 3.9e+125)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (F * ((1.0 / F) / B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.6d+126)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.006d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.6d-246)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 6d-202) then
tmp = ((f / b) / f) - t_0
else if (f <= 0.0019d0) then
tmp = (f * (sqrt(0.5d0) / b)) - (x / b)
else if ((f <= 4.55d+77) .or. (.not. (f <= 3.9d+125))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (f * ((1.0d0 / f) / b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.6e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.006) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.6e-246) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 6e-202) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 0.0019) {
tmp = (F * (Math.sqrt(0.5) / B)) - (x / B);
} else if ((F <= 4.55e+77) || !(F <= 3.9e+125)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (F * ((1.0 / F) / B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.6e+126: tmp = (-1.0 / B) - t_0 elif F <= -0.006: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.6e-246: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 6e-202: tmp = ((F / B) / F) - t_0 elif F <= 0.0019: tmp = (F * (math.sqrt(0.5) / B)) - (x / B) elif (F <= 4.55e+77) or not (F <= 3.9e+125): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (F * ((1.0 / F) / B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6e+126) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.006) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.6e-246) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 6e-202) tmp = Float64(Float64(Float64(F / B) / F) - t_0); elseif (F <= 0.0019) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - Float64(x / B)); elseif ((F <= 4.55e+77) || !(F <= 3.9e+125)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.6e+126) tmp = (-1.0 / B) - t_0; elseif (F <= -0.006) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.6e-246) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 6e-202) tmp = ((F / B) / F) - t_0; elseif (F <= 0.0019) tmp = (F * (sqrt(0.5) / B)) - (x / B); elseif ((F <= 4.55e+77) || ~((F <= 3.9e+125))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (F * ((1.0 / F) / B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e+126], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.006], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.6e-246], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 6e-202], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0019], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 4.55e+77], N[Not[LessEqual[F, 3.9e+125]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{+126}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -0.006:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.6 \cdot 10^{-246}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-202}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - t\_0\\
\mathbf{elif}\;F \leq 0.0019:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.55 \cdot 10^{+77} \lor \neg \left(F \leq 3.9 \cdot 10^{+125}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.5999999999999999e126Initial program 62.5%
Simplified72.9%
Taylor expanded in x around 0 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
fma-undefine72.9%
Simplified72.9%
Taylor expanded in B around 0 65.2%
associate-*l/65.2%
*-lft-identity65.2%
+-commutative65.2%
unpow265.2%
fma-undefine65.2%
unpow-165.2%
metadata-eval65.2%
pow-sqr65.2%
rem-sqrt-square65.2%
rem-square-sqrt65.2%
fabs-sqr65.2%
rem-square-sqrt65.2%
Simplified65.2%
Taylor expanded in F around -inf 81.6%
if -1.5999999999999999e126 < F < -0.0060000000000000001Initial program 96.5%
Taylor expanded in F around -inf 90.1%
Taylor expanded in B around 0 71.6%
Taylor expanded in x around 0 71.6%
sub-neg71.6%
distribute-neg-frac71.6%
metadata-eval71.6%
+-commutative71.6%
mul-1-neg71.6%
sub-neg71.6%
Simplified71.6%
if -0.0060000000000000001 < F < -5.5999999999999999e-246Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 81.9%
associate-*l/82.0%
*-lft-identity82.0%
+-commutative82.0%
unpow282.0%
fma-undefine82.0%
unpow-182.0%
metadata-eval82.0%
pow-sqr82.0%
rem-sqrt-square82.0%
rem-square-sqrt81.7%
fabs-sqr81.7%
rem-square-sqrt82.0%
Simplified82.0%
Taylor expanded in F around 0 81.6%
Taylor expanded in B around 0 62.0%
if -5.5999999999999999e-246 < F < 6.00000000000000022e-202Initial program 99.6%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in B around 0 93.6%
associate-*l/93.6%
*-lft-identity93.6%
+-commutative93.6%
unpow293.6%
fma-undefine93.6%
unpow-193.6%
metadata-eval93.6%
pow-sqr93.6%
rem-sqrt-square93.6%
rem-square-sqrt93.6%
fabs-sqr93.6%
rem-square-sqrt93.6%
Simplified93.6%
Taylor expanded in F around inf 45.0%
*-commutative45.0%
Simplified45.0%
un-div-inv48.5%
*-commutative48.5%
associate-/r*74.3%
Applied egg-rr74.3%
if 6.00000000000000022e-202 < F < 0.0019Initial program 99.2%
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 B around 0 67.3%
associate-*l/67.5%
*-lft-identity67.5%
+-commutative67.5%
unpow267.5%
fma-undefine67.5%
unpow-167.5%
metadata-eval67.5%
pow-sqr67.5%
rem-sqrt-square67.5%
rem-square-sqrt67.1%
fabs-sqr67.1%
rem-square-sqrt67.5%
Simplified67.5%
Taylor expanded in F around 0 67.5%
Taylor expanded in B around 0 48.2%
if 0.0019 < F < 4.55000000000000007e77 or 3.9000000000000002e125 < F Initial program 59.5%
Taylor expanded in F around -inf 50.6%
Taylor expanded in B around 0 35.9%
*-un-lft-identity35.9%
*-commutative35.9%
add-sqr-sqrt17.5%
sqrt-unprod47.5%
frac-times47.4%
metadata-eval47.4%
metadata-eval47.4%
frac-times47.5%
rgt-mult-inverse47.5%
associate-*l/42.0%
rgt-mult-inverse42.0%
associate-*l/41.9%
sqrt-unprod28.2%
add-sqr-sqrt57.3%
associate-*l/82.6%
rgt-mult-inverse82.6%
Applied egg-rr82.6%
if 4.55000000000000007e77 < F < 3.9000000000000002e125Initial program 77.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.8%
*-lft-identity99.8%
+-commutative99.8%
unpow299.8%
fma-undefine99.8%
Simplified99.8%
Taylor expanded in B around 0 83.3%
associate-*l/83.4%
*-lft-identity83.4%
+-commutative83.4%
unpow283.4%
fma-undefine83.4%
unpow-183.4%
metadata-eval83.4%
pow-sqr83.3%
rem-sqrt-square83.3%
rem-square-sqrt82.9%
fabs-sqr82.9%
rem-square-sqrt83.3%
Simplified83.3%
Taylor expanded in F around inf 83.4%
Final simplification71.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.18e+126)
(- (/ -1.0 B) t_0)
(if (<= F -0.0065)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.62e-245)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 5e-202)
(- (/ (/ F B) F) t_0)
(if (<= F 0.455)
(- (* F (/ (sqrt 0.5) B)) (/ x B))
(if (or (<= F 4.5e+76) (not (<= F 9.2e+132)))
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0)))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.18e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.0065) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.62e-245) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 5e-202) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 0.455) {
tmp = (F * (sqrt(0.5) / B)) - (x / B);
} else if ((F <= 4.5e+76) || !(F <= 9.2e+132)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.18d+126)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.0065d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.62d-245)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 5d-202) then
tmp = ((f / b) / f) - t_0
else if (f <= 0.455d0) then
tmp = (f * (sqrt(0.5d0) / b)) - (x / b)
else if ((f <= 4.5d+76) .or. (.not. (f <= 9.2d+132))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.18e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.0065) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.62e-245) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 5e-202) {
tmp = ((F / B) / F) - t_0;
} else if (F <= 0.455) {
tmp = (F * (Math.sqrt(0.5) / B)) - (x / B);
} else if ((F <= 4.5e+76) || !(F <= 9.2e+132)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.18e+126: tmp = (-1.0 / B) - t_0 elif F <= -0.0065: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.62e-245: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 5e-202: tmp = ((F / B) / F) - t_0 elif F <= 0.455: tmp = (F * (math.sqrt(0.5) / B)) - (x / B) elif (F <= 4.5e+76) or not (F <= 9.2e+132): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.18e+126) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.0065) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.62e-245) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 5e-202) tmp = Float64(Float64(Float64(F / B) / F) - t_0); elseif (F <= 0.455) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - Float64(x / B)); elseif ((F <= 4.5e+76) || !(F <= 9.2e+132)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.18e+126) tmp = (-1.0 / B) - t_0; elseif (F <= -0.0065) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.62e-245) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 5e-202) tmp = ((F / B) / F) - t_0; elseif (F <= 0.455) tmp = (F * (sqrt(0.5) / B)) - (x / B); elseif ((F <= 4.5e+76) || ~((F <= 9.2e+132))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e+126], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.0065], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.62e-245], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5e-202], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.455], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 4.5e+76], N[Not[LessEqual[F, 9.2e+132]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{+126}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -0.0065:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.62 \cdot 10^{-245}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-202}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - t\_0\\
\mathbf{elif}\;F \leq 0.455:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{+76} \lor \neg \left(F \leq 9.2 \cdot 10^{+132}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.18e126Initial program 62.5%
Simplified72.9%
Taylor expanded in x around 0 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
fma-undefine72.9%
Simplified72.9%
Taylor expanded in B around 0 65.2%
associate-*l/65.2%
*-lft-identity65.2%
+-commutative65.2%
unpow265.2%
fma-undefine65.2%
unpow-165.2%
metadata-eval65.2%
pow-sqr65.2%
rem-sqrt-square65.2%
rem-square-sqrt65.2%
fabs-sqr65.2%
rem-square-sqrt65.2%
Simplified65.2%
Taylor expanded in F around -inf 81.6%
if -1.18e126 < F < -0.0064999999999999997Initial program 96.5%
Taylor expanded in F around -inf 90.1%
Taylor expanded in B around 0 71.6%
Taylor expanded in x around 0 71.6%
sub-neg71.6%
distribute-neg-frac71.6%
metadata-eval71.6%
+-commutative71.6%
mul-1-neg71.6%
sub-neg71.6%
Simplified71.6%
if -0.0064999999999999997 < F < -1.6199999999999999e-245Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 81.9%
associate-*l/82.0%
*-lft-identity82.0%
+-commutative82.0%
unpow282.0%
fma-undefine82.0%
unpow-182.0%
metadata-eval82.0%
pow-sqr82.0%
rem-sqrt-square82.0%
rem-square-sqrt81.7%
fabs-sqr81.7%
rem-square-sqrt82.0%
Simplified82.0%
Taylor expanded in F around 0 81.6%
Taylor expanded in B around 0 62.0%
if -1.6199999999999999e-245 < F < 4.99999999999999973e-202Initial program 99.6%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in B around 0 93.6%
associate-*l/93.6%
*-lft-identity93.6%
+-commutative93.6%
unpow293.6%
fma-undefine93.6%
unpow-193.6%
metadata-eval93.6%
pow-sqr93.6%
rem-sqrt-square93.6%
rem-square-sqrt93.6%
fabs-sqr93.6%
rem-square-sqrt93.6%
Simplified93.6%
Taylor expanded in F around inf 45.0%
*-commutative45.0%
Simplified45.0%
un-div-inv48.5%
*-commutative48.5%
associate-/r*74.3%
Applied egg-rr74.3%
if 4.99999999999999973e-202 < F < 0.455000000000000016Initial program 99.2%
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 B around 0 67.3%
associate-*l/67.5%
*-lft-identity67.5%
+-commutative67.5%
unpow267.5%
fma-undefine67.5%
unpow-167.5%
metadata-eval67.5%
pow-sqr67.5%
rem-sqrt-square67.5%
rem-square-sqrt67.1%
fabs-sqr67.1%
rem-square-sqrt67.5%
Simplified67.5%
Taylor expanded in F around 0 67.5%
Taylor expanded in B around 0 48.2%
if 0.455000000000000016 < F < 4.4999999999999997e76 or 9.2000000000000006e132 < F Initial program 59.5%
Taylor expanded in F around -inf 50.6%
Taylor expanded in B around 0 35.9%
*-un-lft-identity35.9%
*-commutative35.9%
add-sqr-sqrt17.5%
sqrt-unprod47.5%
frac-times47.4%
metadata-eval47.4%
metadata-eval47.4%
frac-times47.5%
rgt-mult-inverse47.5%
associate-*l/42.0%
rgt-mult-inverse42.0%
associate-*l/41.9%
sqrt-unprod28.2%
add-sqr-sqrt57.3%
associate-*l/82.6%
rgt-mult-inverse82.6%
Applied egg-rr82.6%
if 4.4999999999999997e76 < F < 9.2000000000000006e132Initial program 77.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.8%
*-lft-identity99.8%
+-commutative99.8%
unpow299.8%
fma-undefine99.8%
Simplified99.8%
Taylor expanded in B around 0 83.3%
associate-*l/83.4%
*-lft-identity83.4%
+-commutative83.4%
unpow283.4%
fma-undefine83.4%
unpow-183.4%
metadata-eval83.4%
pow-sqr83.3%
rem-sqrt-square83.3%
rem-square-sqrt82.9%
fabs-sqr82.9%
rem-square-sqrt83.3%
Simplified83.3%
Taylor expanded in F around inf 83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in F around 0 83.4%
Final simplification71.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.65e+126)
(- (/ -1.0 B) t_0)
(if (<= F -0.0065)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -7.5e-245)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 4.2e-212) (- (/ (/ F B) F) t_0) (- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.65e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.0065) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -7.5e-245) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 4.2e-212) {
tmp = ((F / B) / F) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.65d+126)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.0065d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-7.5d-245)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 4.2d-212) then
tmp = ((f / b) / f) - t_0
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.65e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.0065) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -7.5e-245) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 4.2e-212) {
tmp = ((F / B) / F) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.65e+126: tmp = (-1.0 / B) - t_0 elif F <= -0.0065: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -7.5e-245: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 4.2e-212: tmp = ((F / B) / F) - t_0 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65e+126) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.0065) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -7.5e-245) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 4.2e-212) tmp = Float64(Float64(Float64(F / B) / F) - t_0); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.65e+126) tmp = (-1.0 / B) - t_0; elseif (F <= -0.0065) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -7.5e-245) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 4.2e-212) tmp = ((F / B) / F) - t_0; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.65e+126], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.0065], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-245], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e-212], N[(N[(N[(F / B), $MachinePrecision] / F), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65 \cdot 10^{+126}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -0.0065:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-245}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-212}:\\
\;\;\;\;\frac{\frac{F}{B}}{F} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.65000000000000006e126Initial program 62.5%
Simplified72.9%
Taylor expanded in x around 0 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
fma-undefine72.9%
Simplified72.9%
Taylor expanded in B around 0 65.2%
associate-*l/65.2%
*-lft-identity65.2%
+-commutative65.2%
unpow265.2%
fma-undefine65.2%
unpow-165.2%
metadata-eval65.2%
pow-sqr65.2%
rem-sqrt-square65.2%
rem-square-sqrt65.2%
fabs-sqr65.2%
rem-square-sqrt65.2%
Simplified65.2%
Taylor expanded in F around -inf 81.6%
if -1.65000000000000006e126 < F < -0.0064999999999999997Initial program 96.5%
Taylor expanded in F around -inf 90.1%
Taylor expanded in B around 0 71.6%
Taylor expanded in x around 0 71.6%
sub-neg71.6%
distribute-neg-frac71.6%
metadata-eval71.6%
+-commutative71.6%
mul-1-neg71.6%
sub-neg71.6%
Simplified71.6%
if -0.0064999999999999997 < F < -7.5000000000000003e-245Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 81.9%
associate-*l/82.0%
*-lft-identity82.0%
+-commutative82.0%
unpow282.0%
fma-undefine82.0%
unpow-182.0%
metadata-eval82.0%
pow-sqr82.0%
rem-sqrt-square82.0%
rem-square-sqrt81.7%
fabs-sqr81.7%
rem-square-sqrt82.0%
Simplified82.0%
Taylor expanded in F around 0 81.6%
Taylor expanded in B around 0 62.0%
if -7.5000000000000003e-245 < F < 4.1999999999999999e-212Initial program 99.6%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in B around 0 92.9%
associate-*l/92.9%
*-lft-identity92.9%
+-commutative92.9%
unpow292.9%
fma-undefine92.9%
unpow-192.9%
metadata-eval92.9%
pow-sqr92.9%
rem-sqrt-square92.9%
rem-square-sqrt92.9%
fabs-sqr92.9%
rem-square-sqrt92.9%
Simplified92.9%
Taylor expanded in F around inf 46.3%
*-commutative46.3%
Simplified46.3%
un-div-inv50.2%
*-commutative50.2%
associate-/r*71.4%
Applied egg-rr71.4%
if 4.1999999999999999e-212 < F Initial program 76.1%
Simplified87.3%
Taylor expanded in x around 0 87.3%
associate-*l/87.4%
*-lft-identity87.4%
+-commutative87.4%
unpow287.4%
fma-undefine87.4%
Simplified87.4%
Taylor expanded in B around 0 67.2%
associate-*l/67.3%
*-lft-identity67.3%
+-commutative67.3%
unpow267.3%
fma-undefine67.3%
unpow-167.3%
metadata-eval67.3%
pow-sqr67.3%
rem-sqrt-square67.3%
rem-square-sqrt67.2%
fabs-sqr67.2%
rem-square-sqrt67.3%
Simplified67.3%
Taylor expanded in F around inf 57.7%
*-commutative57.7%
Simplified57.7%
Taylor expanded in F around 0 63.2%
Final simplification67.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.75e+126)
(- (/ -1.0 B) t_0)
(if (<= F -0.0065)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.1e-240) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.75e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.0065) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.1e-240) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.75d+126)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-0.0065d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.1d-240)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.75e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -0.0065) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.1e-240) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.75e+126: tmp = (-1.0 / B) - t_0 elif F <= -0.0065: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.1e-240: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.75e+126) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -0.0065) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.1e-240) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.75e+126) tmp = (-1.0 / B) - t_0; elseif (F <= -0.0065) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.1e-240) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.75e+126], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -0.0065], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-240], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.75 \cdot 10^{+126}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -0.0065:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-240}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.7500000000000001e126Initial program 62.5%
Simplified72.9%
Taylor expanded in x around 0 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
fma-undefine72.9%
Simplified72.9%
Taylor expanded in B around 0 65.2%
associate-*l/65.2%
*-lft-identity65.2%
+-commutative65.2%
unpow265.2%
fma-undefine65.2%
unpow-165.2%
metadata-eval65.2%
pow-sqr65.2%
rem-sqrt-square65.2%
rem-square-sqrt65.2%
fabs-sqr65.2%
rem-square-sqrt65.2%
Simplified65.2%
Taylor expanded in F around -inf 81.6%
if -1.7500000000000001e126 < F < -0.0064999999999999997Initial program 96.5%
Taylor expanded in F around -inf 90.1%
Taylor expanded in B around 0 71.6%
Taylor expanded in x around 0 71.6%
sub-neg71.6%
distribute-neg-frac71.6%
metadata-eval71.6%
+-commutative71.6%
mul-1-neg71.6%
sub-neg71.6%
Simplified71.6%
if -0.0064999999999999997 < F < -2.09999999999999994e-240Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 81.9%
associate-*l/82.0%
*-lft-identity82.0%
+-commutative82.0%
unpow282.0%
fma-undefine82.0%
unpow-182.0%
metadata-eval82.0%
pow-sqr82.0%
rem-sqrt-square82.0%
rem-square-sqrt81.7%
fabs-sqr81.7%
rem-square-sqrt82.0%
Simplified82.0%
Taylor expanded in F around 0 81.6%
Taylor expanded in B around 0 62.0%
if -2.09999999999999994e-240 < F Initial program 80.8%
Simplified89.8%
Taylor expanded in x around 0 89.8%
associate-*l/89.8%
*-lft-identity89.8%
+-commutative89.8%
unpow289.8%
fma-undefine89.8%
Simplified89.8%
Taylor expanded in B around 0 72.3%
associate-*l/72.4%
*-lft-identity72.4%
+-commutative72.4%
unpow272.4%
fma-undefine72.4%
unpow-172.4%
metadata-eval72.4%
pow-sqr72.4%
rem-sqrt-square72.4%
rem-square-sqrt72.3%
fabs-sqr72.3%
rem-square-sqrt72.4%
Simplified72.4%
Taylor expanded in F around inf 55.4%
*-commutative55.4%
Simplified55.4%
Taylor expanded in F around 0 61.4%
Final simplification66.1%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.15e-7) (not (<= x 2.9e-120))) (- (/ -1.0 B) (/ x (tan B))) (- (/ -1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.15e-7) || !(x <= 2.9e-120)) {
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 ((x <= (-1.15d-7)) .or. (.not. (x <= 2.9d-120))) 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 ((x <= -1.15e-7) || !(x <= 2.9e-120)) {
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 (x <= -1.15e-7) or not (x <= 2.9e-120): 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 ((x <= -1.15e-7) || !(x <= 2.9e-120)) 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 ((x <= -1.15e-7) || ~((x <= 2.9e-120))) 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[x, -1.15e-7], N[Not[LessEqual[x, 2.9e-120]], $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}\;x \leq -1.15 \cdot 10^{-7} \lor \neg \left(x \leq 2.9 \cdot 10^{-120}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if x < -1.14999999999999997e-7 or 2.9e-120 < x Initial program 84.2%
Simplified94.0%
Taylor expanded in x around 0 94.0%
associate-*l/94.0%
*-lft-identity94.0%
+-commutative94.0%
unpow294.0%
fma-undefine94.0%
Simplified94.0%
Taylor expanded in B around 0 90.6%
associate-*l/90.6%
*-lft-identity90.6%
+-commutative90.6%
unpow290.6%
fma-undefine90.6%
unpow-190.6%
metadata-eval90.6%
pow-sqr90.6%
rem-sqrt-square90.6%
rem-square-sqrt90.6%
fabs-sqr90.6%
rem-square-sqrt90.6%
Simplified90.6%
Taylor expanded in F around -inf 88.0%
if -1.14999999999999997e-7 < x < 2.9e-120Initial program 82.1%
Taylor expanded in F around -inf 25.6%
Taylor expanded in B around 0 25.3%
Taylor expanded in x around 0 25.3%
sub-neg25.3%
distribute-neg-frac25.3%
metadata-eval25.3%
+-commutative25.3%
mul-1-neg25.3%
sub-neg25.3%
Simplified25.3%
Final simplification59.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.18e+126)
(- (/ -1.0 B) t_0)
(if (<= F -1.95e-52) (- (/ -1.0 (sin B)) (/ x B)) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.18e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.95e-52) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.18d+126)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1.95d-52)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.18e+126) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.95e-52) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.18e+126: tmp = (-1.0 / B) - t_0 elif F <= -1.95e-52: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.18e+126) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1.95e-52) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.18e+126) tmp = (-1.0 / B) - t_0; elseif (F <= -1.95e-52) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.18e+126], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.95e-52], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.18 \cdot 10^{+126}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-52}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.18e126Initial program 62.5%
Simplified72.9%
Taylor expanded in x around 0 72.9%
associate-*l/72.9%
*-lft-identity72.9%
+-commutative72.9%
unpow272.9%
fma-undefine72.9%
Simplified72.9%
Taylor expanded in B around 0 65.2%
associate-*l/65.2%
*-lft-identity65.2%
+-commutative65.2%
unpow265.2%
fma-undefine65.2%
unpow-165.2%
metadata-eval65.2%
pow-sqr65.2%
rem-sqrt-square65.2%
rem-square-sqrt65.2%
fabs-sqr65.2%
rem-square-sqrt65.2%
Simplified65.2%
Taylor expanded in F around -inf 81.6%
if -1.18e126 < F < -1.95000000000000009e-52Initial program 97.2%
Taylor expanded in F around -inf 76.6%
Taylor expanded in B around 0 63.1%
Taylor expanded in x around 0 63.1%
sub-neg63.1%
distribute-neg-frac63.1%
metadata-eval63.1%
+-commutative63.1%
mul-1-neg63.1%
sub-neg63.1%
Simplified63.1%
if -1.95000000000000009e-52 < F Initial program 84.5%
Simplified91.7%
Taylor expanded in x around 0 91.7%
associate-*l/91.8%
*-lft-identity91.8%
+-commutative91.8%
unpow291.8%
fma-undefine91.8%
Simplified91.8%
Taylor expanded in B around 0 74.2%
associate-*l/74.2%
*-lft-identity74.2%
+-commutative74.2%
unpow274.2%
fma-undefine74.2%
unpow-174.2%
metadata-eval74.2%
pow-sqr74.2%
rem-sqrt-square74.2%
rem-square-sqrt74.1%
fabs-sqr74.1%
rem-square-sqrt74.2%
Simplified74.2%
Taylor expanded in F around inf 52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in F around 0 57.8%
Final simplification62.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 83.2%
Simplified90.1%
Taylor expanded in x around 0 90.0%
associate-*l/90.1%
*-lft-identity90.1%
+-commutative90.1%
unpow290.1%
fma-undefine90.1%
Simplified90.1%
Taylor expanded in B around 0 71.0%
associate-*l/71.1%
*-lft-identity71.1%
+-commutative71.1%
unpow271.1%
fma-undefine71.1%
unpow-171.1%
metadata-eval71.1%
pow-sqr71.1%
rem-sqrt-square71.1%
rem-square-sqrt70.9%
fabs-sqr70.9%
rem-square-sqrt71.1%
Simplified71.1%
Taylor expanded in F around -inf 53.4%
Final simplification53.4%
(FPCore (F B x) :precision binary64 (if (<= F -3e-30) (/ (- -1.0 x) B) (if (<= F 1.2e-67) (/ x (- B)) (- (* F (/ 1.0 (* F B))) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3e-30) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.2e-67) {
tmp = x / -B;
} else {
tmp = (F * (1.0 / (F * 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 <= (-3d-30)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.2d-67) then
tmp = x / -b
else
tmp = (f * (1.0d0 / (f * b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3e-30) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.2e-67) {
tmp = x / -B;
} else {
tmp = (F * (1.0 / (F * B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3e-30: tmp = (-1.0 - x) / B elif F <= 1.2e-67: tmp = x / -B else: tmp = (F * (1.0 / (F * B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3e-30) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.2e-67) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3e-30) tmp = (-1.0 - x) / B; elseif (F <= 1.2e-67) tmp = x / -B; else tmp = (F * (1.0 / (F * B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3e-30], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.2e-67], N[(x / (-B)), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-67}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.9999999999999999e-30Initial program 80.0%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 63.5%
Taylor expanded in B around 0 41.9%
mul-1-neg41.9%
distribute-neg-frac241.9%
Simplified41.9%
if -2.9999999999999999e-30 < F < 1.2e-67Initial program 99.5%
Taylor expanded in F around -inf 38.5%
Taylor expanded in B around 0 21.7%
Taylor expanded in x around inf 39.2%
mul-1-neg39.2%
distribute-neg-frac239.2%
Simplified39.2%
if 1.2e-67 < F Initial program 68.9%
Simplified83.4%
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 B around 0 63.9%
associate-*l/64.0%
*-lft-identity64.0%
+-commutative64.0%
unpow264.0%
fma-undefine64.0%
unpow-164.0%
metadata-eval64.0%
pow-sqr63.9%
rem-sqrt-square63.9%
rem-square-sqrt63.8%
fabs-sqr63.8%
rem-square-sqrt63.9%
Simplified63.9%
Taylor expanded in F around inf 67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in B around 0 50.1%
Final simplification43.6%
(FPCore (F B x) :precision binary64 (if (<= F -9.2e-30) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.2e-30) {
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 <= (-9.2d-30)) 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 <= -9.2e-30) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.2e-30: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.2e-30) 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 <= -9.2e-30) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.2e-30], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.2 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -9.19999999999999937e-30Initial program 80.0%
Taylor expanded in F around -inf 89.4%
Taylor expanded in B around 0 63.5%
Taylor expanded in B around 0 41.9%
mul-1-neg41.9%
distribute-neg-frac241.9%
Simplified41.9%
if -9.19999999999999937e-30 < F Initial program 84.8%
Taylor expanded in F around -inf 41.5%
Taylor expanded in B around 0 25.3%
Taylor expanded in x around inf 34.9%
mul-1-neg34.9%
distribute-neg-frac234.9%
Simplified34.9%
Final simplification37.2%
(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(x / Float64(-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 83.2%
Taylor expanded in F around -inf 57.0%
Taylor expanded in B around 0 37.7%
Taylor expanded in x around inf 31.1%
mul-1-neg31.1%
distribute-neg-frac231.1%
Simplified31.1%
Final simplification31.1%
(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(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 83.2%
Taylor expanded in F around -inf 57.0%
Taylor expanded in B around 0 37.7%
log1p-expm1-u21.3%
add-sqr-sqrt14.1%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod6.4%
add-sqr-sqrt9.4%
Applied egg-rr9.4%
Taylor expanded in x around inf 2.6%
Final simplification2.6%
herbie shell --seed 2024081
(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))))))