
(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 29 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.8e+30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 115000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.8e+30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 115000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.8d+30)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 115000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.8e+30) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 115000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.8e+30: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 115000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.8e+30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 115000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.8e+30) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 115000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 115000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 115000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.79999999999999983e30Initial program 54.7%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.7%
Applied egg-rr99.7%
if -2.79999999999999983e30 < F < 1.15e8Initial program 99.4%
div-inv99.6%
expm1-log1p-u79.6%
expm1-udef59.0%
Applied egg-rr59.0%
expm1-def79.6%
expm1-log1p99.6%
Simplified99.6%
if 1.15e8 < F Initial program 51.2%
Taylor expanded in F around inf 99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(+ t_0 (/ (/ F (- (/ -1.0 F) F)) (sin B)))
(if (<= F 0.9)
(+ t_0 (/ F (/ (sin B) (sqrt 0.5))))
(+ t_0 (/ (/ F (+ F (/ 1.0 F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B));
} else if (F <= 0.9) {
tmp = t_0 + (F / (sin(B) / sqrt(0.5)));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = t_0 + ((f / (((-1.0d0) / f) - f)) / sin(b))
else if (f <= 0.9d0) then
tmp = t_0 + (f / (sin(b) / sqrt(0.5d0)))
else
tmp = t_0 + ((f / (f + (1.0d0 / f))) / sin(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 <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / Math.sin(B));
} else if (F <= 0.9) {
tmp = t_0 + (F / (Math.sin(B) / Math.sqrt(0.5)));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = t_0 + ((F / ((-1.0 / F) - F)) / math.sin(B)) elif F <= 0.9: tmp = t_0 + (F / (math.sin(B) / math.sqrt(0.5))) else: tmp = t_0 + ((F / (F + (1.0 / F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(t_0 + Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B))); elseif (F <= 0.9) tmp = Float64(t_0 + Float64(F / Float64(sin(B) / sqrt(0.5)))); else tmp = Float64(t_0 + Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B)); elseif (F <= 0.9) tmp = t_0 + (F / (sin(B) / sqrt(0.5))); else tmp = t_0 + ((F / (F + (1.0 / F))) / sin(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, -43000.0], N[(t$95$0 + N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.9], N[(t$95$0 + N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;t_0 + \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;t_0 + \frac{F}{\frac{\sin B}{\sqrt{0.5}}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{F}{F + \frac{1}{F}}}{\sin B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
unpow259.6%
fma-udef59.6%
Simplified59.6%
associate-*l/74.9%
sqrt-div74.9%
metadata-eval74.9%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
Simplified99.7%
if -43000 < F < 0.900000000000000022Initial program 99.4%
Taylor expanded in x around 0 99.4%
+-commutative99.4%
unpow299.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in F around 0 98.2%
associate-/l*98.2%
Simplified98.2%
if 0.900000000000000022 < F Initial program 52.7%
Taylor expanded in x around 0 52.7%
+-commutative52.7%
unpow252.7%
fma-udef52.7%
Simplified52.7%
associate-*l/70.4%
sqrt-div70.5%
metadata-eval70.5%
un-div-inv70.5%
Applied egg-rr70.5%
Taylor expanded in F around inf 99.6%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(+ t_0 (/ (/ F (- (/ -1.0 F) F)) (sin B)))
(if (<= F 0.92)
(+ t_0 (/ (* F (sqrt 0.5)) (sin B)))
(+ t_0 (/ (/ F (+ F (/ 1.0 F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B));
} else if (F <= 0.92) {
tmp = t_0 + ((F * sqrt(0.5)) / sin(B));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = t_0 + ((f / (((-1.0d0) / f) - f)) / sin(b))
else if (f <= 0.92d0) then
tmp = t_0 + ((f * sqrt(0.5d0)) / sin(b))
else
tmp = t_0 + ((f / (f + (1.0d0 / f))) / sin(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 <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / Math.sin(B));
} else if (F <= 0.92) {
tmp = t_0 + ((F * Math.sqrt(0.5)) / Math.sin(B));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = t_0 + ((F / ((-1.0 / F) - F)) / math.sin(B)) elif F <= 0.92: tmp = t_0 + ((F * math.sqrt(0.5)) / math.sin(B)) else: tmp = t_0 + ((F / (F + (1.0 / F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(t_0 + Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B))); elseif (F <= 0.92) tmp = Float64(t_0 + Float64(Float64(F * sqrt(0.5)) / sin(B))); else tmp = Float64(t_0 + Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B)); elseif (F <= 0.92) tmp = t_0 + ((F * sqrt(0.5)) / sin(B)); else tmp = t_0 + ((F / (F + (1.0 / F))) / sin(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, -43000.0], N[(t$95$0 + N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.92], N[(t$95$0 + N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;t_0 + \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 0.92:\\
\;\;\;\;t_0 + \frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{F}{F + \frac{1}{F}}}{\sin B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
unpow259.6%
fma-udef59.6%
Simplified59.6%
associate-*l/74.9%
sqrt-div74.9%
metadata-eval74.9%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
Simplified99.7%
if -43000 < F < 0.92000000000000004Initial program 99.4%
Taylor expanded in x around 0 99.4%
+-commutative99.4%
unpow299.4%
fma-udef99.4%
Simplified99.4%
Taylor expanded in F around 0 98.2%
if 0.92000000000000004 < F Initial program 52.7%
Taylor expanded in x around 0 52.7%
+-commutative52.7%
unpow252.7%
fma-udef52.7%
Simplified52.7%
associate-*l/70.4%
sqrt-div70.5%
metadata-eval70.5%
un-div-inv70.5%
Applied egg-rr70.5%
Taylor expanded in F around inf 99.6%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -2100.0)
(+ t_1 (/ (/ F (- (/ -1.0 F) F)) (sin B)))
(if (<= F -2.4e-209)
t_0
(if (<= F 1.5e-109)
(+ t_1 (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F 60000000.0) t_0 (+ t_1 (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2100.0) {
tmp = t_1 + ((F / ((-1.0 / F) - F)) / sin(B));
} else if (F <= -2.4e-209) {
tmp = t_0;
} else if (F <= 1.5e-109) {
tmp = t_1 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else if (F <= 60000000.0) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-2100.0d0)) then
tmp = t_1 + ((f / (((-1.0d0) / f) - f)) / sin(b))
else if (f <= (-2.4d-209)) then
tmp = t_0
else if (f <= 1.5d-109) then
tmp = t_1 + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else if (f <= 60000000.0d0) then
tmp = t_0
else
tmp = t_1 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2100.0) {
tmp = t_1 + ((F / ((-1.0 / F) - F)) / Math.sin(B));
} else if (F <= -2.4e-209) {
tmp = t_0;
} else if (F <= 1.5e-109) {
tmp = t_1 + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else if (F <= 60000000.0) {
tmp = t_0;
} else {
tmp = t_1 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2100.0: tmp = t_1 + ((F / ((-1.0 / F) - F)) / math.sin(B)) elif F <= -2.4e-209: tmp = t_0 elif F <= 1.5e-109: tmp = t_1 + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) elif F <= 60000000.0: tmp = t_0 else: tmp = t_1 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2100.0) tmp = Float64(t_1 + Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B))); elseif (F <= -2.4e-209) tmp = t_0; elseif (F <= 1.5e-109) tmp = Float64(t_1 + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); elseif (F <= 60000000.0) tmp = t_0; else tmp = Float64(t_1 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2100.0) tmp = t_1 + ((F / ((-1.0 / F) - F)) / sin(B)); elseif (F <= -2.4e-209) tmp = t_0; elseif (F <= 1.5e-109) tmp = t_1 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); elseif (F <= 60000000.0) tmp = t_0; else tmp = t_1 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2100.0], N[(t$95$1 + N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.4e-209], t$95$0, If[LessEqual[F, 1.5e-109], N[(t$95$1 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 60000000.0], t$95$0, N[(t$95$1 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2100:\\
\;\;\;\;t_1 + \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-209}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-109}:\\
\;\;\;\;t_1 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{elif}\;F \leq 60000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2100Initial program 60.0%
Taylor expanded in x around 0 60.0%
+-commutative60.0%
unpow260.0%
fma-udef60.0%
Simplified60.0%
associate-*l/75.2%
sqrt-div75.2%
metadata-eval75.2%
un-div-inv75.3%
Applied egg-rr75.3%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
Simplified99.7%
if -2100 < F < -2.4000000000000001e-209 or 1.50000000000000011e-109 < F < 6e7Initial program 99.3%
Taylor expanded in B around 0 93.9%
if -2.4000000000000001e-209 < F < 1.50000000000000011e-109Initial program 99.5%
Taylor expanded in B around 0 91.9%
Taylor expanded in F around 0 91.9%
if 6e7 < F Initial program 51.2%
Taylor expanded in F around inf 99.6%
Final simplification96.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(t_2 (- (* (/ F (sin B)) t_1) (/ x B))))
(if (<= F -420.0)
(+ t_0 (/ (/ F (- (/ -1.0 F) F)) (sin B)))
(if (<= F -5.2e-202)
t_2
(if (<= F 8.2e-111)
(- (* t_1 (/ F B)) (/ x (tan B)))
(if (<= F 45000000.0) t_2 (+ t_0 (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_2 = ((F / sin(B)) * t_1) - (x / B);
double tmp;
if (F <= -420.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B));
} else if (F <= -5.2e-202) {
tmp = t_2;
} else if (F <= 8.2e-111) {
tmp = (t_1 * (F / B)) - (x / tan(B));
} else if (F <= 45000000.0) {
tmp = t_2;
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
t_2 = ((f / sin(b)) * t_1) - (x / b)
if (f <= (-420.0d0)) then
tmp = t_0 + ((f / (((-1.0d0) / f) - f)) / sin(b))
else if (f <= (-5.2d-202)) then
tmp = t_2
else if (f <= 8.2d-111) then
tmp = (t_1 * (f / b)) - (x / tan(b))
else if (f <= 45000000.0d0) then
tmp = t_2
else
tmp = t_0 + (1.0d0 / sin(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 t_1 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double t_2 = ((F / Math.sin(B)) * t_1) - (x / B);
double tmp;
if (F <= -420.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / Math.sin(B));
} else if (F <= -5.2e-202) {
tmp = t_2;
} else if (F <= 8.2e-111) {
tmp = (t_1 * (F / B)) - (x / Math.tan(B));
} else if (F <= 45000000.0) {
tmp = t_2;
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) t_2 = ((F / math.sin(B)) * t_1) - (x / B) tmp = 0 if F <= -420.0: tmp = t_0 + ((F / ((-1.0 / F) - F)) / math.sin(B)) elif F <= -5.2e-202: tmp = t_2 elif F <= 8.2e-111: tmp = (t_1 * (F / B)) - (x / math.tan(B)) elif F <= 45000000.0: tmp = t_2 else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 t_2 = Float64(Float64(Float64(F / sin(B)) * t_1) - Float64(x / B)) tmp = 0.0 if (F <= -420.0) tmp = Float64(t_0 + Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B))); elseif (F <= -5.2e-202) tmp = t_2; elseif (F <= 8.2e-111) tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / tan(B))); elseif (F <= 45000000.0) tmp = t_2; else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; t_2 = ((F / sin(B)) * t_1) - (x / B); tmp = 0.0; if (F <= -420.0) tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B)); elseif (F <= -5.2e-202) tmp = t_2; elseif (F <= 8.2e-111) tmp = (t_1 * (F / B)) - (x / tan(B)); elseif (F <= 45000000.0) tmp = t_2; else tmp = t_0 + (1.0 / sin(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]}, Block[{t$95$1 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -420.0], N[(t$95$0 + N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-202], t$95$2, If[LessEqual[F, 8.2e-111], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 45000000.0], t$95$2, 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}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
t_2 := \frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\
\mathbf{if}\;F \leq -420:\\
\;\;\;\;t_0 + \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-202}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-111}:\\
\;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 45000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -420Initial program 60.0%
Taylor expanded in x around 0 60.0%
+-commutative60.0%
unpow260.0%
fma-udef60.0%
Simplified60.0%
associate-*l/75.2%
sqrt-div75.2%
metadata-eval75.2%
un-div-inv75.3%
Applied egg-rr75.3%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
Simplified99.7%
if -420 < F < -5.20000000000000019e-202 or 8.19999999999999936e-111 < F < 4.5e7Initial program 99.3%
Taylor expanded in B around 0 93.8%
if -5.20000000000000019e-202 < F < 8.19999999999999936e-111Initial program 99.5%
Taylor expanded in B around 0 92.0%
div-inv99.7%
expm1-log1p-u82.6%
expm1-udef42.6%
Applied egg-rr37.2%
expm1-def82.6%
expm1-log1p99.7%
Simplified92.2%
if 4.5e7 < F Initial program 51.2%
Taylor expanded in F around inf 99.6%
Final simplification96.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(+ t_0 (/ (/ F (- (/ -1.0 F) F)) (sin B)))
(if (<= F 0.0001)
(+ t_0 (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(+ t_0 (/ (/ F (+ F (/ 1.0 F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B));
} else if (F <= 0.0001) {
tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = t_0 + ((f / (((-1.0d0) / f) - f)) / sin(b))
else if (f <= 0.0001d0) then
tmp = t_0 + ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + ((f / (f + (1.0d0 / f))) / sin(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 <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / Math.sin(B));
} else if (F <= 0.0001) {
tmp = t_0 + ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = t_0 + ((F / ((-1.0 / F) - F)) / math.sin(B)) elif F <= 0.0001: tmp = t_0 + ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) else: tmp = t_0 + ((F / (F + (1.0 / F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(t_0 + Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B))); elseif (F <= 0.0001) tmp = Float64(t_0 + Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B)); elseif (F <= 0.0001) tmp = t_0 + ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))); else tmp = t_0 + ((F / (F + (1.0 / F))) / sin(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, -43000.0], N[(t$95$0 + N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0001], N[(t$95$0 + N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;t_0 + \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 0.0001:\\
\;\;\;\;t_0 + \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{F}{F + \frac{1}{F}}}{\sin B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
unpow259.6%
fma-udef59.6%
Simplified59.6%
associate-*l/74.9%
sqrt-div74.9%
metadata-eval74.9%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
Simplified99.7%
if -43000 < F < 1.00000000000000005e-4Initial program 99.4%
Taylor expanded in B around 0 84.7%
Taylor expanded in F around 0 84.4%
if 1.00000000000000005e-4 < F Initial program 54.1%
Taylor expanded in x around 0 54.1%
+-commutative54.1%
unpow254.1%
fma-udef54.1%
Simplified54.1%
associate-*l/71.3%
sqrt-div71.4%
metadata-eval71.4%
un-div-inv71.4%
Applied egg-rr71.4%
Taylor expanded in F around inf 97.0%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.08)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 7e-5)
(+ t_0 (/ F (* B (sqrt (+ 2.0 (* x 2.0))))))
(+ 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 <= -0.08) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 7e-5) {
tmp = t_0 + (F / (B * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.08d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 7d-5) then
tmp = t_0 + (f / (b * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + (1.0d0 / sin(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 <= -0.08) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 7e-5) {
tmp = t_0 + (F / (B * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.08: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 7e-5: tmp = t_0 + (F / (B * math.sqrt((2.0 + (x * 2.0))))) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.08) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 7e-5) tmp = Float64(t_0 + Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.08) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 7e-5) tmp = t_0 + (F / (B * sqrt((2.0 + (x * 2.0))))); else tmp = t_0 + (1.0 / sin(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, -0.08], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e-5], N[(t$95$0 + N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 -0.08:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-5}:\\
\;\;\;\;t_0 + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.0800000000000000017Initial program 60.0%
Taylor expanded in F around -inf 98.9%
+-commutative98.9%
unsub-neg98.9%
un-div-inv99.0%
Applied egg-rr99.0%
if -0.0800000000000000017 < F < 6.9999999999999994e-5Initial program 99.4%
fma-def99.4%
*-commutative99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*l/99.4%
associate-/l*99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 84.5%
Taylor expanded in F around 0 84.2%
if 6.9999999999999994e-5 < F Initial program 54.1%
Taylor expanded in F around inf 96.9%
Final simplification92.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.13)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 0.0001)
(+ t_0 (/ F (* B (sqrt (+ 2.0 (* x 2.0))))))
(+ t_0 (/ (/ F (+ F (/ 1.0 F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.13) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 0.0001) {
tmp = t_0 + (F / (B * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.13d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 0.0001d0) then
tmp = t_0 + (f / (b * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + ((f / (f + (1.0d0 / f))) / sin(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 <= -0.13) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 0.0001) {
tmp = t_0 + (F / (B * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.13: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 0.0001: tmp = t_0 + (F / (B * math.sqrt((2.0 + (x * 2.0))))) else: tmp = t_0 + ((F / (F + (1.0 / F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 0.0001) tmp = Float64(t_0 + Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.13) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 0.0001) tmp = t_0 + (F / (B * sqrt((2.0 + (x * 2.0))))); else tmp = t_0 + ((F / (F + (1.0 / F))) / sin(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, -0.13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0001], N[(t$95$0 + N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.13:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 0.0001:\\
\;\;\;\;t_0 + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{F}{F + \frac{1}{F}}}{\sin B}\\
\end{array}
\end{array}
if F < -0.13Initial program 60.0%
Taylor expanded in F around -inf 98.9%
+-commutative98.9%
unsub-neg98.9%
un-div-inv99.0%
Applied egg-rr99.0%
if -0.13 < F < 1.00000000000000005e-4Initial program 99.4%
fma-def99.4%
*-commutative99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*l/99.4%
associate-/l*99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 84.5%
Taylor expanded in F around 0 84.2%
if 1.00000000000000005e-4 < F Initial program 54.1%
Taylor expanded in x around 0 54.1%
+-commutative54.1%
unpow254.1%
fma-udef54.1%
Simplified54.1%
associate-*l/71.3%
sqrt-div71.4%
metadata-eval71.4%
un-div-inv71.4%
Applied egg-rr71.4%
Taylor expanded in F around inf 97.0%
Final simplification92.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(+ t_0 (/ (/ F (- (/ -1.0 F) F)) (sin B)))
(if (<= F 0.0001)
(+ t_0 (/ F (* B (sqrt (+ 2.0 (* x 2.0))))))
(+ t_0 (/ (/ F (+ F (/ 1.0 F))) (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B));
} else if (F <= 0.0001) {
tmp = t_0 + (F / (B * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = t_0 + ((f / (((-1.0d0) / f) - f)) / sin(b))
else if (f <= 0.0001d0) then
tmp = t_0 + (f / (b * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = t_0 + ((f / (f + (1.0d0 / f))) / sin(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 <= -43000.0) {
tmp = t_0 + ((F / ((-1.0 / F) - F)) / Math.sin(B));
} else if (F <= 0.0001) {
tmp = t_0 + (F / (B * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = t_0 + ((F / (F + (1.0 / F))) / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = t_0 + ((F / ((-1.0 / F) - F)) / math.sin(B)) elif F <= 0.0001: tmp = t_0 + (F / (B * math.sqrt((2.0 + (x * 2.0))))) else: tmp = t_0 + ((F / (F + (1.0 / F))) / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(t_0 + Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B))); elseif (F <= 0.0001) tmp = Float64(t_0 + Float64(F / Float64(B * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(t_0 + Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = t_0 + ((F / ((-1.0 / F) - F)) / sin(B)); elseif (F <= 0.0001) tmp = t_0 + (F / (B * sqrt((2.0 + (x * 2.0))))); else tmp = t_0 + ((F / (F + (1.0 / F))) / sin(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, -43000.0], N[(t$95$0 + N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0001], N[(t$95$0 + N[(F / N[(B * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;t_0 + \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B}\\
\mathbf{elif}\;F \leq 0.0001:\\
\;\;\;\;t_0 + \frac{F}{B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{\frac{F}{F + \frac{1}{F}}}{\sin B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
unpow259.6%
fma-udef59.6%
Simplified59.6%
associate-*l/74.9%
sqrt-div74.9%
metadata-eval74.9%
un-div-inv75.0%
Applied egg-rr75.0%
Taylor expanded in F around -inf 99.7%
neg-mul-199.7%
Simplified99.7%
if -43000 < F < 1.00000000000000005e-4Initial program 99.4%
fma-def99.4%
*-commutative99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*l/99.4%
associate-/l*99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in B around 0 84.7%
Taylor expanded in F around 0 84.4%
if 1.00000000000000005e-4 < F Initial program 54.1%
Taylor expanded in x around 0 54.1%
+-commutative54.1%
unpow254.1%
fma-udef54.1%
Simplified54.1%
associate-*l/71.3%
sqrt-div71.4%
metadata-eval71.4%
un-div-inv71.4%
Applied egg-rr71.4%
Taylor expanded in F around inf 97.0%
Final simplification92.6%
(FPCore (F B x)
:precision binary64
(if (<= F -240.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.6e-223)
(-
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))
(+ (/ x B) (* -0.3333333333333333 (* B x))))
(if (<= F 5.9e-87)
(- (/ (* x (cos B)) (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -240.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.6e-223) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 5.9e-87) {
tmp = -((x * cos(B)) / sin(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-240.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.6d-223)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else if (f <= 5.9d-87) then
tmp = -((x * cos(b)) / sin(b))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -240.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.6e-223) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 5.9e-87) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -240.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.6e-223: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x))) elif F <= 5.9e-87: tmp = -((x * math.cos(B)) / math.sin(B)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -240.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.6e-223) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); elseif (F <= 5.9e-87) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -240.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.6e-223) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (B * x))); elseif (F <= 5.9e-87) tmp = -((x * cos(B)) / sin(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -240.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.6e-223], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.9e-87], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -240:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-223}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{elif}\;F \leq 5.9 \cdot 10^{-87}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -240Initial program 60.0%
Taylor expanded in F around -inf 98.9%
+-commutative98.9%
unsub-neg98.9%
un-div-inv99.0%
Applied egg-rr99.0%
if -240 < F < -2.6e-223Initial program 99.5%
Taylor expanded in B around 0 83.0%
Taylor expanded in B around 0 80.8%
if -2.6e-223 < F < 5.8999999999999996e-87Initial program 99.4%
Taylor expanded in F around -inf 32.2%
Taylor expanded in x around inf 81.4%
mul-1-neg81.4%
Simplified81.4%
if 5.8999999999999996e-87 < F Initial program 61.1%
Taylor expanded in F around inf 86.6%
Final simplification88.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.6e-223)
(- t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(if (<= F 1.12e-111)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 5.5e-49)
(- t_0 (/ x B))
(if (<= F 2.15e-19)
(+ t_1 (/ -1.0 B))
(if (<= F 5.2e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_1 (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 1.12e-111) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 5.5e-49) {
tmp = t_0 - (x / B);
} else if (F <= 2.15e-19) {
tmp = t_1 + (-1.0 / B);
} else if (F <= 5.2e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.6d-223)) then
tmp = t_0 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else if (f <= 1.12d-111) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 5.5d-49) then
tmp = t_0 - (x / b)
else if (f <= 2.15d-19) then
tmp = t_1 + ((-1.0d0) / b)
else if (f <= 5.2d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_1 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 1.12e-111) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 5.5e-49) {
tmp = t_0 - (x / B);
} else if (F <= 2.15e-19) {
tmp = t_1 + (-1.0 / B);
} else if (F <= 5.2e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.6e-223: tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))) elif F <= 1.12e-111: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 5.5e-49: tmp = t_0 - (x / B) elif F <= 2.15e-19: tmp = t_1 + (-1.0 / B) elif F <= 5.2e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_1 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.6e-223) tmp = Float64(t_0 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); elseif (F <= 1.12e-111) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 5.5e-49) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 2.15e-19) tmp = Float64(t_1 + Float64(-1.0 / B)); elseif (F <= 5.2e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.6e-223) tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))); elseif (F <= 1.12e-111) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 5.5e-49) tmp = t_0 - (x / B); elseif (F <= 2.15e-19) tmp = t_1 + (-1.0 / B); elseif (F <= 5.2e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_1 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -43000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.6e-223], N[(t$95$0 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.12e-111], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 5.5e-49], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.15e-19], N[(t$95$1 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-223}:\\
\;\;\;\;t_0 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{-111}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-49}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{-19}:\\
\;\;\;\;t_1 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 80.8%
if -43000 < F < -2.6e-223Initial program 99.4%
Taylor expanded in B around 0 83.4%
Taylor expanded in B around 0 78.6%
if -2.6e-223 < F < 1.12000000000000009e-111Initial program 99.5%
Taylor expanded in F around -inf 32.6%
Taylor expanded in x around inf 85.2%
mul-1-neg85.2%
Simplified85.2%
if 1.12000000000000009e-111 < F < 5.50000000000000031e-49Initial program 99.3%
Taylor expanded in B around 0 67.5%
Taylor expanded in B around 0 59.1%
if 5.50000000000000031e-49 < F < 2.15e-19Initial program 99.0%
Taylor expanded in F around -inf 34.0%
Taylor expanded in B around 0 36.5%
if 2.15e-19 < F < 5.2000000000000001e40Initial program 99.0%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 79.9%
if 5.2000000000000001e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification78.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))))
(if (<= F -245.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.6e-223)
(- t_1 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(if (<= F 9e-109)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 4.2e-49)
(- t_1 (/ x B))
(if (<= F 1.65e-19)
(+ t_0 (/ -1.0 B))
(if (<= F 6e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_0 (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -245.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.6e-223) {
tmp = t_1 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 9e-109) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 4.2e-49) {
tmp = t_1 - (x / B);
} else if (F <= 1.65e-19) {
tmp = t_0 + (-1.0 / B);
} else if (F <= 6e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
if (f <= (-245.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.6d-223)) then
tmp = t_1 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else if (f <= 9d-109) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 4.2d-49) then
tmp = t_1 - (x / b)
else if (f <= 1.65d-19) then
tmp = t_0 + ((-1.0d0) / b)
else if (f <= 6d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_0 + (1.0d0 / 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 t_1 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double tmp;
if (F <= -245.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.6e-223) {
tmp = t_1 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 9e-109) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 4.2e-49) {
tmp = t_1 - (x / B);
} else if (F <= 1.65e-19) {
tmp = t_0 + (-1.0 / B);
} else if (F <= 6e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) tmp = 0 if F <= -245.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.6e-223: tmp = t_1 - ((x / B) + (-0.3333333333333333 * (B * x))) elif F <= 9e-109: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 4.2e-49: tmp = t_1 - (x / B) elif F <= 1.65e-19: tmp = t_0 + (-1.0 / B) elif F <= 6e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) tmp = 0.0 if (F <= -245.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.6e-223) tmp = Float64(t_1 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); elseif (F <= 9e-109) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 4.2e-49) tmp = Float64(t_1 - Float64(x / B)); elseif (F <= 1.65e-19) tmp = Float64(t_0 + Float64(-1.0 / B)); elseif (F <= 6e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); tmp = 0.0; if (F <= -245.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.6e-223) tmp = t_1 - ((x / B) + (-0.3333333333333333 * (B * x))); elseif (F <= 9e-109) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 4.2e-49) tmp = t_1 - (x / B); elseif (F <= 1.65e-19) tmp = t_0 + (-1.0 / B); elseif (F <= 6e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_0 + (1.0 / 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]}, Block[{t$95$1 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -245.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.6e-223], N[(t$95$1 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-109], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 4.2e-49], N[(t$95$1 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.65e-19], N[(t$95$0 + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{if}\;F \leq -245:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-223}:\\
\;\;\;\;t_1 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-109}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-49}:\\
\;\;\;\;t_1 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-19}:\\
\;\;\;\;t_0 + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -245Initial program 60.0%
Taylor expanded in F around -inf 98.9%
+-commutative98.9%
unsub-neg98.9%
un-div-inv99.0%
Applied egg-rr99.0%
if -245 < F < -2.6e-223Initial program 99.5%
Taylor expanded in B around 0 83.0%
Taylor expanded in B around 0 80.8%
if -2.6e-223 < F < 9.0000000000000002e-109Initial program 99.5%
Taylor expanded in F around -inf 32.6%
Taylor expanded in x around inf 85.2%
mul-1-neg85.2%
Simplified85.2%
if 9.0000000000000002e-109 < F < 4.1999999999999998e-49Initial program 99.3%
Taylor expanded in B around 0 67.5%
Taylor expanded in B around 0 59.1%
if 4.1999999999999998e-49 < F < 1.6499999999999999e-19Initial program 99.0%
Taylor expanded in F around -inf 34.0%
Taylor expanded in B around 0 36.5%
if 1.6499999999999999e-19 < F < 6.0000000000000004e40Initial program 99.0%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 79.9%
if 6.0000000000000004e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification84.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(* x (+ (/ 1.0 B) (* B -0.3333333333333333)))))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.9e-224)
t_0
(if (<= F 1.75e-104)
(+ t_1 (/ F (* B (- (/ (- -1.0 x) F) F))))
(if (<= F 6.5e-64)
t_0
(if (<= F 1.65e-19)
(- (* (/ 1.0 F) (/ F B)) (/ x (tan B)))
(if (<= F 7.5e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_1 (/ 1.0 B))))))))))
double code(double F, double B, double x) {
double t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.9e-224) {
tmp = t_0;
} else if (F <= 1.75e-104) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 6.5e-64) {
tmp = t_0;
} else if (F <= 1.65e-19) {
tmp = ((1.0 / F) * (F / B)) - (x / tan(B));
} else if (F <= 7.5e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x * ((1.0d0 / b) + (b * (-0.3333333333333333d0))))
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.9d-224)) then
tmp = t_0
else if (f <= 1.75d-104) then
tmp = t_1 + (f / (b * ((((-1.0d0) - x) / f) - f)))
else if (f <= 6.5d-64) then
tmp = t_0
else if (f <= 1.65d-19) then
tmp = ((1.0d0 / f) * (f / b)) - (x / tan(b))
else if (f <= 7.5d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_1 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.9e-224) {
tmp = t_0;
} else if (F <= 1.75e-104) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 6.5e-64) {
tmp = t_0;
} else if (F <= 1.65e-19) {
tmp = ((1.0 / F) * (F / B)) - (x / Math.tan(B));
} else if (F <= 7.5e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * ((1.0 / B) + (B * -0.3333333333333333))) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.9e-224: tmp = t_0 elif F <= 1.75e-104: tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))) elif F <= 6.5e-64: tmp = t_0 elif F <= 1.65e-19: tmp = ((1.0 / F) * (F / B)) - (x / math.tan(B)) elif F <= 7.5e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_1 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x * Float64(Float64(1.0 / B) + Float64(B * -0.3333333333333333)))) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.9e-224) tmp = t_0; elseif (F <= 1.75e-104) tmp = Float64(t_1 + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); elseif (F <= 6.5e-64) tmp = t_0; elseif (F <= 1.65e-19) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / B)) - Float64(x / tan(B))); elseif (F <= 7.5e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x * ((1.0 / B) + (B * -0.3333333333333333))); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.9e-224) tmp = t_0; elseif (F <= 1.75e-104) tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))); elseif (F <= 6.5e-64) tmp = t_0; elseif (F <= 1.65e-19) tmp = ((1.0 / F) * (F / B)) - (x / tan(B)); elseif (F <= 7.5e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_1 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[(1.0 / B), $MachinePrecision] + N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -43000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.9e-224], t$95$0, If[LessEqual[F, 1.75e-104], N[(t$95$1 + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-64], t$95$0, If[LessEqual[F, 1.65e-19], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x \cdot \left(\frac{1}{B} + B \cdot -0.3333333333333333\right)\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.9 \cdot 10^{-224}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-104}:\\
\;\;\;\;t_1 + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-64}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{-19}:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 80.8%
if -43000 < F < -3.8999999999999998e-224 or 1.75000000000000014e-104 < F < 6.5000000000000004e-64Initial program 99.4%
Taylor expanded in B around 0 80.6%
Taylor expanded in B around 0 76.4%
Taylor expanded in F around 0 76.2%
if -3.8999999999999998e-224 < F < 1.75000000000000014e-104Initial program 99.4%
fma-def99.4%
*-commutative99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 89.6%
Taylor expanded in F around -inf 83.5%
neg-mul-183.5%
+-commutative83.5%
unsub-neg83.5%
associate-*r/83.5%
distribute-lft-in83.5%
metadata-eval83.5%
associate-*r*83.5%
metadata-eval83.5%
Simplified83.5%
if 6.5000000000000004e-64 < F < 1.6499999999999999e-19Initial program 99.1%
Taylor expanded in B around 0 60.4%
Taylor expanded in F around inf 42.1%
div-inv99.4%
expm1-log1p-u77.2%
expm1-udef77.2%
Applied egg-rr20.3%
expm1-def77.2%
expm1-log1p99.4%
Simplified42.4%
if 1.6499999999999999e-19 < F < 7.4999999999999996e40Initial program 99.0%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 79.9%
if 7.4999999999999996e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.6e-223)
(+ t_0 (* x (- (/ -1.0 B) (* B -0.3333333333333333))))
(if (<= F 1.75e-109)
(+ t_1 (/ F (* B (- (/ (- -1.0 x) F) F))))
(if (<= F 0.0001)
(- t_0 (/ x B))
(if (<= F 2.1e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_1 (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0 + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.75e-109) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 0.0001) {
tmp = t_0 - (x / B);
} else if (F <= 2.1e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.6d-223)) then
tmp = t_0 + (x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0))))
else if (f <= 1.75d-109) then
tmp = t_1 + (f / (b * ((((-1.0d0) - x) / f) - f)))
else if (f <= 0.0001d0) then
tmp = t_0 - (x / b)
else if (f <= 2.1d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_1 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0 + (x * ((-1.0 / B) - (B * -0.3333333333333333)));
} else if (F <= 1.75e-109) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 0.0001) {
tmp = t_0 - (x / B);
} else if (F <= 2.1e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.6e-223: tmp = t_0 + (x * ((-1.0 / B) - (B * -0.3333333333333333))) elif F <= 1.75e-109: tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))) elif F <= 0.0001: tmp = t_0 - (x / B) elif F <= 2.1e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_1 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.6e-223) tmp = Float64(t_0 + Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333)))); elseif (F <= 1.75e-109) tmp = Float64(t_1 + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); elseif (F <= 0.0001) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 2.1e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.6e-223) tmp = t_0 + (x * ((-1.0 / B) - (B * -0.3333333333333333))); elseif (F <= 1.75e-109) tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))); elseif (F <= 0.0001) tmp = t_0 - (x / B); elseif (F <= 2.1e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_1 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -43000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.6e-223], N[(t$95$0 + N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.75e-109], N[(t$95$1 + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0001], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-223}:\\
\;\;\;\;t_0 + x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-109}:\\
\;\;\;\;t_1 + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{elif}\;F \leq 0.0001:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 80.8%
if -43000 < F < -2.6e-223Initial program 99.4%
Taylor expanded in B around 0 83.4%
Taylor expanded in B around 0 78.5%
if -2.6e-223 < F < 1.75e-109Initial program 99.5%
fma-def99.5%
*-commutative99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around -inf 85.0%
neg-mul-185.0%
+-commutative85.0%
unsub-neg85.0%
associate-*r/85.0%
distribute-lft-in85.0%
metadata-eval85.0%
associate-*r*85.0%
metadata-eval85.0%
Simplified85.0%
if 1.75e-109 < F < 1.00000000000000005e-4Initial program 99.1%
Taylor expanded in B around 0 65.2%
Taylor expanded in B around 0 53.5%
if 1.00000000000000005e-4 < F < 2.1000000000000001e40Initial program 99.1%
Taylor expanded in F around inf 83.9%
Taylor expanded in B around 0 83.9%
if 2.1000000000000001e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.6e-223)
(- t_0 (+ (/ x B) (* -0.3333333333333333 (* B x))))
(if (<= F 1.42e-108)
(+ t_1 (/ F (* B (- (/ (- -1.0 x) F) F))))
(if (<= F 0.0001)
(- t_0 (/ x B))
(if (<= F 7.5e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_1 (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 1.42e-108) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 0.0001) {
tmp = t_0 - (x / B);
} else if (F <= 7.5e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.6d-223)) then
tmp = t_0 - ((x / b) + ((-0.3333333333333333d0) * (b * x)))
else if (f <= 1.42d-108) then
tmp = t_1 + (f / (b * ((((-1.0d0) - x) / f) - f)))
else if (f <= 0.0001d0) then
tmp = t_0 - (x / b)
else if (f <= 7.5d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_1 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x)));
} else if (F <= 1.42e-108) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 0.0001) {
tmp = t_0 - (x / B);
} else if (F <= 7.5e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.6e-223: tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))) elif F <= 1.42e-108: tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))) elif F <= 0.0001: tmp = t_0 - (x / B) elif F <= 7.5e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_1 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.6e-223) tmp = Float64(t_0 - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(B * x)))); elseif (F <= 1.42e-108) tmp = Float64(t_1 + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); elseif (F <= 0.0001) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 7.5e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.6e-223) tmp = t_0 - ((x / B) + (-0.3333333333333333 * (B * x))); elseif (F <= 1.42e-108) tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))); elseif (F <= 0.0001) tmp = t_0 - (x / B); elseif (F <= 7.5e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_1 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -43000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.6e-223], N[(t$95$0 - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42e-108], N[(t$95$1 + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0001], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-223}:\\
\;\;\;\;t_0 - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(B \cdot x\right)\right)\\
\mathbf{elif}\;F \leq 1.42 \cdot 10^{-108}:\\
\;\;\;\;t_1 + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{elif}\;F \leq 0.0001:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 80.8%
if -43000 < F < -2.6e-223Initial program 99.4%
Taylor expanded in B around 0 83.4%
Taylor expanded in B around 0 78.6%
if -2.6e-223 < F < 1.42e-108Initial program 99.5%
fma-def99.5%
*-commutative99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around -inf 85.0%
neg-mul-185.0%
+-commutative85.0%
unsub-neg85.0%
associate-*r/85.0%
distribute-lft-in85.0%
metadata-eval85.0%
associate-*r*85.0%
metadata-eval85.0%
Simplified85.0%
if 1.42e-108 < F < 1.00000000000000005e-4Initial program 99.1%
Taylor expanded in B around 0 65.2%
Taylor expanded in B around 0 53.5%
if 1.00000000000000005e-4 < F < 7.4999999999999996e40Initial program 99.1%
Taylor expanded in F around inf 83.9%
Taylor expanded in B around 0 83.9%
if 7.4999999999999996e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification78.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B)))
(t_1 (* x (/ -1.0 (tan B)))))
(if (<= F -43000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.6e-223)
t_0
(if (<= F 2.1e-113)
(+ t_1 (/ F (* B (- (/ (- -1.0 x) F) F))))
(if (<= F 0.0001)
t_0
(if (<= F 1.35e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_1 (/ 1.0 B)))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0;
} else if (F <= 2.1e-113) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 0.0001) {
tmp = t_0;
} else if (F <= 1.35e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
t_1 = x * ((-1.0d0) / tan(b))
if (f <= (-43000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.6d-223)) then
tmp = t_0
else if (f <= 2.1d-113) then
tmp = t_1 + (f / (b * ((((-1.0d0) - x) / f) - f)))
else if (f <= 0.0001d0) then
tmp = t_0
else if (f <= 1.35d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_1 + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double t_1 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -43000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.6e-223) {
tmp = t_0;
} else if (F <= 2.1e-113) {
tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 0.0001) {
tmp = t_0;
} else if (F <= 1.35e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_1 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) t_1 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -43000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.6e-223: tmp = t_0 elif F <= 2.1e-113: tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))) elif F <= 0.0001: tmp = t_0 elif F <= 1.35e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_1 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -43000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.6e-223) tmp = t_0; elseif (F <= 2.1e-113) tmp = Float64(t_1 + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); elseif (F <= 0.0001) tmp = t_0; elseif (F <= 1.35e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_1 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); t_1 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -43000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.6e-223) tmp = t_0; elseif (F <= 2.1e-113) tmp = t_1 + (F / (B * (((-1.0 - x) / F) - F))); elseif (F <= 0.0001) tmp = t_0; elseif (F <= 1.35e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_1 + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -43000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.6e-223], t$95$0, If[LessEqual[F, 2.1e-113], N[(t$95$1 + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0001], t$95$0, If[LessEqual[F, 1.35e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -43000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.6 \cdot 10^{-223}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-113}:\\
\;\;\;\;t_1 + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{elif}\;F \leq 0.0001:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -43000Initial program 59.5%
Taylor expanded in F around -inf 98.9%
Taylor expanded in B around 0 80.8%
if -43000 < F < -2.6e-223 or 2.1e-113 < F < 1.00000000000000005e-4Initial program 99.3%
Taylor expanded in B around 0 77.8%
Taylor expanded in B around 0 70.7%
if -2.6e-223 < F < 2.1e-113Initial program 99.5%
fma-def99.5%
*-commutative99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 91.2%
Taylor expanded in F around -inf 85.0%
neg-mul-185.0%
+-commutative85.0%
unsub-neg85.0%
associate-*r/85.0%
distribute-lft-in85.0%
metadata-eval85.0%
associate-*r*85.0%
metadata-eval85.0%
Simplified85.0%
if 1.00000000000000005e-4 < F < 1.35000000000000005e40Initial program 99.1%
Taylor expanded in F around inf 83.9%
Taylor expanded in B around 0 83.9%
if 1.35000000000000005e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1020000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 8.5e-22)
(+ t_0 (/ F (* B (- (/ (- -1.0 x) F) F))))
(if (<= F 7e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_0 (/ 1.0 B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1020000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8.5e-22) {
tmp = t_0 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 7e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-1020000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8.5d-22) then
tmp = t_0 + (f / (b * ((((-1.0d0) - x) / f) - f)))
else if (f <= 7d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_0 + (1.0d0 / 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 <= -1020000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8.5e-22) {
tmp = t_0 + (F / (B * (((-1.0 - x) / F) - F)));
} else if (F <= 7e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1020000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8.5e-22: tmp = t_0 + (F / (B * (((-1.0 - x) / F) - F))) elif F <= 7e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1020000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8.5e-22) tmp = Float64(t_0 + Float64(F / Float64(B * Float64(Float64(Float64(-1.0 - x) / F) - F)))); elseif (F <= 7e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1020000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8.5e-22) tmp = t_0 + (F / (B * (((-1.0 - x) / F) - F))); elseif (F <= 7e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_0 + (1.0 / 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, -1020000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-22], N[(t$95$0 + N[(F / N[(B * N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1020000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-22}:\\
\;\;\;\;t_0 + \frac{F}{B \cdot \left(\frac{-1 - x}{F} - F\right)}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.02e6Initial program 58.1%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 82.1%
if -1.02e6 < F < 8.5000000000000001e-22Initial program 99.4%
fma-def99.4%
*-commutative99.4%
metadata-eval99.4%
metadata-eval99.4%
associate-*l/99.5%
associate-/l*99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 83.9%
Taylor expanded in F around -inf 66.8%
neg-mul-166.8%
+-commutative66.8%
unsub-neg66.8%
associate-*r/66.8%
distribute-lft-in66.8%
metadata-eval66.8%
associate-*r*66.8%
metadata-eval66.8%
Simplified66.8%
if 8.5000000000000001e-22 < F < 6.9999999999999998e40Initial program 99.0%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 79.9%
if 6.9999999999999998e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification73.4%
(FPCore (F B x)
:precision binary64
(if (<= F -2.1e-21)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.4e-226)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(if (or (<= F 3.4e-19) (not (<= F 5.6e+40)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B))
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-21) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.4e-226) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if ((F <= 3.4e-19) || !(F <= 5.6e+40)) {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
} else {
tmp = ((F / sin(B)) * (1.0 / F)) - (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.1d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.4d-226)) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else if ((f <= 3.4d-19) .or. (.not. (f <= 5.6d+40))) then
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
else
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.4e-226) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if ((F <= 3.4e-19) || !(F <= 5.6e+40)) {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
} else {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-21: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.4e-226: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) elif (F <= 3.4e-19) or not (F <= 5.6e+40): tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) else: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.4e-226) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); elseif ((F <= 3.4e-19) || !(F <= 5.6e+40)) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); else tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-21) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.4e-226) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); elseif ((F <= 3.4e-19) || ~((F <= 5.6e+40))) tmp = (x * (-1.0 / tan(B))) + (1.0 / B); else tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.4e-226], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 3.4e-19], N[Not[LessEqual[F, 5.6e+40]], $MachinePrecision]], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-226}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-19} \lor \neg \left(F \leq 5.6 \cdot 10^{+40}\right):\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.10000000000000013e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 78.5%
if -2.10000000000000013e-21 < F < -6.39999999999999965e-226Initial program 99.4%
Taylor expanded in B around 0 82.0%
Taylor expanded in B around 0 79.4%
Taylor expanded in F around inf 23.5%
Taylor expanded in x around inf 54.4%
mul-1-neg54.4%
*-commutative54.4%
fma-udef54.4%
distribute-rgt-neg-in54.4%
fma-udef54.4%
+-commutative54.4%
distribute-neg-in54.4%
distribute-neg-frac54.4%
metadata-eval54.4%
distribute-rgt-neg-in54.4%
metadata-eval54.4%
Simplified54.4%
if -6.39999999999999965e-226 < F < 3.4000000000000002e-19 or 5.6000000000000003e40 < F Initial program 74.7%
Taylor expanded in B around 0 62.7%
Taylor expanded in F around inf 60.9%
if 3.4000000000000002e-19 < F < 5.6000000000000003e40Initial program 99.0%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 79.9%
Final simplification67.2%
(FPCore (F B x)
:precision binary64
(if (<= F -2.1e-21)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.4e-225)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(if (<= F 7.8e-20)
(- (* (/ 1.0 F) (/ F B)) (/ x (tan B)))
(if (<= F 3.9e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-21) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.4e-225) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if (F <= 7.8e-20) {
tmp = ((1.0 / F) * (F / B)) - (x / tan(B));
} else if (F <= 3.9e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.1d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.4d-225)) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else if (f <= 7.8d-20) then
tmp = ((1.0d0 / f) * (f / b)) - (x / tan(b))
else if (f <= 3.9d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.4e-225) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if (F <= 7.8e-20) {
tmp = ((1.0 / F) * (F / B)) - (x / Math.tan(B));
} else if (F <= 3.9e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-21: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.4e-225: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) elif F <= 7.8e-20: tmp = ((1.0 / F) * (F / B)) - (x / math.tan(B)) elif F <= 3.9e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.4e-225) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); elseif (F <= 7.8e-20) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / B)) - Float64(x / tan(B))); elseif (F <= 3.9e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.1e-21) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.4e-225) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); elseif (F <= 7.8e-20) tmp = ((1.0 / F) * (F / B)) - (x / tan(B)); elseif (F <= 3.9e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.4e-225], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-20], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-225}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-20}:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -2.10000000000000013e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 78.5%
if -2.10000000000000013e-21 < F < -2.39999999999999996e-225Initial program 99.4%
Taylor expanded in B around 0 82.0%
Taylor expanded in B around 0 79.4%
Taylor expanded in F around inf 23.5%
Taylor expanded in x around inf 54.4%
mul-1-neg54.4%
*-commutative54.4%
fma-udef54.4%
distribute-rgt-neg-in54.4%
fma-udef54.4%
+-commutative54.4%
distribute-neg-in54.4%
distribute-neg-frac54.4%
metadata-eval54.4%
distribute-rgt-neg-in54.4%
metadata-eval54.4%
Simplified54.4%
if -2.39999999999999996e-225 < F < 7.80000000000000014e-20Initial program 99.4%
Taylor expanded in B around 0 84.7%
Taylor expanded in F around inf 56.5%
div-inv99.6%
expm1-log1p-u87.4%
expm1-udef52.2%
Applied egg-rr23.4%
expm1-def87.4%
expm1-log1p99.6%
Simplified56.6%
if 7.80000000000000014e-20 < F < 3.9000000000000001e40Initial program 99.0%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 79.9%
if 3.9000000000000001e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification68.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1.68e-21)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.05e-226)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(if (<= F 8.2e-21)
(+ t_0 (/ -1.0 (* F (/ B F))))
(if (<= F 7.5e+40)
(- (* (/ F (sin B)) (/ 1.0 F)) (/ x B))
(+ t_0 (/ 1.0 B))))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -1.68e-21) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.05e-226) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if (F <= 8.2e-21) {
tmp = t_0 + (-1.0 / (F * (B / F)));
} else if (F <= 7.5e+40) {
tmp = ((F / sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-1.68d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.05d-226)) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else if (f <= 8.2d-21) then
tmp = t_0 + ((-1.0d0) / (f * (b / f)))
else if (f <= 7.5d+40) then
tmp = ((f / sin(b)) * (1.0d0 / f)) - (x / b)
else
tmp = t_0 + (1.0d0 / 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 <= -1.68e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.05e-226) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if (F <= 8.2e-21) {
tmp = t_0 + (-1.0 / (F * (B / F)));
} else if (F <= 7.5e+40) {
tmp = ((F / Math.sin(B)) * (1.0 / F)) - (x / B);
} else {
tmp = t_0 + (1.0 / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -1.68e-21: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.05e-226: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) elif F <= 8.2e-21: tmp = t_0 + (-1.0 / (F * (B / F))) elif F <= 7.5e+40: tmp = ((F / math.sin(B)) * (1.0 / F)) - (x / B) else: tmp = t_0 + (1.0 / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -1.68e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.05e-226) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); elseif (F <= 8.2e-21) tmp = Float64(t_0 + Float64(-1.0 / Float64(F * Float64(B / F)))); elseif (F <= 7.5e+40) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(1.0 / F)) - Float64(x / B)); else tmp = Float64(t_0 + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -1.68e-21) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.05e-226) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); elseif (F <= 8.2e-21) tmp = t_0 + (-1.0 / (F * (B / F))); elseif (F <= 7.5e+40) tmp = ((F / sin(B)) * (1.0 / F)) - (x / B); else tmp = t_0 + (1.0 / 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, -1.68e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.05e-226], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-21], N[(t$95$0 + N[(-1.0 / N[(F * N[(B / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.5e+40], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -1.68 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{-226}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-21}:\\
\;\;\;\;t_0 + \frac{-1}{F \cdot \frac{B}{F}}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+40}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{1}{F} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.68000000000000006e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 78.5%
if -1.68000000000000006e-21 < F < -2.05000000000000019e-226Initial program 99.4%
Taylor expanded in B around 0 82.0%
Taylor expanded in B around 0 79.4%
Taylor expanded in F around inf 23.5%
Taylor expanded in x around inf 54.4%
mul-1-neg54.4%
*-commutative54.4%
fma-udef54.4%
distribute-rgt-neg-in54.4%
fma-udef54.4%
+-commutative54.4%
distribute-neg-in54.4%
distribute-neg-frac54.4%
metadata-eval54.4%
distribute-rgt-neg-in54.4%
metadata-eval54.4%
Simplified54.4%
if -2.05000000000000019e-226 < F < 8.19999999999999988e-21Initial program 99.4%
Taylor expanded in B around 0 84.7%
Taylor expanded in F around inf 56.5%
clear-num57.9%
frac-2neg57.9%
metadata-eval57.9%
frac-times57.9%
metadata-eval57.9%
add-sqr-sqrt15.2%
sqrt-unprod18.2%
sqr-neg18.2%
sqrt-unprod42.1%
add-sqr-sqrt57.1%
Applied egg-rr57.1%
if 8.19999999999999988e-21 < F < 7.4999999999999996e40Initial program 99.0%
Taylor expanded in F around inf 79.8%
Taylor expanded in B around 0 79.9%
if 7.4999999999999996e40 < F Initial program 44.1%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around inf 71.9%
Final simplification68.5%
(FPCore (F B x)
:precision binary64
(if (<= F -2.3e-21)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.1e-227)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(if (<= F 3.45e-19)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(- (/ 1.0 B) (* x (+ (/ 1.0 B) (* B -0.3333333333333333))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-21) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.1e-227) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if (F <= 3.45e-19) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
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.3d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.1d-227)) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else if (f <= 3.45d-19) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else
tmp = (1.0d0 / b) - (x * ((1.0d0 / b) + (b * (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.1e-227) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else if (F <= 3.45e-19) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-21: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.1e-227: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) elif F <= 3.45e-19: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) else: tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.1e-227) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); elseif (F <= 3.45e-19) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(Float64(1.0 / B) + Float64(B * -0.3333333333333333)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-21) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.1e-227) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); elseif (F <= 3.45e-19) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); else tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.1e-227], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.45e-19], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(N[(1.0 / B), $MachinePrecision] + N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{-227}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{elif}\;F \leq 3.45 \cdot 10^{-19}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \left(\frac{1}{B} + B \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -2.29999999999999999e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 78.5%
if -2.29999999999999999e-21 < F < -4.10000000000000009e-227Initial program 99.4%
Taylor expanded in B around 0 82.0%
Taylor expanded in B around 0 79.4%
Taylor expanded in F around inf 23.5%
Taylor expanded in x around inf 54.4%
mul-1-neg54.4%
*-commutative54.4%
fma-udef54.4%
distribute-rgt-neg-in54.4%
fma-udef54.4%
+-commutative54.4%
distribute-neg-in54.4%
distribute-neg-frac54.4%
metadata-eval54.4%
distribute-rgt-neg-in54.4%
metadata-eval54.4%
Simplified54.4%
if -4.10000000000000009e-227 < F < 3.4499999999999999e-19Initial program 99.4%
Taylor expanded in F around -inf 30.9%
Taylor expanded in B around 0 51.4%
if 3.4499999999999999e-19 < F Initial program 55.4%
Taylor expanded in B around 0 34.3%
Taylor expanded in B around 0 20.1%
Taylor expanded in F around inf 47.8%
Final simplification60.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.68e-21)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.05e-226)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.68e-21) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.05e-226) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.68d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.05d-226)) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.68e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.05e-226) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.68e-21: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.05e-226: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.68e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.05e-226) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.68e-21) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.05e-226) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.68e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.05e-226], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.68 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{-226}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{B}\\
\end{array}
\end{array}
if F < -1.68000000000000006e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 78.5%
if -1.68000000000000006e-21 < F < -2.05000000000000019e-226Initial program 99.4%
Taylor expanded in B around 0 82.0%
Taylor expanded in B around 0 79.4%
Taylor expanded in F around inf 23.5%
Taylor expanded in x around inf 54.4%
mul-1-neg54.4%
*-commutative54.4%
fma-udef54.4%
distribute-rgt-neg-in54.4%
fma-udef54.4%
+-commutative54.4%
distribute-neg-in54.4%
distribute-neg-frac54.4%
metadata-eval54.4%
distribute-rgt-neg-in54.4%
metadata-eval54.4%
Simplified54.4%
if -2.05000000000000019e-226 < F Initial program 77.2%
Taylor expanded in B around 0 59.3%
Taylor expanded in F around inf 57.1%
Final simplification64.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.7e-21)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.65e-84)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(- (/ 1.0 B) (* x (+ (/ 1.0 B) (* B -0.3333333333333333)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-21) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.65e-84) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.7d-21)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.65d-84) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 / b) - (x * ((1.0d0 / b) + (b * (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-21) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.65e-84) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-21: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.65e-84: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-21) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.65e-84) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(Float64(1.0 / B) + Float64(B * -0.3333333333333333)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-21) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.65e-84) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.65e-84], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(N[(1.0 / B), $MachinePrecision] + N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.65 \cdot 10^{-84}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \left(\frac{1}{B} + B \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -1.7e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 78.5%
if -1.7e-21 < F < 3.6500000000000002e-84Initial program 99.4%
Taylor expanded in B around 0 87.0%
Taylor expanded in B around 0 55.7%
Taylor expanded in F around inf 19.7%
Taylor expanded in x around inf 40.8%
mul-1-neg40.8%
*-commutative40.8%
fma-udef40.8%
distribute-rgt-neg-in40.8%
fma-udef40.8%
+-commutative40.8%
distribute-neg-in40.8%
distribute-neg-frac40.8%
metadata-eval40.8%
distribute-rgt-neg-in40.8%
metadata-eval40.8%
Simplified40.8%
if 3.6500000000000002e-84 < F Initial program 61.1%
Taylor expanded in B around 0 36.9%
Taylor expanded in B around 0 22.1%
Taylor expanded in F around inf 42.3%
Final simplification54.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e-21)
(/ (- -1.0 x) B)
(if (<= F 4.5e-85)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(- (/ 1.0 B) (* x (+ (/ 1.0 B) (* B -0.3333333333333333)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-21) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.5e-85) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.9d-21)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.5d-85) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 / b) - (x * ((1.0d0 / b) + (b * (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-21) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.5e-85) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e-21: tmp = (-1.0 - x) / B elif F <= 4.5e-85: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e-21) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.5e-85) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(Float64(1.0 / B) + Float64(B * -0.3333333333333333)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e-21) tmp = (-1.0 - x) / B; elseif (F <= 4.5e-85) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-21], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.5e-85], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(N[(1.0 / B), $MachinePrecision] + N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \left(\frac{1}{B} + B \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -1.8999999999999999e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 48.9%
associate-*r/48.9%
distribute-lft-in48.9%
metadata-eval48.9%
neg-mul-148.9%
Simplified48.9%
if -1.8999999999999999e-21 < F < 4.50000000000000004e-85Initial program 99.4%
Taylor expanded in B around 0 87.0%
Taylor expanded in B around 0 55.7%
Taylor expanded in F around inf 19.7%
Taylor expanded in x around inf 40.8%
mul-1-neg40.8%
*-commutative40.8%
fma-udef40.8%
distribute-rgt-neg-in40.8%
fma-udef40.8%
+-commutative40.8%
distribute-neg-in40.8%
distribute-neg-frac40.8%
metadata-eval40.8%
distribute-rgt-neg-in40.8%
metadata-eval40.8%
Simplified40.8%
if 4.50000000000000004e-85 < F Initial program 61.1%
Taylor expanded in B around 0 36.9%
Taylor expanded in B around 0 22.1%
Taylor expanded in F around inf 42.3%
Final simplification44.0%
(FPCore (F B x)
:precision binary64
(if (<= F -1.75e-21)
(+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 1.45e-85)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(- (/ 1.0 B) (* x (+ (/ 1.0 B) (* B -0.3333333333333333)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-21) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.45e-85) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.75d-21)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 1.45d-85) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 / b) - (x * ((1.0d0 / b) + (b * (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-21) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.45e-85) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.75e-21: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 1.45e-85: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-21) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 1.45e-85) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(Float64(1.0 / B) + Float64(B * -0.3333333333333333)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.75e-21) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 1.45e-85) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 / B) - (x * ((1.0 / B) + (B * -0.3333333333333333))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-21], N[(N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45e-85], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(N[(1.0 / B), $MachinePrecision] + N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \left(\frac{1}{B} + B \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -1.7500000000000002e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 49.3%
if -1.7500000000000002e-21 < F < 1.4500000000000001e-85Initial program 99.4%
Taylor expanded in B around 0 87.0%
Taylor expanded in B around 0 55.7%
Taylor expanded in F around inf 19.7%
Taylor expanded in x around inf 40.8%
mul-1-neg40.8%
*-commutative40.8%
fma-udef40.8%
distribute-rgt-neg-in40.8%
fma-udef40.8%
+-commutative40.8%
distribute-neg-in40.8%
distribute-neg-frac40.8%
metadata-eval40.8%
distribute-rgt-neg-in40.8%
metadata-eval40.8%
Simplified40.8%
if 1.4500000000000001e-85 < F Initial program 61.1%
Taylor expanded in B around 0 36.9%
Taylor expanded in B around 0 22.1%
Taylor expanded in F around inf 42.3%
Final simplification44.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.7e-21)
(/ (- -1.0 x) B)
(if (<= F 5e-147)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-21) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-147) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.7d-21)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5d-147) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-21) {
tmp = (-1.0 - x) / B;
} else if (F <= 5e-147) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-21: tmp = (-1.0 - x) / B elif F <= 5e-147: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-21) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5e-147) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-21) tmp = (-1.0 - x) / B; elseif (F <= 5e-147) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-21], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5e-147], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-21}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-147}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.7e-21Initial program 61.3%
Taylor expanded in F around -inf 96.9%
Taylor expanded in B around 0 48.9%
associate-*r/48.9%
distribute-lft-in48.9%
metadata-eval48.9%
neg-mul-148.9%
Simplified48.9%
if -1.7e-21 < F < 5.00000000000000013e-147Initial program 99.5%
Taylor expanded in B around 0 89.9%
Taylor expanded in B around 0 57.4%
Taylor expanded in F around inf 20.5%
Taylor expanded in x around inf 44.1%
mul-1-neg44.1%
*-commutative44.1%
fma-udef44.1%
distribute-rgt-neg-in44.1%
fma-udef44.1%
+-commutative44.1%
distribute-neg-in44.1%
distribute-neg-frac44.1%
metadata-eval44.1%
distribute-rgt-neg-in44.1%
metadata-eval44.1%
Simplified44.1%
if 5.00000000000000013e-147 < F Initial program 65.4%
Taylor expanded in B around 0 40.0%
Taylor expanded in B around 0 24.3%
Taylor expanded in F around inf 39.1%
Taylor expanded in B around 0 39.0%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (<= F 2.25e-228) (/ (- -1.0 x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 2.25e-228) {
tmp = (-1.0 - 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.25d-228) then
tmp = ((-1.0d0) - 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.25e-228) {
tmp = (-1.0 - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 2.25e-228: tmp = (-1.0 - x) / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 2.25e-228) tmp = Float64(Float64(-1.0 - 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.25e-228) tmp = (-1.0 - x) / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 2.25e-228], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.25 \cdot 10^{-228}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 2.25e-228Initial program 77.7%
Taylor expanded in F around -inf 68.3%
Taylor expanded in B around 0 37.3%
associate-*r/37.3%
distribute-lft-in37.3%
metadata-eval37.3%
neg-mul-137.3%
Simplified37.3%
if 2.25e-228 < F Initial program 70.0%
Taylor expanded in B around 0 47.2%
Taylor expanded in B around 0 27.1%
Taylor expanded in F around inf 36.3%
Taylor expanded in B around 0 36.4%
Final simplification37.0%
(FPCore (F B x) :precision binary64 (/ (- 1.0 x) B))
double code(double F, double B, double x) {
return (1.0 - 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 = (1.0d0 - x) / b
end function
public static double code(double F, double B, double x) {
return (1.0 - x) / B;
}
def code(F, B, x): return (1.0 - x) / B
function code(F, B, x) return Float64(Float64(1.0 - x) / B) end
function tmp = code(F, B, x) tmp = (1.0 - x) / B; end
code[F_, B_, x_] := N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1 - x}{B}
\end{array}
Initial program 74.6%
Taylor expanded in B around 0 56.6%
Taylor expanded in B around 0 34.9%
Taylor expanded in F around inf 27.7%
Taylor expanded in B around 0 27.7%
Final simplification27.7%
(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 74.6%
Taylor expanded in B around 0 56.6%
Taylor expanded in B around 0 34.9%
Taylor expanded in F around inf 27.7%
Taylor expanded in x around 0 9.3%
Final simplification9.3%
herbie shell --seed 2023315
(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))))))