
(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 25 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 (/ -1.0 (tan B)))))
(if (<= F -1e+49)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 5e+129)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) (/ x (tan B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1e+49) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 5e+129) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - (x / tan(B));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1e+49) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 5e+129) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - Float64(x / tan(B))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+49], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+129], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+49}:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+129}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -9.99999999999999946e48Initial program 50.4%
Taylor expanded in F around -inf 99.8%
if -9.99999999999999946e48 < F < 5.0000000000000003e129Initial program 97.1%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
associate-*r/99.5%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 5.0000000000000003e129 < F Initial program 38.3%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -110000000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 16000.0)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -110000000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 16000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -110000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 16000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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, -110000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 16000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -110000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 16000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.1e8Initial program 56.9%
Taylor expanded in F around -inf 99.8%
if -1.1e8 < F < 16000Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
expm1-log1p-u83.6%
expm1-udef63.9%
associate-*r/63.9%
sqrt-div63.9%
metadata-eval63.9%
un-div-inv63.9%
Applied egg-rr63.9%
expm1-def83.7%
expm1-log1p99.6%
associate-/l/99.5%
Simplified99.5%
if 16000 < F Initial program 65.8%
Simplified78.5%
Taylor expanded in x around 0 78.6%
associate-*l/78.5%
*-lft-identity78.5%
+-commutative78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.7%
Applied egg-rr78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -190000000.0)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 49000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -190000000.0) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 49000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = ((F / (F + (1.0 / F))) / 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) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-190000000.0d0)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 49000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -190000000.0) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 49000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -190000000.0: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 49000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -190000000.0) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 49000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -190000000.0) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 49000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -190000000.0], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 49000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -190000000:\\
\;\;\;\;t_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 49000:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.9e8Initial program 56.9%
Taylor expanded in F around -inf 99.8%
if -1.9e8 < F < 49000Initial program 99.4%
if 49000 < F Initial program 65.8%
Simplified78.5%
Taylor expanded in x around 0 78.6%
associate-*l/78.5%
*-lft-identity78.5%
+-commutative78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.7%
Applied egg-rr78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -700000000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 500000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -700000000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 500000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-700000000.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 500000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -700000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 500000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -700000000.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 500000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -700000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 500000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -700000000.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 500000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -700000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 500000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -700000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 500000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -7e8Initial program 56.9%
Taylor expanded in F around -inf 99.8%
if -7e8 < F < 5e5Initial program 99.4%
div-inv99.5%
clear-num99.4%
Applied egg-rr99.4%
if 5e5 < F Initial program 65.8%
Simplified78.5%
Taylor expanded in x around 0 78.6%
associate-*l/78.5%
*-lft-identity78.5%
+-commutative78.5%
unpow278.5%
fma-udef78.5%
Simplified78.5%
associate-*r/78.6%
sqrt-div78.6%
metadata-eval78.6%
un-div-inv78.7%
Applied egg-rr78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.028)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.028) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.028d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.028) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.028: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.028) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.028) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.028], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.028:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 57.5%
Simplified73.2%
Taylor expanded in x around 0 73.2%
associate-*l/73.2%
*-lft-identity73.2%
+-commutative73.2%
unpow273.2%
fma-udef73.2%
Simplified73.2%
associate-*r/73.3%
sqrt-div73.3%
metadata-eval73.3%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in F around -inf 99.6%
neg-mul-199.6%
Simplified99.6%
if -0.900000000000000022 < F < 0.0280000000000000006Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 98.1%
if 0.0280000000000000006 < F Initial program 67.2%
Simplified79.3%
Taylor expanded in x around 0 79.4%
associate-*l/79.3%
*-lft-identity79.3%
+-commutative79.3%
unpow279.3%
fma-udef79.3%
Simplified79.3%
associate-*r/79.5%
sqrt-div79.5%
metadata-eval79.5%
un-div-inv79.5%
Applied egg-rr79.5%
Taylor expanded in F around inf 99.3%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.05)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.028)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.05) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.028) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.05d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.028d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.05) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.028) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.05: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.028: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.05) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.028) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.05) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.028) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.05], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.028], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.05:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.028:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.05000000000000004Initial program 57.5%
Simplified73.2%
Taylor expanded in x around 0 73.2%
associate-*l/73.2%
*-lft-identity73.2%
+-commutative73.2%
unpow273.2%
fma-udef73.2%
Simplified73.2%
associate-*r/73.3%
sqrt-div73.3%
metadata-eval73.3%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in F around -inf 99.6%
neg-mul-199.6%
Simplified99.6%
if -1.05000000000000004 < F < 0.0280000000000000006Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around 0 98.1%
associate-/l*98.1%
Simplified98.1%
if 0.0280000000000000006 < F Initial program 67.2%
Simplified79.3%
Taylor expanded in x around 0 79.4%
associate-*l/79.3%
*-lft-identity79.3%
+-commutative79.3%
unpow279.3%
fma-udef79.3%
Simplified79.3%
associate-*r/79.5%
sqrt-div79.5%
metadata-eval79.5%
un-div-inv79.5%
Applied egg-rr79.5%
Taylor expanded in F around inf 99.3%
Final simplification98.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.028)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.92) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.028) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.92d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.028d0) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.92) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.028) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.92: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.028: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.92) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.028) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.92) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.028) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.92], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.028], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.92:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.028:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 57.5%
Simplified73.2%
Taylor expanded in x around 0 73.2%
associate-*l/73.2%
*-lft-identity73.2%
+-commutative73.2%
unpow273.2%
fma-udef73.2%
Simplified73.2%
associate-*r/73.3%
sqrt-div73.3%
metadata-eval73.3%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in F around -inf 99.6%
neg-mul-199.6%
Simplified99.6%
if -0.92000000000000004 < F < 0.0280000000000000006Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
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.2%
if 0.0280000000000000006 < F Initial program 67.2%
Simplified79.3%
Taylor expanded in x around 0 79.4%
associate-*l/79.3%
*-lft-identity79.3%
+-commutative79.3%
unpow279.3%
fma-udef79.3%
Simplified79.3%
associate-*r/79.5%
sqrt-div79.5%
metadata-eval79.5%
un-div-inv79.5%
Applied egg-rr79.5%
Taylor expanded in F around inf 99.3%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(if (<= F -14000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 3.4e-7)
(+
(/ -1.0 (/ (tan B) x))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -14000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 3.4e-7) {
tmp = (-1.0 / (tan(B) / x)) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-14000.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 3.4d-7) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -14000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 3.4e-7) {
tmp = (-1.0 / (Math.tan(B) / x)) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -14000.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 3.4e-7: tmp = (-1.0 / (math.tan(B) / x)) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -14000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 3.4e-7) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -14000.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 3.4e-7) tmp = (-1.0 / (tan(B) / x)) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -14000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-7], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -14000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -14000Initial program 56.9%
Taylor expanded in F around -inf 99.8%
if -14000 < F < 3.39999999999999974e-7Initial program 99.4%
div-inv99.5%
clear-num99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 82.9%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
associate-*r/80.2%
sqrt-div80.2%
metadata-eval80.2%
un-div-inv80.3%
Applied egg-rr80.3%
Taylor expanded in F around inf 95.9%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -175000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F -7.5e-73)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 3.4e-7)
(- (/ F (/ B (sqrt 0.5))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -175000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= -7.5e-73) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 3.4e-7) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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 <= (-175000.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= (-7.5d-73)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 3.4d-7) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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 <= -175000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= -7.5e-73) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 3.4e-7) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -175000.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= -7.5e-73: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 3.4e-7: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -175000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= -7.5e-73) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 3.4e-7) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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 <= -175000.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= -7.5e-73) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 3.4e-7) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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, -175000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-73], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-7], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -175000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-73}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -175000Initial program 56.9%
Taylor expanded in F around -inf 99.8%
if -175000 < F < -7.5e-73Initial program 99.1%
Taylor expanded in B around 0 84.4%
if -7.5e-73 < F < 3.39999999999999974e-7Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in B around 0 87.0%
+-commutative87.0%
unpow287.0%
fma-udef87.0%
Simplified87.0%
Taylor expanded in F around 0 87.0%
associate-/l*87.0%
Simplified87.0%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
associate-*r/80.2%
sqrt-div80.2%
metadata-eval80.2%
un-div-inv80.3%
Applied egg-rr80.3%
Taylor expanded in F around inf 95.9%
Final simplification93.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.04)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 3.4e-7)
(- (* F (* (sqrt 0.5) (/ 1.0 B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.04) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 3.4e-7) {
tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.04d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 3.4d-7) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.04) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 3.4e-7) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.04: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 3.4e-7: tmp = (F * (math.sqrt(0.5) * (1.0 / B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.04) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 3.4e-7) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.04) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 3.4e-7) tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.04], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-7], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.04:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.0400000000000000008Initial program 57.5%
Taylor expanded in F around -inf 99.2%
if -0.0400000000000000008 < F < 3.39999999999999974e-7Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in B around 0 82.8%
+-commutative82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
Taylor expanded in F around 0 82.3%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
associate-*r/80.2%
sqrt-div80.2%
metadata-eval80.2%
un-div-inv80.3%
Applied egg-rr80.3%
Taylor expanded in F around inf 95.9%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.28)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 3.4e-7)
(- (* F (* (sqrt 0.5) (/ 1.0 B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.28) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 3.4e-7) {
tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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.28d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 3.4d-7) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / 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.28) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 3.4e-7) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.28: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 3.4e-7: tmp = (F * (math.sqrt(0.5) * (1.0 / B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.28) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 3.4e-7) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / 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.28) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 3.4e-7) tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / 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.28], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e-7], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.28:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.28000000000000003Initial program 57.5%
Simplified73.2%
Taylor expanded in x around 0 73.2%
associate-*l/73.2%
*-lft-identity73.2%
+-commutative73.2%
unpow273.2%
fma-udef73.2%
Simplified73.2%
associate-*r/73.3%
sqrt-div73.3%
metadata-eval73.3%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in F around -inf 99.6%
neg-mul-199.6%
Simplified99.6%
if -0.28000000000000003 < F < 3.39999999999999974e-7Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in B around 0 82.8%
+-commutative82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
Taylor expanded in F around 0 82.3%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
associate-*r/80.2%
sqrt-div80.2%
metadata-eval80.2%
un-div-inv80.3%
Applied egg-rr80.3%
Taylor expanded in F around inf 95.9%
Final simplification91.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.3e+274)
(- (/ -1.0 B) t_0)
(if (<= F -4.6e-14)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.8e-45) (* (/ x (sin B)) (- (cos B))) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.3e+274) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -4.6e-14) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.8e-45) {
tmp = (x / sin(B)) * -cos(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 <= (-3.3d+274)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-4.6d-14)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.8d-45) then
tmp = (x / sin(b)) * -cos(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 <= -3.3e+274) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -4.6e-14) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.8e-45) {
tmp = (x / Math.sin(B)) * -Math.cos(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 <= -3.3e+274: tmp = (-1.0 / B) - t_0 elif F <= -4.6e-14: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.8e-45: tmp = (x / math.sin(B)) * -math.cos(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 <= -3.3e+274) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -4.6e-14) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.8e-45) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(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 <= -3.3e+274) tmp = (-1.0 / B) - t_0; elseif (F <= -4.6e-14) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.8e-45) tmp = (x / sin(B)) * -cos(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, -3.3e+274], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.6e-14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-45], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[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 -3.3 \cdot 10^{+274}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.30000000000000014e274Initial program 50.4%
Simplified68.3%
Taylor expanded in x around 0 68.3%
associate-*l/68.3%
*-lft-identity68.3%
+-commutative68.3%
unpow268.3%
fma-udef68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 83.7%
if -3.30000000000000014e274 < F < -4.59999999999999996e-14Initial program 61.7%
Taylor expanded in F around -inf 94.0%
Taylor expanded in B around 0 79.0%
if -4.59999999999999996e-14 < F < 4.7999999999999998e-45Initial program 99.4%
Taylor expanded in F around -inf 39.7%
Taylor expanded in x around inf 64.3%
mul-1-neg64.3%
associate-*l/64.4%
distribute-rgt-neg-in64.4%
Simplified64.4%
if 4.7999999999999998e-45 < F Initial program 71.4%
Simplified81.9%
Taylor expanded in x around 0 82.0%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-udef81.9%
Simplified81.9%
Taylor expanded in B around 0 64.0%
+-commutative64.0%
unpow264.0%
fma-udef64.0%
Simplified64.0%
Taylor expanded in F around inf 68.8%
Final simplification70.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.25)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 3.4e-7)
(- (* F (* (sqrt 0.5) (/ 1.0 B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.25) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 3.4e-7) {
tmp = (F * (sqrt(0.5) * (1.0 / 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.25d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 3.4d-7) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / 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.25) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 3.4e-7) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / 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.25: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 3.4e-7: tmp = (F * (math.sqrt(0.5) * (1.0 / 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.25) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 3.4e-7) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / 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.25) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 3.4e-7) tmp = (F * (sqrt(0.5) * (1.0 / 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.25], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-7], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / 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 -0.25:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.25Initial program 57.5%
Taylor expanded in F around -inf 99.2%
if -0.25 < F < 3.39999999999999974e-7Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in B around 0 82.8%
+-commutative82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
Taylor expanded in F around 0 82.3%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around inf 95.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.4e-7)
(- (* 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.29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.4e-7) {
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.29d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.4d-7) 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.29) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.4e-7) {
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.29: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.4e-7: 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.29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.4e-7) 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.29) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.4e-7) 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.29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e-7], 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.29:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.28999999999999998Initial program 57.5%
Simplified73.2%
Taylor expanded in x around 0 73.2%
associate-*l/73.2%
*-lft-identity73.2%
+-commutative73.2%
unpow273.2%
fma-udef73.2%
Simplified73.2%
Taylor expanded in F around -inf 99.2%
if -0.28999999999999998 < F < 3.39999999999999974e-7Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in B around 0 82.8%
+-commutative82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
Taylor expanded in F around 0 82.3%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around inf 95.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.22)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.4e-7)
(- (/ F (/ B (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.4e-7) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.22d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.4d-7) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.22) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.4e-7) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.22: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.4e-7: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.4e-7) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.22) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.4e-7) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e-7], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.22:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.220000000000000001Initial program 57.5%
Simplified73.2%
Taylor expanded in x around 0 73.2%
associate-*l/73.2%
*-lft-identity73.2%
+-commutative73.2%
unpow273.2%
fma-udef73.2%
Simplified73.2%
Taylor expanded in F around -inf 99.2%
if -0.220000000000000001 < F < 3.39999999999999974e-7Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in B around 0 82.8%
+-commutative82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
Taylor expanded in F around 0 82.2%
associate-/l*82.3%
Simplified82.3%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around inf 95.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.28)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 3.4e-7)
(- (/ F (/ B (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.28) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 3.4e-7) {
tmp = (F / (B / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.28d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 3.4d-7) then
tmp = (f / (b / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.28) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 3.4e-7) {
tmp = (F / (B / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.28: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 3.4e-7: tmp = (F / (B / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.28) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 3.4e-7) tmp = Float64(Float64(F / Float64(B / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.28) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 3.4e-7) tmp = (F / (B / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.28], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.4e-7], N[(N[(F / N[(B / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.28:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;\frac{F}{\frac{B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.28000000000000003Initial program 57.5%
Taylor expanded in F around -inf 99.2%
if -0.28000000000000003 < F < 3.39999999999999974e-7Initial program 99.4%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in B around 0 82.8%
+-commutative82.8%
unpow282.8%
fma-udef82.8%
Simplified82.8%
Taylor expanded in F around 0 82.2%
associate-/l*82.3%
Simplified82.3%
if 3.39999999999999974e-7 < F Initial program 68.5%
Simplified80.1%
Taylor expanded in x around 0 80.2%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
Taylor expanded in F around inf 95.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.6e-70)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.2e-37)
(* (/ x (sin B)) (- (cos 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 <= -3.6e-70) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.2e-37) {
tmp = (x / sin(B)) * -cos(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 <= (-3.6d-70)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.2d-37) then
tmp = (x / sin(b)) * -cos(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 <= -3.6e-70) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.2e-37) {
tmp = (x / Math.sin(B)) * -Math.cos(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 <= -3.6e-70: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.2e-37: tmp = (x / math.sin(B)) * -math.cos(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 <= -3.6e-70) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.2e-37) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(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 <= -3.6e-70) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.2e-37) tmp = (x / sin(B)) * -cos(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, -3.6e-70], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.2e-37], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.6 \cdot 10^{-70}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -3.6000000000000002e-70Initial program 63.2%
Simplified76.8%
Taylor expanded in x around 0 76.8%
associate-*l/76.7%
*-lft-identity76.7%
+-commutative76.7%
unpow276.7%
fma-udef76.7%
Simplified76.7%
Taylor expanded in F around -inf 90.0%
if -3.6000000000000002e-70 < F < 4.2000000000000002e-37Initial program 99.4%
Taylor expanded in F around -inf 39.5%
Taylor expanded in x around inf 67.1%
mul-1-neg67.1%
associate-*l/67.2%
distribute-rgt-neg-in67.2%
Simplified67.2%
if 4.2000000000000002e-37 < F Initial program 70.4%
Simplified81.3%
Taylor expanded in x around 0 81.4%
associate-*l/81.3%
*-lft-identity81.3%
+-commutative81.3%
unpow281.3%
fma-udef81.3%
Simplified81.3%
Taylor expanded in F around inf 92.5%
Final simplification83.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e-70)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45e-43) (* (/ x (sin B)) (- (cos B))) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e-70) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45e-43) {
tmp = (x / sin(B)) * -cos(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 <= (-5d-70)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d-43) then
tmp = (x / sin(b)) * -cos(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 <= -5e-70) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45e-43) {
tmp = (x / Math.sin(B)) * -Math.cos(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 <= -5e-70: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45e-43: tmp = (x / math.sin(B)) * -math.cos(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 <= -5e-70) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45e-43) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(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 <= -5e-70) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45e-43) tmp = (x / sin(B)) * -cos(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, -5e-70], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45e-43], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[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 -5 \cdot 10^{-70}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-43}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -4.9999999999999998e-70Initial program 63.2%
Simplified76.8%
Taylor expanded in x around 0 76.8%
associate-*l/76.7%
*-lft-identity76.7%
+-commutative76.7%
unpow276.7%
fma-udef76.7%
Simplified76.7%
Taylor expanded in F around -inf 90.0%
if -4.9999999999999998e-70 < F < 1.4500000000000001e-43Initial program 99.4%
Taylor expanded in F around -inf 40.1%
Taylor expanded in x around inf 67.1%
mul-1-neg67.1%
associate-*l/67.2%
distribute-rgt-neg-in67.2%
Simplified67.2%
if 1.4500000000000001e-43 < F Initial program 71.4%
Simplified81.9%
Taylor expanded in x around 0 82.0%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-udef81.9%
Simplified81.9%
Taylor expanded in B around 0 64.0%
+-commutative64.0%
unpow264.0%
fma-udef64.0%
Simplified64.0%
Taylor expanded in F around inf 68.8%
Final simplification75.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.95e+274)
(- (/ -1.0 B) t_0)
(if (<= F -4.6e-14) (- (/ -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 <= -2.95e+274) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -4.6e-14) {
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 <= (-2.95d+274)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-4.6d-14)) 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 <= -2.95e+274) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -4.6e-14) {
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 <= -2.95e+274: tmp = (-1.0 / B) - t_0 elif F <= -4.6e-14: 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 <= -2.95e+274) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -4.6e-14) 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 <= -2.95e+274) tmp = (-1.0 / B) - t_0; elseif (F <= -4.6e-14) 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, -2.95e+274], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.6e-14], 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 -2.95 \cdot 10^{+274}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.95000000000000018e274Initial program 50.4%
Simplified68.3%
Taylor expanded in x around 0 68.3%
associate-*l/68.3%
*-lft-identity68.3%
+-commutative68.3%
unpow268.3%
fma-udef68.3%
Simplified68.3%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 83.7%
if -2.95000000000000018e274 < F < -4.59999999999999996e-14Initial program 61.7%
Taylor expanded in F around -inf 94.0%
Taylor expanded in B around 0 79.0%
if -4.59999999999999996e-14 < F Initial program 85.8%
Simplified91.0%
Taylor expanded in x around 0 91.0%
associate-*l/91.0%
*-lft-identity91.0%
+-commutative91.0%
unpow291.0%
fma-udef91.0%
Simplified91.0%
Taylor expanded in B around 0 74.1%
+-commutative74.1%
unpow274.1%
fma-udef74.1%
Simplified74.1%
Taylor expanded in F around inf 59.7%
Final simplification66.1%
(FPCore (F B x) :precision binary64 (if (<= B 1.6e-116) (- (+ (/ 1.0 B) (* 0.3333333333333333 (* x B))) (/ x B)) (- (/ -1.0 B) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.6e-116) {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (-1.0 / 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 (b <= 1.6d-116) then
tmp = ((1.0d0 / b) + (0.3333333333333333d0 * (x * b))) - (x / b)
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 1.6e-116) {
tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B);
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 1.6e-116: tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B) else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 1.6e-116) tmp = Float64(Float64(Float64(1.0 / B) + Float64(0.3333333333333333 * Float64(x * B))) - Float64(x / B)); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 1.6e-116) tmp = ((1.0 / B) + (0.3333333333333333 * (x * B))) - (x / B); else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 1.6e-116], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 1.6 \cdot 10^{-116}:\\
\;\;\;\;\left(\frac{1}{B} + 0.3333333333333333 \cdot \left(x \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 1.60000000000000005e-116Initial program 75.8%
Simplified86.9%
Taylor expanded in x around 0 86.9%
associate-*l/86.9%
*-lft-identity86.9%
+-commutative86.9%
unpow286.9%
fma-udef86.9%
Simplified86.9%
Taylor expanded in B around 0 70.7%
+-commutative70.7%
unpow270.7%
fma-udef70.7%
Simplified70.7%
Taylor expanded in F around inf 48.8%
*-commutative48.8%
Simplified48.8%
Taylor expanded in B around 0 35.4%
if 1.60000000000000005e-116 < B Initial program 81.4%
Simplified83.7%
Taylor expanded in x around 0 83.8%
associate-*l/83.7%
*-lft-identity83.7%
+-commutative83.7%
unpow283.7%
fma-udef83.7%
Simplified83.7%
Taylor expanded in F around -inf 65.6%
Taylor expanded in B around 0 55.2%
Final simplification42.0%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ x (tan B)))) (if (<= F -5.7e-43) (- (/ -1.0 B) 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 <= -5.7e-43) {
tmp = (-1.0 / B) - 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 <= (-5.7d-43)) then
tmp = ((-1.0d0) / b) - 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 <= -5.7e-43) {
tmp = (-1.0 / B) - 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 <= -5.7e-43: tmp = (-1.0 / B) - 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 <= -5.7e-43) tmp = Float64(Float64(-1.0 / B) - 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 <= -5.7e-43) tmp = (-1.0 / B) - 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, -5.7e-43], N[(N[(-1.0 / B), $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 -5.7 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -5.6999999999999999e-43Initial program 61.5%
Simplified75.7%
Taylor expanded in x around 0 75.7%
associate-*l/75.7%
*-lft-identity75.7%
+-commutative75.7%
unpow275.7%
fma-udef75.7%
Simplified75.7%
Taylor expanded in F around -inf 92.8%
Taylor expanded in B around 0 61.8%
if -5.6999999999999999e-43 < F Initial program 85.6%
Simplified90.8%
Taylor expanded in x around 0 90.9%
associate-*l/90.8%
*-lft-identity90.8%
+-commutative90.8%
unpow290.8%
fma-udef90.8%
Simplified90.8%
Taylor expanded in B around 0 74.3%
+-commutative74.3%
unpow274.3%
fma-udef74.3%
Simplified74.3%
Taylor expanded in F around inf 60.2%
Final simplification60.7%
(FPCore (F B x) :precision binary64 (if (<= F -5.5e+184) (/ -1.0 B) (if (<= F 2.5e-79) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e+184) {
tmp = -1.0 / B;
} else if (F <= 2.5e-79) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.5d+184)) then
tmp = (-1.0d0) / b
else if (f <= 2.5d-79) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e+184) {
tmp = -1.0 / B;
} else if (F <= 2.5e-79) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e+184: tmp = -1.0 / B elif F <= 2.5e-79: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e+184) tmp = Float64(-1.0 / B); elseif (F <= 2.5e-79) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5e+184) tmp = -1.0 / B; elseif (F <= 2.5e-79) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e+184], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.5e-79], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{+184}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-79}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.5000000000000002e184Initial program 29.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 48.8%
associate-*r/48.8%
distribute-lft-in48.8%
metadata-eval48.8%
neg-mul-148.8%
Simplified48.8%
Taylor expanded in x around 0 33.3%
if -5.5000000000000002e184 < F < 2.5e-79Initial program 92.4%
Taylor expanded in F around -inf 57.2%
Taylor expanded in B around 0 24.7%
associate-*r/24.7%
distribute-lft-in24.7%
metadata-eval24.7%
neg-mul-124.7%
Simplified24.7%
Taylor expanded in x around inf 24.6%
associate-*r/24.6%
neg-mul-124.6%
Simplified24.6%
if 2.5e-79 < F Initial program 72.9%
Simplified82.9%
Taylor expanded in x around 0 83.0%
associate-*l/82.9%
*-lft-identity82.9%
+-commutative82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in B around 0 66.0%
+-commutative66.0%
unpow266.0%
fma-udef66.0%
Simplified66.0%
Taylor expanded in F around inf 68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in B around 0 45.5%
Final simplification33.0%
(FPCore (F B x) :precision binary64 (if (<= F -2.65e-28) (/ (- -1.0 x) B) (if (<= F 1.45e-80) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.65e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.45e-80) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.65d-28)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.45d-80) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.65e-28) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.45e-80) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.65e-28: tmp = (-1.0 - x) / B elif F <= 1.45e-80: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.65e-28) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.45e-80) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.65e-28) tmp = (-1.0 - x) / B; elseif (F <= 1.45e-80) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.65e-28], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45e-80], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.65 \cdot 10^{-28}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-80}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.64999999999999994e-28Initial program 61.5%
Taylor expanded in F around -inf 92.9%
Taylor expanded in B around 0 41.2%
associate-*r/41.2%
distribute-lft-in41.2%
metadata-eval41.2%
neg-mul-141.2%
Simplified41.2%
if -2.64999999999999994e-28 < F < 1.44999999999999999e-80Initial program 99.4%
Taylor expanded in F around -inf 37.2%
Taylor expanded in B around 0 17.2%
associate-*r/17.2%
distribute-lft-in17.2%
metadata-eval17.2%
neg-mul-117.2%
Simplified17.2%
Taylor expanded in x around inf 26.1%
associate-*r/26.1%
neg-mul-126.1%
Simplified26.1%
if 1.44999999999999999e-80 < F Initial program 72.9%
Simplified82.9%
Taylor expanded in x around 0 83.0%
associate-*l/82.9%
*-lft-identity82.9%
+-commutative82.9%
unpow282.9%
fma-udef82.9%
Simplified82.9%
Taylor expanded in B around 0 66.0%
+-commutative66.0%
unpow266.0%
fma-udef66.0%
Simplified66.0%
Taylor expanded in F around inf 68.2%
*-commutative68.2%
Simplified68.2%
Taylor expanded in B around 0 45.5%
Final simplification37.9%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.8e-36) (not (<= x 82.0))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.8e-36) || !(x <= 82.0)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.8d-36)) .or. (.not. (x <= 82.0d0))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.8e-36) || !(x <= 82.0)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.8e-36) or not (x <= 82.0): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.8e-36) || !(x <= 82.0)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -1.8e-36) || ~((x <= 82.0))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.8e-36], N[Not[LessEqual[x, 82.0]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{-36} \lor \neg \left(x \leq 82\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -1.80000000000000016e-36 or 82 < x Initial program 85.6%
Taylor expanded in F around -inf 91.2%
Taylor expanded in B around 0 41.2%
associate-*r/41.2%
distribute-lft-in41.2%
metadata-eval41.2%
neg-mul-141.2%
Simplified41.2%
Taylor expanded in x around inf 42.0%
associate-*r/42.0%
neg-mul-142.0%
Simplified42.0%
if -1.80000000000000016e-36 < x < 82Initial program 71.5%
Taylor expanded in F around -inf 31.5%
Taylor expanded in B around 0 15.0%
associate-*r/15.0%
distribute-lft-in15.0%
metadata-eval15.0%
neg-mul-115.0%
Simplified15.0%
Taylor expanded in x around 0 14.7%
Final simplification26.5%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 77.7%
Taylor expanded in F around -inf 57.4%
Taylor expanded in B around 0 26.4%
associate-*r/26.4%
distribute-lft-in26.4%
metadata-eval26.4%
neg-mul-126.4%
Simplified26.4%
Taylor expanded in x around 0 9.8%
Final simplification9.8%
herbie shell --seed 2024016
(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))))))