
(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
(if (<= F -400000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 550000000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* (/ x (sin B)) (cos B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -400000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 550000000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x / sin(B)) * cos(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 <= (-400000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 550000000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - ((x / sin(b)) * cos(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 <= -400000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 550000000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x / Math.sin(B)) * Math.cos(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 <= -400000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 550000000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x / math.sin(B)) * math.cos(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 <= -400000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 550000000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x / sin(B)) * cos(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 <= -400000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 550000000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - ((x / sin(B)) * cos(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -400000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 550000000000.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[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $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 -400000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 550000000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{\sin B} \cdot \cos B\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4e8Initial program 59.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -4e8 < F < 5.5e11Initial program 99.3%
Taylor expanded in x around 0 99.5%
associate-/l*99.5%
associate-/r/99.5%
Applied egg-rr99.5%
if 5.5e11 < F Initial program 67.8%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -150000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5e+17)
(- (* (/ 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 <= -150000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5e+17) {
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 <= (-150000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d+17) 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 <= -150000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5e+17) {
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 <= -150000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5e+17: 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 <= -150000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5e+17) 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 <= -150000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5e+17) 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, -150000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e+17], 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 -150000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{+17}:\\
\;\;\;\;\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 < -1.5e8Initial program 59.8%
Taylor expanded in F around -inf 99.7%
+-commutative99.7%
unsub-neg99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -1.5e8 < F < 1.5e17Initial program 99.3%
expm1-log1p-u76.3%
expm1-udef60.1%
div-inv60.1%
Applied egg-rr60.1%
expm1-def76.4%
expm1-log1p99.5%
Simplified99.5%
if 1.5e17 < F Initial program 66.9%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.9)
(+ t_0 (/ 1.0 (/ (* (sin B) (- (/ -1.0 F) F)) F)))
(if (<= F 1.5e+17)
(- (/ (/ F (sin B)) (sqrt (+ 2.0 (* x 2.0)))) (/ x (tan B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.9) {
tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= 1.5e+17) {
tmp = ((F / sin(B)) / sqrt((2.0 + (x * 2.0)))) - (x / tan(B));
} 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.9d0)) then
tmp = t_0 + (1.0d0 / ((sin(b) * (((-1.0d0) / f) - f)) / f))
else if (f <= 1.5d+17) then
tmp = ((f / sin(b)) / sqrt((2.0d0 + (x * 2.0d0)))) - (x / tan(b))
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.9) {
tmp = t_0 + (1.0 / ((Math.sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= 1.5e+17) {
tmp = ((F / Math.sin(B)) / Math.sqrt((2.0 + (x * 2.0)))) - (x / Math.tan(B));
} 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.9: tmp = t_0 + (1.0 / ((math.sin(B) * ((-1.0 / F) - F)) / F)) elif F <= 1.5e+17: tmp = ((F / math.sin(B)) / math.sqrt((2.0 + (x * 2.0)))) - (x / math.tan(B)) 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.9) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(sin(B) * Float64(Float64(-1.0 / F) - F)) / F))); elseif (F <= 1.5e+17) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(Float64(2.0 + Float64(x * 2.0)))) - Float64(x / tan(B))); 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.9) tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F)); elseif (F <= 1.5e+17) tmp = ((F / sin(B)) / sqrt((2.0 + (x * 2.0)))) - (x / tan(B)); 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.9], N[(t$95$0 + N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e+17], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.9:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B \cdot \left(\frac{-1}{F} - F\right)}{F}}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{+17}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2 + x \cdot 2}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 62.1%
associate-/r/73.9%
*-un-lft-identity73.9%
associate-/l*74.0%
+-commutative74.0%
fma-def74.0%
fma-def74.0%
metadata-eval74.0%
metadata-eval74.0%
Applied egg-rr74.0%
Taylor expanded in x around 0 74.0%
+-commutative74.0%
unpow274.0%
fma-udef74.0%
Simplified74.0%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -0.900000000000000022 < F < 1.5e17Initial program 99.3%
Taylor expanded in F around 0 98.1%
+-commutative98.1%
unsub-neg98.1%
sqrt-div98.0%
metadata-eval98.0%
un-div-inv98.0%
un-div-inv98.2%
Applied egg-rr98.2%
if 1.5e17 < F Initial program 66.9%
Taylor expanded in F around inf 99.7%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.9)
(+ t_0 (/ 1.0 (/ (* (sin B) (- (/ -1.0 F) F)) F)))
(if (<= F 1.4)
(+ t_0 (* (/ F (sin B)) (sqrt 0.5)))
(+ 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.9) {
tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= 1.4) {
tmp = t_0 + ((F / sin(B)) * sqrt(0.5));
} 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.9d0)) then
tmp = t_0 + (1.0d0 / ((sin(b) * (((-1.0d0) / f) - f)) / f))
else if (f <= 1.4d0) then
tmp = t_0 + ((f / sin(b)) * sqrt(0.5d0))
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.9) {
tmp = t_0 + (1.0 / ((Math.sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= 1.4) {
tmp = t_0 + ((F / Math.sin(B)) * Math.sqrt(0.5));
} 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.9: tmp = t_0 + (1.0 / ((math.sin(B) * ((-1.0 / F) - F)) / F)) elif F <= 1.4: tmp = t_0 + ((F / math.sin(B)) * math.sqrt(0.5)) 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.9) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(sin(B) * Float64(Float64(-1.0 / F) - F)) / F))); elseif (F <= 1.4) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * sqrt(0.5))); 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.9) tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F)); elseif (F <= 1.4) tmp = t_0 + ((F / sin(B)) * sqrt(0.5)); 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.9], N[(t$95$0 + N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $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.9:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B \cdot \left(\frac{-1}{F} - F\right)}{F}}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 62.1%
associate-/r/73.9%
*-un-lft-identity73.9%
associate-/l*74.0%
+-commutative74.0%
fma-def74.0%
fma-def74.0%
metadata-eval74.0%
metadata-eval74.0%
Applied egg-rr74.0%
Taylor expanded in x around 0 74.0%
+-commutative74.0%
unpow274.0%
fma-udef74.0%
Simplified74.0%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -0.900000000000000022 < F < 1.3999999999999999Initial program 99.3%
Taylor expanded in F around 0 98.0%
Taylor expanded in x around 0 97.9%
associate-/l*98.0%
associate-/r/98.0%
Simplified98.0%
if 1.3999999999999999 < F Initial program 68.9%
Taylor expanded in F around inf 99.7%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))) (t_1 (/ 1.0 (sin B))))
(if (<= F -1.8e-9)
(+ t_0 (/ 1.0 (/ (* (sin B) (- (/ -1.0 F) F)) F)))
(if (<= F -1.05e-181)
(- (* (* F t_1) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 1.25e-184)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 850.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x B))
(+ t_0 t_1)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = 1.0 / sin(B);
double tmp;
if (F <= -1.8e-9) {
tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= -1.05e-181) {
tmp = ((F * t_1) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.25e-184) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 850.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = t_0 + t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = 1.0d0 / sin(b)
if (f <= (-1.8d-9)) then
tmp = t_0 + (1.0d0 / ((sin(b) * (((-1.0d0) / f) - f)) / f))
else if (f <= (-1.05d-181)) then
tmp = ((f * t_1) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 1.25d-184) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 850.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else
tmp = t_0 + t_1
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 = 1.0 / Math.sin(B);
double tmp;
if (F <= -1.8e-9) {
tmp = t_0 + (1.0 / ((Math.sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= -1.05e-181) {
tmp = ((F * t_1) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.25e-184) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 850.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else {
tmp = t_0 + t_1;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = 1.0 / math.sin(B) tmp = 0 if F <= -1.8e-9: tmp = t_0 + (1.0 / ((math.sin(B) * ((-1.0 / F) - F)) / F)) elif F <= -1.05e-181: tmp = ((F * t_1) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) elif F <= 1.25e-184: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 850.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) else: tmp = t_0 + t_1 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -1.8e-9) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(sin(B) * Float64(Float64(-1.0 / F) - F)) / F))); elseif (F <= -1.05e-181) tmp = Float64(Float64(Float64(F * t_1) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 1.25e-184) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 850.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); else tmp = Float64(t_0 + t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = 1.0 / sin(B); tmp = 0.0; if (F <= -1.8e-9) tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F)); elseif (F <= -1.05e-181) tmp = ((F * t_1) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); elseif (F <= 1.25e-184) tmp = -x / (sin(B) / cos(B)); elseif (F <= 850.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); else tmp = t_0 + t_1; 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e-9], N[(t$95$0 + N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05e-181], N[(N[(N[(F * t$95$1), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-184], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 850.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], N[(t$95$0 + t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-9}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B \cdot \left(\frac{-1}{F} - F\right)}{F}}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-181}:\\
\;\;\;\;\left(F \cdot t_1\right) \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-184}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 850:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + t_1\\
\end{array}
\end{array}
if F < -1.8e-9Initial program 63.7%
associate-/r/75.0%
*-un-lft-identity75.0%
associate-/l*75.0%
+-commutative75.0%
fma-def75.0%
fma-def75.0%
metadata-eval75.0%
metadata-eval75.0%
Applied egg-rr75.0%
Taylor expanded in x around 0 75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 98.4%
mul-1-neg98.4%
Simplified98.4%
if -1.8e-9 < F < -1.05000000000000002e-181Initial program 99.4%
Taylor expanded in B around 0 82.2%
div-inv82.3%
*-commutative82.3%
Applied egg-rr82.3%
Taylor expanded in F around 0 82.3%
if -1.05000000000000002e-181 < F < 1.25000000000000001e-184Initial program 99.3%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 94.5%
associate-/l*94.6%
associate-*r/94.6%
neg-mul-194.6%
Simplified94.6%
if 1.25000000000000001e-184 < F < 850Initial program 99.4%
Taylor expanded in B around 0 83.5%
if 850 < F Initial program 68.9%
Taylor expanded in F around inf 99.7%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -57.0)
(+ t_0 (/ 1.0 (/ (* (sin B) (- (/ -1.0 F) F)) F)))
(if (<= F 550.0)
(-
(* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B))
(* x (/ 1.0 (tan B))))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -57.0) {
tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= 550.0) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x * (1.0 / tan(B)));
} 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 <= (-57.0d0)) then
tmp = t_0 + (1.0d0 / ((sin(b) * (((-1.0d0) / f) - f)) / f))
else if (f <= 550.0d0) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x * (1.0d0 / tan(b)))
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 <= -57.0) {
tmp = t_0 + (1.0 / ((Math.sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= 550.0) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x * (1.0 / Math.tan(B)));
} 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 <= -57.0: tmp = t_0 + (1.0 / ((math.sin(B) * ((-1.0 / F) - F)) / F)) elif F <= 550.0: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x * (1.0 / math.tan(B))) 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 <= -57.0) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(sin(B) * Float64(Float64(-1.0 / F) - F)) / F))); elseif (F <= 550.0) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x * Float64(1.0 / tan(B)))); 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 <= -57.0) tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F)); elseif (F <= 550.0) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x * (1.0 / tan(B))); 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, -57.0], N[(t$95$0 + N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 550.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 * N[(1.0 / N[Tan[B], $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 -57:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B \cdot \left(\frac{-1}{F} - F\right)}{F}}\\
\mathbf{elif}\;F \leq 550:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -57Initial program 62.1%
associate-/r/73.9%
*-un-lft-identity73.9%
associate-/l*74.0%
+-commutative74.0%
fma-def74.0%
fma-def74.0%
metadata-eval74.0%
metadata-eval74.0%
Applied egg-rr74.0%
Taylor expanded in x around 0 74.0%
+-commutative74.0%
unpow274.0%
fma-udef74.0%
Simplified74.0%
Taylor expanded in F around -inf 99.6%
mul-1-neg99.6%
Simplified99.6%
if -57 < F < 550Initial program 99.3%
Taylor expanded in B around 0 83.8%
if 550 < F Initial program 68.9%
Taylor expanded in F around inf 99.7%
Final simplification93.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))))
(if (<= F -1.8e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -8.5e-182)
t_0
(if (<= F 1.2e-184)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 1.36) t_0 (+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -1.8e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -8.5e-182) {
tmp = t_0;
} else if (F <= 1.2e-184) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 1.36) {
tmp = 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 = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
if (f <= (-1.8d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-8.5d-182)) then
tmp = t_0
else if (f <= 1.2d-184) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 1.36d0) then
tmp = 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 = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double tmp;
if (F <= -1.8e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -8.5e-182) {
tmp = t_0;
} else if (F <= 1.2e-184) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 1.36) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) tmp = 0 if F <= -1.8e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -8.5e-182: tmp = t_0 elif F <= 1.2e-184: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 1.36: tmp = 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(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) tmp = 0.0 if (F <= -1.8e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -8.5e-182) tmp = t_0; elseif (F <= 1.2e-184) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 1.36) tmp = 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 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); tmp = 0.0; if (F <= -1.8e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -8.5e-182) tmp = t_0; elseif (F <= 1.2e-184) tmp = -x / (sin(B) / cos(B)); elseif (F <= 1.36) tmp = 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[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.5e-182], t$95$0, If[LessEqual[F, 1.2e-184], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.36], t$95$0, 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{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-182}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-184}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 1.36:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.8e-9Initial program 63.7%
Taylor expanded in F around -inf 97.3%
+-commutative97.3%
unsub-neg97.3%
un-div-inv97.4%
Applied egg-rr97.4%
if -1.8e-9 < F < -8.5000000000000001e-182 or 1.20000000000000012e-184 < F < 1.3600000000000001Initial program 99.4%
Taylor expanded in F around 0 97.1%
Taylor expanded in B around 0 80.7%
if -8.5000000000000001e-182 < F < 1.20000000000000012e-184Initial program 99.3%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 94.5%
associate-/l*94.6%
associate-*r/94.6%
neg-mul-194.6%
Simplified94.6%
if 1.3600000000000001 < F Initial program 68.9%
Taylor expanded in F around inf 99.7%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F -1.8e-9)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -9.5e-182)
(- (* (* F t_0) t_1) (/ x B))
(if (<= F 1.06e-184)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 1.36)
(- (* (/ F (sin B)) t_1) (/ x B))
(+ (* x (/ -1.0 (tan B))) t_0)))))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -1.8e-9) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -9.5e-182) {
tmp = ((F * t_0) * t_1) - (x / B);
} else if (F <= 1.06e-184) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 1.36) {
tmp = ((F / sin(B)) * t_1) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
if (f <= (-1.8d-9)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-9.5d-182)) then
tmp = ((f * t_0) * t_1) - (x / b)
else if (f <= 1.06d-184) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 1.36d0) then
tmp = ((f / sin(b)) * t_1) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -1.8e-9) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -9.5e-182) {
tmp = ((F * t_0) * t_1) - (x / B);
} else if (F <= 1.06e-184) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 1.36) {
tmp = ((F / Math.sin(B)) * t_1) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + t_0;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) tmp = 0 if F <= -1.8e-9: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -9.5e-182: tmp = ((F * t_0) * t_1) - (x / B) elif F <= 1.06e-184: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 1.36: tmp = ((F / math.sin(B)) * t_1) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + t_0 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) tmp = 0.0 if (F <= -1.8e-9) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -9.5e-182) tmp = Float64(Float64(Float64(F * t_0) * t_1) - Float64(x / B)); elseif (F <= 1.06e-184) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 1.36) tmp = Float64(Float64(Float64(F / sin(B)) * t_1) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = sqrt((1.0 / (2.0 + (x * 2.0)))); tmp = 0.0; if (F <= -1.8e-9) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -9.5e-182) tmp = ((F * t_0) * t_1) - (x / B); elseif (F <= 1.06e-184) tmp = -x / (sin(B) / cos(B)); elseif (F <= 1.36) tmp = ((F / sin(B)) * t_1) - (x / B); else tmp = (x * (-1.0 / tan(B))) + t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -1.8e-9], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-182], N[(N[(N[(F * t$95$0), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.06e-184], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.36], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-182}:\\
\;\;\;\;\left(F \cdot t_0\right) \cdot t_1 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.06 \cdot 10^{-184}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 1.36:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_1 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + t_0\\
\end{array}
\end{array}
if F < -1.8e-9Initial program 63.7%
Taylor expanded in F around -inf 97.3%
+-commutative97.3%
unsub-neg97.3%
un-div-inv97.4%
Applied egg-rr97.4%
if -1.8e-9 < F < -9.4999999999999994e-182Initial program 99.4%
Taylor expanded in B around 0 82.2%
div-inv82.3%
*-commutative82.3%
Applied egg-rr82.3%
Taylor expanded in F around 0 82.3%
if -9.4999999999999994e-182 < F < 1.05999999999999995e-184Initial program 99.3%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 94.5%
associate-/l*94.6%
associate-*r/94.6%
neg-mul-194.6%
Simplified94.6%
if 1.05999999999999995e-184 < F < 1.3600000000000001Initial program 99.4%
Taylor expanded in F around 0 95.5%
Taylor expanded in B around 0 79.5%
if 1.3600000000000001 < F Initial program 68.9%
Taylor expanded in F around inf 99.7%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B))))
(t_1 (/ 1.0 (sin B)))
(t_2 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F -1.8e-9)
(+ t_0 (/ 1.0 (/ (* (sin B) (- (/ -1.0 F) F)) F)))
(if (<= F -9.5e-182)
(- (* (* F t_1) t_2) (/ x B))
(if (<= F 6e-185)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 1.36) (- (* (/ F (sin B)) t_2) (/ x B)) (+ t_0 t_1)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double t_1 = 1.0 / sin(B);
double t_2 = sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -1.8e-9) {
tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= -9.5e-182) {
tmp = ((F * t_1) * t_2) - (x / B);
} else if (F <= 6e-185) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 1.36) {
tmp = ((F / sin(B)) * t_2) - (x / B);
} else {
tmp = t_0 + t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
t_1 = 1.0d0 / sin(b)
t_2 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
if (f <= (-1.8d-9)) then
tmp = t_0 + (1.0d0 / ((sin(b) * (((-1.0d0) / f) - f)) / f))
else if (f <= (-9.5d-182)) then
tmp = ((f * t_1) * t_2) - (x / b)
else if (f <= 6d-185) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 1.36d0) then
tmp = ((f / sin(b)) * t_2) - (x / b)
else
tmp = t_0 + t_1
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 = 1.0 / Math.sin(B);
double t_2 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -1.8e-9) {
tmp = t_0 + (1.0 / ((Math.sin(B) * ((-1.0 / F) - F)) / F));
} else if (F <= -9.5e-182) {
tmp = ((F * t_1) * t_2) - (x / B);
} else if (F <= 6e-185) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 1.36) {
tmp = ((F / Math.sin(B)) * t_2) - (x / B);
} else {
tmp = t_0 + t_1;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) t_1 = 1.0 / math.sin(B) t_2 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) tmp = 0 if F <= -1.8e-9: tmp = t_0 + (1.0 / ((math.sin(B) * ((-1.0 / F) - F)) / F)) elif F <= -9.5e-182: tmp = ((F * t_1) * t_2) - (x / B) elif F <= 6e-185: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 1.36: tmp = ((F / math.sin(B)) * t_2) - (x / B) else: tmp = t_0 + t_1 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) t_1 = Float64(1.0 / sin(B)) t_2 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) tmp = 0.0 if (F <= -1.8e-9) tmp = Float64(t_0 + Float64(1.0 / Float64(Float64(sin(B) * Float64(Float64(-1.0 / F) - F)) / F))); elseif (F <= -9.5e-182) tmp = Float64(Float64(Float64(F * t_1) * t_2) - Float64(x / B)); elseif (F <= 6e-185) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 1.36) tmp = Float64(Float64(Float64(F / sin(B)) * t_2) - Float64(x / B)); else tmp = Float64(t_0 + t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); t_1 = 1.0 / sin(B); t_2 = sqrt((1.0 / (2.0 + (x * 2.0)))); tmp = 0.0; if (F <= -1.8e-9) tmp = t_0 + (1.0 / ((sin(B) * ((-1.0 / F) - F)) / F)); elseif (F <= -9.5e-182) tmp = ((F * t_1) * t_2) - (x / B); elseif (F <= 6e-185) tmp = -x / (sin(B) / cos(B)); elseif (F <= 1.36) tmp = ((F / sin(B)) * t_2) - (x / B); else tmp = t_0 + t_1; 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[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -1.8e-9], N[(t$95$0 + N[(1.0 / N[(N[(N[Sin[B], $MachinePrecision] * N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.5e-182], N[(N[(N[(F * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-185], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.36], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
t_1 := \frac{1}{\sin B}\\
t_2 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-9}:\\
\;\;\;\;t_0 + \frac{1}{\frac{\sin B \cdot \left(\frac{-1}{F} - F\right)}{F}}\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-182}:\\
\;\;\;\;\left(F \cdot t_1\right) \cdot t_2 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-185}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 1.36:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_2 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + t_1\\
\end{array}
\end{array}
if F < -1.8e-9Initial program 63.7%
associate-/r/75.0%
*-un-lft-identity75.0%
associate-/l*75.0%
+-commutative75.0%
fma-def75.0%
fma-def75.0%
metadata-eval75.0%
metadata-eval75.0%
Applied egg-rr75.0%
Taylor expanded in x around 0 75.1%
+-commutative75.1%
unpow275.1%
fma-udef75.1%
Simplified75.1%
Taylor expanded in F around -inf 98.4%
mul-1-neg98.4%
Simplified98.4%
if -1.8e-9 < F < -9.4999999999999994e-182Initial program 99.4%
Taylor expanded in B around 0 82.2%
div-inv82.3%
*-commutative82.3%
Applied egg-rr82.3%
Taylor expanded in F around 0 82.3%
if -9.4999999999999994e-182 < F < 6.00000000000000061e-185Initial program 99.3%
Taylor expanded in F around -inf 35.6%
Taylor expanded in x around inf 94.5%
associate-/l*94.6%
associate-*r/94.6%
neg-mul-194.6%
Simplified94.6%
if 6.00000000000000061e-185 < F < 1.3600000000000001Initial program 99.4%
Taylor expanded in F around 0 95.5%
Taylor expanded in B around 0 79.5%
if 1.3600000000000001 < F Initial program 68.9%
Taylor expanded in F around inf 99.7%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -1.36e-12)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -2.1e-133)
(- (* t_0 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
(if (<= F 2.5e-69)
(* (/ x (sin B)) (- (cos B)))
(if (<= F 52.0)
(- (* t_0 (/ F B)) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.36e-12) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -2.1e-133) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.5e-69) {
tmp = (x / sin(B)) * -cos(B);
} else if (F <= 52.0) {
tmp = (t_0 * (F / B)) - (x / 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) :: t_0
real(8) :: tmp
t_0 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-1.36d-12)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-2.1d-133)) then
tmp = (t_0 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 2.5d-69) then
tmp = (x / sin(b)) * -cos(b)
else if (f <= 52.0d0) then
tmp = (t_0 * (f / b)) - (x / 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 t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -1.36e-12) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -2.1e-133) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.5e-69) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if (F <= 52.0) {
tmp = (t_0 * (F / B)) - (x / B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -1.36e-12: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -2.1e-133: tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 2.5e-69: tmp = (x / math.sin(B)) * -math.cos(B) elif F <= 52.0: tmp = (t_0 * (F / B)) - (x / B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -1.36e-12) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -2.1e-133) tmp = Float64(Float64(t_0 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 2.5e-69) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif (F <= 52.0) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / 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) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -1.36e-12) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -2.1e-133) tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 2.5e-69) tmp = (x / sin(B)) * -cos(B); elseif (F <= 52.0) tmp = (t_0 * (F / B)) - (x / B); 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[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -1.36e-12], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-133], N[(N[(t$95$0 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-69], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 52.0], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / 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}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -1.36 \cdot 10^{-12}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-133}:\\
\;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 52:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.36000000000000006e-12Initial program 63.7%
Taylor expanded in F around -inf 97.3%
+-commutative97.3%
unsub-neg97.3%
un-div-inv97.4%
Applied egg-rr97.4%
if -1.36000000000000006e-12 < F < -2.1000000000000001e-133Initial program 99.4%
Taylor expanded in B around 0 82.4%
Taylor expanded in B around 0 58.2%
if -2.1000000000000001e-133 < F < 2.50000000000000017e-69Initial program 99.4%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 79.3%
associate-/l*99.6%
associate-/r/99.6%
Applied egg-rr79.3%
if 2.50000000000000017e-69 < F < 52Initial program 99.2%
Taylor expanded in B around 0 93.1%
Taylor expanded in B around 0 69.5%
if 52 < F Initial program 68.9%
Taylor expanded in F around inf 99.7%
Final simplification88.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(*
(pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))))
(if (<= F -7000000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -4.3e-132)
t_0
(if (<= F 4.5e-69)
(/ (- x) (/ (sin B) (cos B)))
(if (<= F 900000000000.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -7000000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -4.3e-132) {
tmp = t_0;
} else if (F <= 4.5e-69) {
tmp = -x / (sin(B) / cos(B));
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
if (f <= (-7000000.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-4.3d-132)) then
tmp = t_0
else if (f <= 4.5d-69) then
tmp = -x / (sin(b) / cos(b))
else if (f <= 900000000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -7000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -4.3e-132) {
tmp = t_0;
} else if (F <= 4.5e-69) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) tmp = 0 if F <= -7000000.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -4.3e-132: tmp = t_0 elif F <= 4.5e-69: tmp = -x / (math.sin(B) / math.cos(B)) elif F <= 900000000000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / 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(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)) tmp = 0.0 if (F <= -7000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -4.3e-132) tmp = t_0; elseif (F <= 4.5e-69) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); elseif (F <= 900000000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); tmp = 0.0; if (F <= -7000000.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -4.3e-132) tmp = t_0; elseif (F <= 4.5e-69) tmp = -x / (sin(B) / cos(B)); elseif (F <= 900000000000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.3e-132], t$95$0, If[LessEqual[F, 4.5e-69], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 900000000000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{if}\;F \leq -7000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -4.3 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7e6Initial program 59.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 75.7%
if -7e6 < F < -4.2999999999999997e-132 or 4.50000000000000009e-69 < F < 9e11Initial program 99.3%
Taylor expanded in B around 0 81.7%
Taylor expanded in B around 0 59.2%
if -4.2999999999999997e-132 < F < 4.50000000000000009e-69Initial program 99.4%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 79.3%
associate-/l*79.3%
associate-*r/79.3%
neg-mul-179.3%
Simplified79.3%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(*
(pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))))
(if (<= F -7000000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -6.8e-132)
t_0
(if (<= F 1.4e-69)
(* (/ x (sin B)) (- (cos B)))
(if (<= F 900000000000.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -7000000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -6.8e-132) {
tmp = t_0;
} else if (F <= 1.4e-69) {
tmp = (x / sin(B)) * -cos(B);
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
if (f <= (-7000000.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-6.8d-132)) then
tmp = t_0
else if (f <= 1.4d-69) then
tmp = (x / sin(b)) * -cos(b)
else if (f <= 900000000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -7000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -6.8e-132) {
tmp = t_0;
} else if (F <= 1.4e-69) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) tmp = 0 if F <= -7000000.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -6.8e-132: tmp = t_0 elif F <= 1.4e-69: tmp = (x / math.sin(B)) * -math.cos(B) elif F <= 900000000000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / 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(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)) tmp = 0.0 if (F <= -7000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -6.8e-132) tmp = t_0; elseif (F <= 1.4e-69) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif (F <= 900000000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); tmp = 0.0; if (F <= -7000000.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -6.8e-132) tmp = t_0; elseif (F <= 1.4e-69) tmp = (x / sin(B)) * -cos(B); elseif (F <= 900000000000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.8e-132], t$95$0, If[LessEqual[F, 1.4e-69], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 900000000000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{if}\;F \leq -7000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -6.8 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7e6Initial program 59.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 75.7%
if -7e6 < F < -6.79999999999999965e-132 or 1.3999999999999999e-69 < F < 9e11Initial program 99.3%
Taylor expanded in B around 0 81.7%
Taylor expanded in B around 0 59.2%
if -6.79999999999999965e-132 < F < 1.3999999999999999e-69Initial program 99.4%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 79.3%
associate-/l*99.6%
associate-/r/99.6%
Applied egg-rr79.3%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification75.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(*
(pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))))
(if (<= F -3.75e-10)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -6.7e-133)
t_0
(if (<= F 2.5e-69)
(* (/ x (sin B)) (- (cos B)))
(if (<= F 900000000000.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -3.75e-10) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -6.7e-133) {
tmp = t_0;
} else if (F <= 2.5e-69) {
tmp = (x / sin(B)) * -cos(B);
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
if (f <= (-3.75d-10)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-6.7d-133)) then
tmp = t_0
else if (f <= 2.5d-69) then
tmp = (x / sin(b)) * -cos(b)
else if (f <= 900000000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -3.75e-10) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -6.7e-133) {
tmp = t_0;
} else if (F <= 2.5e-69) {
tmp = (x / Math.sin(B)) * -Math.cos(B);
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) tmp = 0 if F <= -3.75e-10: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -6.7e-133: tmp = t_0 elif F <= 2.5e-69: tmp = (x / math.sin(B)) * -math.cos(B) elif F <= 900000000000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / 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(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)) tmp = 0.0 if (F <= -3.75e-10) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -6.7e-133) tmp = t_0; elseif (F <= 2.5e-69) tmp = Float64(Float64(x / sin(B)) * Float64(-cos(B))); elseif (F <= 900000000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); tmp = 0.0; if (F <= -3.75e-10) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -6.7e-133) tmp = t_0; elseif (F <= 2.5e-69) tmp = (x / sin(B)) * -cos(B); elseif (F <= 900000000000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.75e-10], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.7e-133], t$95$0, If[LessEqual[F, 2.5e-69], N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 900000000000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{if}\;F \leq -3.75 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -6.7 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{\sin B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.74999999999999998e-10Initial program 63.7%
Taylor expanded in F around -inf 97.3%
+-commutative97.3%
unsub-neg97.3%
un-div-inv97.4%
Applied egg-rr97.4%
if -3.74999999999999998e-10 < F < -6.7000000000000002e-133 or 2.50000000000000017e-69 < F < 9e11Initial program 99.3%
Taylor expanded in B around 0 81.1%
Taylor expanded in B around 0 59.6%
if -6.7000000000000002e-133 < F < 2.50000000000000017e-69Initial program 99.4%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 79.3%
associate-/l*99.6%
associate-/r/99.6%
Applied egg-rr79.3%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification81.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(*
(pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)
(+ (/ F B) (* 0.16666666666666666 (* F B))))
(/ x B))))
(if (<= F -6600000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -5.5e-132)
t_0
(if (<= F 1.35e-68)
(/ (- x) (tan B))
(if (<= F 900000000000.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -6600000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -5.5e-132) {
tmp = t_0;
} else if (F <= 1.35e-68) {
tmp = -x / tan(B);
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
if (f <= (-6600000.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-5.5d-132)) then
tmp = t_0
else if (f <= 1.35d-68) then
tmp = -x / tan(b)
else if (f <= 900000000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
double tmp;
if (F <= -6600000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -5.5e-132) {
tmp = t_0;
} else if (F <= 1.35e-68) {
tmp = -x / Math.tan(B);
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) tmp = 0 if F <= -6600000.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -5.5e-132: tmp = t_0 elif F <= 1.35e-68: tmp = -x / math.tan(B) elif F <= 900000000000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / 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(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)) tmp = 0.0 if (F <= -6600000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -5.5e-132) tmp = t_0; elseif (F <= 1.35e-68) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 900000000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); tmp = 0.0; if (F <= -6600000.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -5.5e-132) tmp = t_0; elseif (F <= 1.35e-68) tmp = -x / tan(B); elseif (F <= 900000000000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6600000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.5e-132], t$95$0, If[LessEqual[F, 1.35e-68], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 900000000000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{if}\;F \leq -6600000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-68}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.6e6Initial program 59.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 75.7%
if -6.6e6 < F < -5.4999999999999999e-132 or 1.3500000000000001e-68 < F < 9e11Initial program 99.3%
Taylor expanded in B around 0 81.7%
Taylor expanded in B around 0 59.2%
if -5.4999999999999999e-132 < F < 1.3500000000000001e-68Initial program 99.4%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 79.3%
mul-1-neg79.3%
associate-*r/79.2%
Simplified79.2%
expm1-log1p-u54.4%
expm1-udef28.8%
clear-num28.8%
un-div-inv28.8%
quot-tan28.8%
Applied egg-rr28.8%
expm1-def54.5%
expm1-log1p79.2%
Simplified79.2%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))))
(if (<= F -7000000.0)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -1.3e-133)
t_0
(if (<= F 8.8e-69)
(/ (- x) (tan B))
(if (<= F 550.0) t_0 (- (/ 1.0 (sin B)) (/ x 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 tmp;
if (F <= -7000000.0) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -1.3e-133) {
tmp = t_0;
} else if (F <= 8.8e-69) {
tmp = -x / tan(B);
} else if (F <= 550.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
if (f <= (-7000000.0d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-1.3d-133)) then
tmp = t_0
else if (f <= 8.8d-69) then
tmp = -x / tan(b)
else if (f <= 550.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
double tmp;
if (F <= -7000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -1.3e-133) {
tmp = t_0;
} else if (F <= 8.8e-69) {
tmp = -x / Math.tan(B);
} else if (F <= 550.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / 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) tmp = 0 if F <= -7000000.0: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -1.3e-133: tmp = t_0 elif F <= 8.8e-69: tmp = -x / math.tan(B) elif F <= 550.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / 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)) tmp = 0.0 if (F <= -7000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -1.3e-133) tmp = t_0; elseif (F <= 8.8e-69) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 550.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); tmp = 0.0; if (F <= -7000000.0) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -1.3e-133) tmp = t_0; elseif (F <= 8.8e-69) tmp = -x / tan(B); elseif (F <= 550.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(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]}, If[LessEqual[F, -7000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.3e-133], t$95$0, If[LessEqual[F, 8.8e-69], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 550.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -7000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 550:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7e6Initial program 59.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 75.7%
if -7e6 < F < -1.3e-133 or 8.8000000000000001e-69 < F < 550Initial program 99.3%
Taylor expanded in B around 0 86.5%
Taylor expanded in B around 0 61.9%
if -1.3e-133 < F < 8.8000000000000001e-69Initial program 99.4%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 79.3%
mul-1-neg79.3%
associate-*r/79.2%
Simplified79.2%
expm1-log1p-u54.4%
expm1-udef28.8%
clear-num28.8%
un-div-inv28.8%
quot-tan28.8%
Applied egg-rr28.8%
expm1-def54.5%
expm1-log1p79.2%
Simplified79.2%
if 550 < F Initial program 68.9%
Taylor expanded in B around 0 48.9%
Taylor expanded in F around inf 79.4%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)))
(if (<= F -5e+30)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -2.1e-132)
(- (* t_0 (* F (/ 1.0 B))) (/ x B))
(if (<= F 5e-69)
(/ (- x) (tan B))
(if (<= F 310.0)
(- (* t_0 (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -5e+30) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -2.1e-132) {
tmp = (t_0 * (F * (1.0 / B))) - (x / B);
} else if (F <= 5e-69) {
tmp = -x / tan(B);
} else if (F <= 310.0) {
tmp = (t_0 * (F / B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)
if (f <= (-5d+30)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-2.1d-132)) then
tmp = (t_0 * (f * (1.0d0 / b))) - (x / b)
else if (f <= 5d-69) then
tmp = -x / tan(b)
else if (f <= 310.0d0) then
tmp = (t_0 * (f / b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5);
double tmp;
if (F <= -5e+30) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -2.1e-132) {
tmp = (t_0 * (F * (1.0 / B))) - (x / B);
} else if (F <= 5e-69) {
tmp = -x / Math.tan(B);
} else if (F <= 310.0) {
tmp = (t_0 * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) tmp = 0 if F <= -5e+30: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -2.1e-132: tmp = (t_0 * (F * (1.0 / B))) - (x / B) elif F <= 5e-69: tmp = -x / math.tan(B) elif F <= 310.0: tmp = (t_0 * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5 tmp = 0.0 if (F <= -5e+30) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -2.1e-132) tmp = Float64(Float64(t_0 * Float64(F * Float64(1.0 / B))) - Float64(x / B)); elseif (F <= 5e-69) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 310.0) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (((F * F) + 2.0) + (x * 2.0)) ^ -0.5; tmp = 0.0; if (F <= -5e+30) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -2.1e-132) tmp = (t_0 * (F * (1.0 / B))) - (x / B); elseif (F <= 5e-69) tmp = -x / tan(B); elseif (F <= 310.0) tmp = (t_0 * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[F, -5e+30], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-132], N[(N[(t$95$0 * N[(F * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-69], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 310.0], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-132}:\\
\;\;\;\;t_0 \cdot \left(F \cdot \frac{1}{B}\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 310:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.9999999999999998e30Initial program 58.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 75.0%
if -4.9999999999999998e30 < F < -2.1000000000000001e-132Initial program 99.4%
Taylor expanded in B around 0 84.1%
div-inv84.1%
*-commutative84.1%
Applied egg-rr84.1%
Taylor expanded in B around 0 60.5%
if -2.1000000000000001e-132 < F < 5.00000000000000033e-69Initial program 99.4%
Taylor expanded in F around -inf 31.5%
Taylor expanded in x around inf 79.3%
mul-1-neg79.3%
associate-*r/79.2%
Simplified79.2%
expm1-log1p-u54.4%
expm1-udef28.8%
clear-num28.8%
un-div-inv28.8%
quot-tan28.8%
Applied egg-rr28.8%
expm1-def54.5%
expm1-log1p79.2%
Simplified79.2%
if 5.00000000000000033e-69 < F < 310Initial program 99.2%
Taylor expanded in B around 0 93.1%
Taylor expanded in B around 0 69.5%
if 310 < F Initial program 68.9%
Taylor expanded in B around 0 48.9%
Taylor expanded in F around inf 79.4%
Final simplification75.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ (- x) (tan B))))
(if (<= F -3.75e-10)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 B))
(if (<= F -2.7e-132)
t_0
(if (<= F 2.6e-69)
t_1
(if (<= F 3.8e-11)
t_0
(if (<= F 900000000000.0) t_1 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = -x / tan(B);
double tmp;
if (F <= -3.75e-10) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= -2.7e-132) {
tmp = t_0;
} else if (F <= 2.6e-69) {
tmp = t_1;
} else if (F <= 3.8e-11) {
tmp = t_0;
} else if (F <= 900000000000.0) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = -x / tan(b)
if (f <= (-3.75d-10)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= (-2.7d-132)) then
tmp = t_0
else if (f <= 2.6d-69) then
tmp = t_1
else if (f <= 3.8d-11) then
tmp = t_0
else if (f <= 900000000000.0d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = -x / Math.tan(B);
double tmp;
if (F <= -3.75e-10) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= -2.7e-132) {
tmp = t_0;
} else if (F <= 2.6e-69) {
tmp = t_1;
} else if (F <= 3.8e-11) {
tmp = t_0;
} else if (F <= 900000000000.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = -x / math.tan(B) tmp = 0 if F <= -3.75e-10: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= -2.7e-132: tmp = t_0 elif F <= 2.6e-69: tmp = t_1 elif F <= 3.8e-11: tmp = t_0 elif F <= 900000000000.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -3.75e-10) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= -2.7e-132) tmp = t_0; elseif (F <= 2.6e-69) tmp = t_1; elseif (F <= 3.8e-11) tmp = t_0; elseif (F <= 900000000000.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = -x / tan(B); tmp = 0.0; if (F <= -3.75e-10) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= -2.7e-132) tmp = t_0; elseif (F <= 2.6e-69) tmp = t_1; elseif (F <= 3.8e-11) tmp = t_0; elseif (F <= 900000000000.0) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.75e-10], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.7e-132], t$95$0, If[LessEqual[F, 2.6e-69], t$95$1, If[LessEqual[F, 3.8e-11], t$95$0, If[LessEqual[F, 900000000000.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -3.75 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-132}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-11}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.74999999999999998e-10Initial program 63.7%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 73.8%
if -3.74999999999999998e-10 < F < -2.6999999999999999e-132 or 2.6000000000000002e-69 < F < 3.7999999999999998e-11Initial program 99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in B around 0 63.9%
if -2.6999999999999999e-132 < F < 2.6000000000000002e-69 or 3.7999999999999998e-11 < F < 9e11Initial program 99.3%
Taylor expanded in F around -inf 34.9%
Taylor expanded in x around inf 77.6%
mul-1-neg77.6%
associate-*r/77.5%
Simplified77.5%
expm1-log1p-u53.6%
expm1-udef30.8%
clear-num30.8%
un-div-inv30.8%
quot-tan30.8%
Applied egg-rr30.8%
expm1-def53.7%
expm1-log1p77.6%
Simplified77.6%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification76.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) (tan B))))
(if (<= F -2.3e+115)
t_0
(if (<= F -4.1e-8)
(/ (- -1.0 x) B)
(if (<= F 900000000000.0) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = -x / tan(B);
double tmp;
if (F <= -2.3e+115) {
tmp = t_0;
} else if (F <= -4.1e-8) {
tmp = (-1.0 - x) / B;
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = -x / tan(b)
if (f <= (-2.3d+115)) then
tmp = t_0
else if (f <= (-4.1d-8)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 900000000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / Math.tan(B);
double tmp;
if (F <= -2.3e+115) {
tmp = t_0;
} else if (F <= -4.1e-8) {
tmp = (-1.0 - x) / B;
} else if (F <= 900000000000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = -x / math.tan(B) tmp = 0 if F <= -2.3e+115: tmp = t_0 elif F <= -4.1e-8: tmp = (-1.0 - x) / B elif F <= 900000000000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / tan(B)) tmp = 0.0 if (F <= -2.3e+115) tmp = t_0; elseif (F <= -4.1e-8) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 900000000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / tan(B); tmp = 0.0; if (F <= -2.3e+115) tmp = t_0; elseif (F <= -4.1e-8) tmp = (-1.0 - x) / B; elseif (F <= 900000000000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.3e+115], t$95$0, If[LessEqual[F, -4.1e-8], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 900000000000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{\tan B}\\
\mathbf{if}\;F \leq -2.3 \cdot 10^{+115}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -4.1 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.30000000000000004e115 or -4.10000000000000032e-8 < F < 9e11Initial program 83.0%
Taylor expanded in F around -inf 51.0%
Taylor expanded in x around inf 61.0%
mul-1-neg61.0%
associate-*r/60.9%
Simplified60.9%
expm1-log1p-u41.0%
expm1-udef29.1%
clear-num29.1%
un-div-inv29.1%
quot-tan29.1%
Applied egg-rr29.1%
expm1-def41.0%
expm1-log1p61.0%
Simplified61.0%
if -2.30000000000000004e115 < F < -4.10000000000000032e-8Initial program 99.2%
Taylor expanded in F around -inf 92.6%
Taylor expanded in B around 0 46.6%
associate-*r/46.6%
distribute-lft-in46.6%
metadata-eval46.6%
neg-mul-146.6%
Simplified46.6%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification65.9%
(FPCore (F B x)
:precision binary64
(if (or (<= x -2.2e-67)
(and (not (<= x -1.6e-123)) (or (<= x -3.5e-187) (not (<= x 9e-92)))))
(/ (- x) (tan B))
(/ 1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.2e-67) || (!(x <= -1.6e-123) && ((x <= -3.5e-187) || !(x <= 9e-92)))) {
tmp = -x / tan(B);
} else {
tmp = 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 ((x <= (-2.2d-67)) .or. (.not. (x <= (-1.6d-123))) .and. (x <= (-3.5d-187)) .or. (.not. (x <= 9d-92))) then
tmp = -x / tan(b)
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.2e-67) || (!(x <= -1.6e-123) && ((x <= -3.5e-187) || !(x <= 9e-92)))) {
tmp = -x / Math.tan(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.2e-67) or (not (x <= -1.6e-123) and ((x <= -3.5e-187) or not (x <= 9e-92))): tmp = -x / math.tan(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.2e-67) || (!(x <= -1.6e-123) && ((x <= -3.5e-187) || !(x <= 9e-92)))) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.2e-67) || (~((x <= -1.6e-123)) && ((x <= -3.5e-187) || ~((x <= 9e-92))))) tmp = -x / tan(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.2e-67], And[N[Not[LessEqual[x, -1.6e-123]], $MachinePrecision], Or[LessEqual[x, -3.5e-187], N[Not[LessEqual[x, 9e-92]], $MachinePrecision]]]], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{-67} \lor \neg \left(x \leq -1.6 \cdot 10^{-123}\right) \land \left(x \leq -3.5 \cdot 10^{-187} \lor \neg \left(x \leq 9 \cdot 10^{-92}\right)\right):\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if x < -2.2000000000000001e-67 or -1.59999999999999989e-123 < x < -3.49999999999999979e-187 or 9.0000000000000001e-92 < x Initial program 81.0%
Taylor expanded in F around -inf 72.4%
Taylor expanded in x around inf 76.6%
mul-1-neg76.6%
associate-*r/76.6%
Simplified76.6%
expm1-log1p-u45.6%
expm1-udef38.6%
clear-num38.6%
un-div-inv38.6%
quot-tan38.6%
Applied egg-rr38.6%
expm1-def45.7%
expm1-log1p76.7%
Simplified76.7%
if -2.2000000000000001e-67 < x < -1.59999999999999989e-123 or -3.49999999999999979e-187 < x < 9.0000000000000001e-92Initial program 78.1%
Taylor expanded in B around 0 74.3%
Taylor expanded in F around inf 36.4%
Taylor expanded in B around inf 36.4%
Final simplification61.6%
(FPCore (F B x) :precision binary64 (if (<= F -5e-8) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 900000000000.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e-8) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 900000000000.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 900000000000.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 900000000000.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e-8: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 900000000000.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 900000000000.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e-8) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 900000000000.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 900000000000.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.9999999999999998e-8Initial program 63.2%
Taylor expanded in F around -inf 97.3%
Taylor expanded in B around 0 69.3%
if -4.9999999999999998e-8 < F < 9e11Initial program 99.3%
Taylor expanded in F around -inf 30.1%
Taylor expanded in x around inf 61.4%
mul-1-neg61.4%
associate-*r/61.3%
Simplified61.3%
expm1-log1p-u43.1%
expm1-udef26.2%
clear-num26.2%
un-div-inv26.2%
quot-tan26.2%
Applied egg-rr26.2%
expm1-def43.1%
expm1-log1p61.4%
Simplified61.4%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification69.7%
(FPCore (F B x) :precision binary64 (if (<= F -6.6e-49) (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)) (if (<= F 900000000000.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-49) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / B);
} else if (F <= 900000000000.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.6d-49)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
else if (f <= 900000000000.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.6e-49) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
} else if (F <= 900000000000.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.6e-49: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / B) elif F <= 900000000000.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.6e-49) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)); elseif (F <= 900000000000.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.6e-49) tmp = (x * (-1.0 / tan(B))) + (-1.0 / B); elseif (F <= 900000000000.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.6e-49], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 900000000000.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.6 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{elif}\;F \leq 900000000000:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.6e-49Initial program 66.0%
Taylor expanded in F around -inf 91.5%
Taylor expanded in B around 0 69.4%
if -6.6e-49 < F < 9e11Initial program 99.3%
Taylor expanded in F around -inf 30.5%
Taylor expanded in x around inf 63.8%
mul-1-neg63.8%
associate-*r/63.7%
Simplified63.7%
expm1-log1p-u44.5%
expm1-udef26.6%
clear-num26.6%
un-div-inv26.6%
quot-tan26.6%
Applied egg-rr26.6%
expm1-def44.5%
expm1-log1p63.8%
Simplified63.8%
if 9e11 < F Initial program 67.3%
Taylor expanded in B around 0 50.1%
Taylor expanded in F around inf 82.3%
Final simplification70.9%
(FPCore (F B x)
:precision binary64
(if (<= F -5.5e-113)
(+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 3.9e+24)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e-113) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 3.9e+24) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = 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 <= (-5.5d-113)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 3.9d+24) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (x / b)
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e-113) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 3.9e+24) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.5e-113: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 3.9e+24: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.5e-113) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 3.9e+24) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.5e-113) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 3.9e+24) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.5e-113], 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, 3.9e+24], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{-113}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 3.9 \cdot 10^{+24}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.50000000000000053e-113Initial program 70.2%
Taylor expanded in F around -inf 83.0%
Taylor expanded in B around 0 38.6%
if -5.50000000000000053e-113 < F < 3.8999999999999998e24Initial program 99.3%
Taylor expanded in F around -inf 32.5%
Taylor expanded in x around inf 67.7%
mul-1-neg67.7%
associate-*r/67.7%
Simplified67.7%
Taylor expanded in B around 0 37.3%
if 3.8999999999999998e24 < F Initial program 66.0%
Taylor expanded in B around 0 48.1%
Taylor expanded in F around inf 81.5%
Taylor expanded in B around inf 56.3%
Final simplification43.1%
(FPCore (F B x)
:precision binary64
(if (<= F -2.5e-110)
(/ (- -1.0 x) B)
(if (<= F 1.15e-86)
(- (* B (- (* x -0.16666666666666666) (* x -0.5))) (/ x B))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.5e-110) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e-86) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (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.5d-110)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.15d-86) then
tmp = (b * ((x * (-0.16666666666666666d0)) - (x * (-0.5d0)))) - (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.5e-110) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e-86) {
tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.5e-110: tmp = (-1.0 - x) / B elif F <= 1.15e-86: tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.5e-110) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.15e-86) tmp = Float64(Float64(B * Float64(Float64(x * -0.16666666666666666) - Float64(x * -0.5))) - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.5e-110) tmp = (-1.0 - x) / B; elseif (F <= 1.15e-86) tmp = (B * ((x * -0.16666666666666666) - (x * -0.5))) - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.5e-110], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.15e-86], N[(N[(B * N[(N[(x * -0.16666666666666666), $MachinePrecision] - N[(x * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.5 \cdot 10^{-110}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-86}:\\
\;\;\;\;B \cdot \left(x \cdot -0.16666666666666666 - x \cdot -0.5\right) - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.5e-110Initial program 70.2%
Taylor expanded in F around -inf 83.0%
Taylor expanded in B around 0 37.8%
associate-*r/37.8%
distribute-lft-in37.8%
metadata-eval37.8%
neg-mul-137.8%
Simplified37.8%
if -2.5e-110 < F < 1.14999999999999998e-86Initial program 99.4%
Taylor expanded in F around -inf 27.9%
Taylor expanded in x around inf 75.6%
mul-1-neg75.6%
associate-*r/75.6%
Simplified75.6%
Taylor expanded in B around 0 41.1%
if 1.14999999999999998e-86 < F Initial program 75.3%
Taylor expanded in B around 0 56.6%
Taylor expanded in F around inf 68.1%
Taylor expanded in B around 0 48.2%
Final simplification42.8%
(FPCore (F B x) :precision binary64 (if (<= F -6e-49) (+ (/ (- -1.0 x) B) (* B (- (* x 0.3333333333333333) 0.16666666666666666))) (if (<= F 8e-69) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-49) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 8e-69) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6d-49)) then
tmp = (((-1.0d0) - x) / b) + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 8d-69) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6e-49) {
tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 8e-69) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-49: tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 8e-69: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-49) tmp = Float64(Float64(Float64(-1.0 - x) / B) + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 8e-69) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6e-49) tmp = ((-1.0 - x) / B) + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 8e-69) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-49], 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, 8e-69], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1 - x}{B} + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-69}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -6e-49Initial program 66.0%
Taylor expanded in F around -inf 91.5%
Taylor expanded in B around 0 43.6%
if -6e-49 < F < 7.9999999999999997e-69Initial program 99.3%
Taylor expanded in F around -inf 29.4%
Taylor expanded in B around 0 13.6%
associate-*r/13.6%
distribute-lft-in13.6%
metadata-eval13.6%
neg-mul-113.6%
Simplified13.6%
Taylor expanded in x around inf 36.4%
mul-1-neg36.4%
Simplified36.4%
if 7.9999999999999997e-69 < F Initial program 74.0%
Taylor expanded in B around 0 56.3%
Taylor expanded in F around inf 69.4%
Taylor expanded in B around 0 48.6%
Final simplification43.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- x) B)))
(if (<= F -3.5e+111)
t_0
(if (<= F -950000.0)
(/ (+ -1.0 x) B)
(if (<= F 5.5e-69) t_0 (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -3.5e+111) {
tmp = t_0;
} else if (F <= -950000.0) {
tmp = (-1.0 + x) / B;
} else if (F <= 5.5e-69) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = -x / b
if (f <= (-3.5d+111)) then
tmp = t_0
else if (f <= (-950000.0d0)) then
tmp = ((-1.0d0) + x) / b
else if (f <= 5.5d-69) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = -x / B;
double tmp;
if (F <= -3.5e+111) {
tmp = t_0;
} else if (F <= -950000.0) {
tmp = (-1.0 + x) / B;
} else if (F <= 5.5e-69) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = -x / B tmp = 0 if F <= -3.5e+111: tmp = t_0 elif F <= -950000.0: tmp = (-1.0 + x) / B elif F <= 5.5e-69: tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(-x) / B) tmp = 0.0 if (F <= -3.5e+111) tmp = t_0; elseif (F <= -950000.0) tmp = Float64(Float64(-1.0 + x) / B); elseif (F <= 5.5e-69) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = -x / B; tmp = 0.0; if (F <= -3.5e+111) tmp = t_0; elseif (F <= -950000.0) tmp = (-1.0 + x) / B; elseif (F <= 5.5e-69) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[((-x) / B), $MachinePrecision]}, If[LessEqual[F, -3.5e+111], t$95$0, If[LessEqual[F, -950000.0], N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.5e-69], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+111}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -950000:\\
\;\;\;\;\frac{-1 + x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-69}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.5000000000000002e111 or -9.5e5 < F < 5.50000000000000006e-69Initial program 81.2%
Taylor expanded in F around -inf 53.5%
Taylor expanded in B around 0 24.2%
associate-*r/24.2%
distribute-lft-in24.2%
metadata-eval24.2%
neg-mul-124.2%
Simplified24.2%
Taylor expanded in x around inf 32.1%
mul-1-neg32.1%
Simplified32.1%
if -3.5000000000000002e111 < F < -9.5e5Initial program 99.2%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 50.2%
associate-*r/50.2%
distribute-lft-in50.2%
metadata-eval50.2%
neg-mul-150.2%
Simplified50.2%
expm1-log1p-u14.7%
expm1-udef14.4%
+-commutative14.4%
add-sqr-sqrt0.5%
sqrt-unprod14.3%
sqr-neg14.3%
sqrt-unprod13.8%
add-sqr-sqrt14.3%
Applied egg-rr14.3%
expm1-def14.3%
expm1-log1p50.3%
Simplified50.3%
if 5.50000000000000006e-69 < F Initial program 74.0%
Taylor expanded in B around 0 56.3%
Taylor expanded in F around inf 69.4%
Taylor expanded in B around 0 48.6%
Final simplification39.6%
(FPCore (F B x) :precision binary64 (if (or (<= F -5.2e+119) (not (<= F -950000.0))) (/ (- x) B) (/ (+ -1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if ((F <= -5.2e+119) || !(F <= -950000.0)) {
tmp = -x / B;
} else {
tmp = (-1.0 + x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((f <= (-5.2d+119)) .or. (.not. (f <= (-950000.0d0)))) then
tmp = -x / b
else
tmp = ((-1.0d0) + x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((F <= -5.2e+119) || !(F <= -950000.0)) {
tmp = -x / B;
} else {
tmp = (-1.0 + x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -5.2e+119) or not (F <= -950000.0): tmp = -x / B else: tmp = (-1.0 + x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((F <= -5.2e+119) || !(F <= -950000.0)) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(-1.0 + x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= -5.2e+119) || ~((F <= -950000.0))) tmp = -x / B; else tmp = (-1.0 + x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -5.2e+119], N[Not[LessEqual[F, -950000.0]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.2 \cdot 10^{+119} \lor \neg \left(F \leq -950000\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + x}{B}\\
\end{array}
\end{array}
if F < -5.2e119 or -9.5e5 < F Initial program 78.3%
Taylor expanded in F around -inf 49.3%
Taylor expanded in B around 0 25.1%
associate-*r/25.1%
distribute-lft-in25.1%
metadata-eval25.1%
neg-mul-125.1%
Simplified25.1%
Taylor expanded in x around inf 30.1%
mul-1-neg30.1%
Simplified30.1%
if -5.2e119 < F < -9.5e5Initial program 99.2%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 50.2%
associate-*r/50.2%
distribute-lft-in50.2%
metadata-eval50.2%
neg-mul-150.2%
Simplified50.2%
expm1-log1p-u14.7%
expm1-udef14.4%
+-commutative14.4%
add-sqr-sqrt0.5%
sqrt-unprod14.3%
sqr-neg14.3%
sqrt-unprod13.8%
add-sqr-sqrt14.3%
Applied egg-rr14.3%
expm1-def14.3%
expm1-log1p50.3%
Simplified50.3%
Final simplification31.7%
(FPCore (F B x) :precision binary64 (if (<= F -2.4e-110) (/ (- -1.0 x) B) (if (<= F 1.35e-68) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e-110) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.35e-68) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.4d-110)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.35d-68) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.4e-110) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.35e-68) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.4e-110: tmp = (-1.0 - x) / B elif F <= 1.35e-68: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.4e-110) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.35e-68) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.4e-110) tmp = (-1.0 - x) / B; elseif (F <= 1.35e-68) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.4e-110], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.35e-68], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.4 \cdot 10^{-110}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-68}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.40000000000000006e-110Initial program 70.2%
Taylor expanded in F around -inf 83.0%
Taylor expanded in B around 0 37.8%
associate-*r/37.8%
distribute-lft-in37.8%
metadata-eval37.8%
neg-mul-137.8%
Simplified37.8%
if -2.40000000000000006e-110 < F < 1.3500000000000001e-68Initial program 99.4%
Taylor expanded in F around -inf 30.3%
Taylor expanded in B around 0 14.9%
associate-*r/14.9%
distribute-lft-in14.9%
metadata-eval14.9%
neg-mul-114.9%
Simplified14.9%
Taylor expanded in x around inf 41.2%
mul-1-neg41.2%
Simplified41.2%
if 1.3500000000000001e-68 < F Initial program 74.0%
Taylor expanded in B around 0 56.3%
Taylor expanded in F around inf 69.4%
Taylor expanded in B around 0 48.6%
Final simplification42.8%
(FPCore (F B x) :precision binary64 (if (or (<= F -3e+119) (not (<= F -950000.0))) (/ (- x) B) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((F <= -3e+119) || !(F <= -950000.0)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((f <= (-3d+119)) .or. (.not. (f <= (-950000.0d0)))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((F <= -3e+119) || !(F <= -950000.0)) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -3e+119) or not (F <= -950000.0): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((F <= -3e+119) || !(F <= -950000.0)) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= -3e+119) || ~((F <= -950000.0))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -3e+119], N[Not[LessEqual[F, -950000.0]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3 \cdot 10^{+119} \lor \neg \left(F \leq -950000\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if F < -3.00000000000000001e119 or -9.5e5 < F Initial program 78.3%
Taylor expanded in F around -inf 49.3%
Taylor expanded in B around 0 25.1%
associate-*r/25.1%
distribute-lft-in25.1%
metadata-eval25.1%
neg-mul-125.1%
Simplified25.1%
Taylor expanded in x around inf 30.1%
mul-1-neg30.1%
Simplified30.1%
if -3.00000000000000001e119 < F < -9.5e5Initial program 99.2%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 50.2%
associate-*r/50.2%
distribute-lft-in50.2%
metadata-eval50.2%
neg-mul-150.2%
Simplified50.2%
Taylor expanded in x around 0 50.1%
Final simplification31.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 79.9%
Taylor expanded in F around -inf 53.1%
Taylor expanded in B around 0 27.0%
associate-*r/27.0%
distribute-lft-in27.0%
metadata-eval27.0%
neg-mul-127.0%
Simplified27.0%
Taylor expanded in x around 0 10.0%
Final simplification10.0%
herbie shell --seed 2023336
(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))))))