
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.8e+124)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 120000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.8e+124) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 120000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.8d+124)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 120000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.8e+124) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 120000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.8e+124: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 120000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.8e+124) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 120000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.8e+124) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 120000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+124], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+124}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.8e124Initial program 36.0%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.8%
Applied egg-rr99.8%
if -2.8e124 < F < 1.2e8Initial program 99.5%
div-inv99.7%
expm1-log1p-u76.6%
expm1-udef63.1%
Applied egg-rr63.1%
expm1-def76.6%
expm1-log1p99.7%
Simplified99.7%
if 1.2e8 < F Initial program 49.5%
Simplified63.5%
Taylor expanded in F around inf 99.6%
associate-/r*99.6%
Simplified99.6%
associate-*r/99.8%
rgt-mult-inverse99.9%
frac-2neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in B around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1650000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.4)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.4) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} 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 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.4d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
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 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.4) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.4: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.4) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; 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[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_1\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.65e9 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.1%
if 1.3999999999999999 < F Initial program 51.3%
Simplified64.8%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
associate-*r/99.2%
rgt-mult-inverse99.3%
frac-2neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around inf 99.3%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(if (<= F -19000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.3)
(+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -19000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.3) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-19000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.3d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0)))))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -19000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.3) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0)))));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -19000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.3: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -19000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.3) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0)))))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -19000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.3) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt((2.0 + (x * 2.0))))); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -19000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -19000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.3:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.9e7Initial program 57.9%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.9e7 < F < 1.30000000000000004Initial program 99.5%
associate-*l/99.5%
+-commutative99.5%
*-commutative99.5%
fma-udef99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-/l*99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.0%
if 1.30000000000000004 < F Initial program 51.3%
Simplified64.8%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
associate-*r/99.2%
rgt-mult-inverse99.3%
frac-2neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around inf 99.3%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1650000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.4)
(- (/ F (/ (sin B) (sqrt 0.5))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.4) {
tmp = (F / (sin(B) / sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.4d0) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.4) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.4: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.4) tmp = (F / (sin(B) / sqrt(0.5))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.65e9 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 98.9%
associate-/l*98.8%
Simplified98.8%
if 1.3999999999999999 < F Initial program 51.3%
Simplified64.8%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
associate-*r/99.2%
rgt-mult-inverse99.3%
frac-2neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around inf 99.3%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1650000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 1.4)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 1.4) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 1.4d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 1.4) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 1.4: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 1.4) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.65e9 < F < 1.3999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in x around 0 98.9%
if 1.3999999999999999 < F Initial program 51.3%
Simplified64.8%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
associate-*r/99.2%
rgt-mult-inverse99.3%
frac-2neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around inf 99.3%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(t_1 (/ x (tan B)))
(t_2 (- (* t_0 (/ F B)) t_1)))
(if (<= F -1650000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 3.7e-149)
t_2
(if (<= F 1.15e-115)
(- (* (/ F (sin B)) t_0) (/ x B))
(if (<= F 0.16) t_2 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / tan(B);
double t_2 = (t_0 * (F / B)) - t_1;
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 3.7e-149) {
tmp = t_2;
} else if (F <= 1.15e-115) {
tmp = ((F / sin(B)) * t_0) - (x / B);
} else if (F <= 0.16) {
tmp = t_2;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x / tan(b)
t_2 = (t_0 * (f / b)) - t_1
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 3.7d-149) then
tmp = t_2
else if (f <= 1.15d-115) then
tmp = ((f / sin(b)) * t_0) - (x / b)
else if (f <= 0.16d0) then
tmp = t_2
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / Math.tan(B);
double t_2 = (t_0 * (F / B)) - t_1;
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 3.7e-149) {
tmp = t_2;
} else if (F <= 1.15e-115) {
tmp = ((F / Math.sin(B)) * t_0) - (x / B);
} else if (F <= 0.16) {
tmp = t_2;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x / math.tan(B) t_2 = (t_0 * (F / B)) - t_1 tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 3.7e-149: tmp = t_2 elif F <= 1.15e-115: tmp = ((F / math.sin(B)) * t_0) - (x / B) elif F <= 0.16: tmp = t_2 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(t_0 * Float64(F / B)) - t_1) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 3.7e-149) tmp = t_2; elseif (F <= 1.15e-115) tmp = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)); elseif (F <= 0.16) tmp = t_2; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / tan(B); t_2 = (t_0 * (F / B)) - t_1; tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 3.7e-149) tmp = t_2; elseif (F <= 1.15e-115) tmp = ((F / sin(B)) * t_0) - (x / B); elseif (F <= 0.16) tmp = t_2; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-149], t$95$2, If[LessEqual[F, 1.15e-115], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.16], t$95$2, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
t_2 := t_0 \cdot \frac{F}{B} - t_1\\
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-149}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-115}:\\
\;\;\;\;\frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.16:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.65e9 < F < 3.6999999999999999e-149 or 1.14999999999999992e-115 < F < 0.160000000000000003Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 86.1%
if 3.6999999999999999e-149 < F < 1.14999999999999992e-115Initial program 99.2%
Taylor expanded in B around 0 98.7%
Taylor expanded in F around 0 98.7%
if 0.160000000000000003 < F Initial program 51.3%
Simplified64.8%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
associate-*r/99.2%
rgt-mult-inverse99.3%
frac-2neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around inf 99.3%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(t_1 (/ x (tan B)))
(t_2 (- (* t_0 (/ F B)) t_1))
(t_3 (/ 1.0 (sin B))))
(if (<= F -1650000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 3.5e-149)
t_2
(if (<= F 2.05e-117)
(- (* F (* t_3 t_0)) (/ x B))
(if (<= F 0.027) t_2 (- t_3 t_1)))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / tan(B);
double t_2 = (t_0 * (F / B)) - t_1;
double t_3 = 1.0 / sin(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 3.5e-149) {
tmp = t_2;
} else if (F <= 2.05e-117) {
tmp = (F * (t_3 * t_0)) - (x / B);
} else if (F <= 0.027) {
tmp = t_2;
} else {
tmp = t_3 - 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) :: t_3
real(8) :: tmp
t_0 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x / tan(b)
t_2 = (t_0 * (f / b)) - t_1
t_3 = 1.0d0 / sin(b)
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 3.5d-149) then
tmp = t_2
else if (f <= 2.05d-117) then
tmp = (f * (t_3 * t_0)) - (x / b)
else if (f <= 0.027d0) then
tmp = t_2
else
tmp = t_3 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / Math.tan(B);
double t_2 = (t_0 * (F / B)) - t_1;
double t_3 = 1.0 / Math.sin(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 3.5e-149) {
tmp = t_2;
} else if (F <= 2.05e-117) {
tmp = (F * (t_3 * t_0)) - (x / B);
} else if (F <= 0.027) {
tmp = t_2;
} else {
tmp = t_3 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x / math.tan(B) t_2 = (t_0 * (F / B)) - t_1 t_3 = 1.0 / math.sin(B) tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 3.5e-149: tmp = t_2 elif F <= 2.05e-117: tmp = (F * (t_3 * t_0)) - (x / B) elif F <= 0.027: tmp = t_2 else: tmp = t_3 - t_1 return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(t_0 * Float64(F / B)) - t_1) t_3 = Float64(1.0 / sin(B)) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 3.5e-149) tmp = t_2; elseif (F <= 2.05e-117) tmp = Float64(Float64(F * Float64(t_3 * t_0)) - Float64(x / B)); elseif (F <= 0.027) tmp = t_2; else tmp = Float64(t_3 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / tan(B); t_2 = (t_0 * (F / B)) - t_1; t_3 = 1.0 / sin(B); tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 3.5e-149) tmp = t_2; elseif (F <= 2.05e-117) tmp = (F * (t_3 * t_0)) - (x / B); elseif (F <= 0.027) tmp = t_2; else tmp = t_3 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5e-149], t$95$2, If[LessEqual[F, 2.05e-117], N[(N[(F * N[(t$95$3 * t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.027], t$95$2, N[(t$95$3 - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
t_2 := t_0 \cdot \frac{F}{B} - t_1\\
t_3 := \frac{1}{\sin B}\\
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-149}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-117}:\\
\;\;\;\;F \cdot \left(t_3 \cdot t_0\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.027:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 - t_1\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.65e9 < F < 3.5e-149 or 2.05000000000000016e-117 < F < 0.0269999999999999997Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 86.1%
if 3.5e-149 < F < 2.05000000000000016e-117Initial program 99.2%
Simplified99.4%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 98.9%
if 0.0269999999999999997 < F Initial program 51.3%
Simplified64.8%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
associate-*r/99.2%
rgt-mult-inverse99.3%
frac-2neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around inf 99.3%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1650000000.0)
(+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B)))
(if (<= F 0.245)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 0.245) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 0.245d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 0.245) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 0.245: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 0.245) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 0.245) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.245], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.245:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.65e9 < F < 0.245Initial program 99.5%
Simplified99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 83.6%
if 0.245 < F Initial program 51.3%
Simplified64.8%
Taylor expanded in F around inf 99.0%
associate-/r*99.0%
Simplified99.0%
associate-*r/99.2%
rgt-mult-inverse99.3%
frac-2neg99.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in B around inf 99.3%
Final simplification92.4%
(FPCore (F B x) :precision binary64 (if (<= F -1650000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 3.3e-50) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.3e-50) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.3d-50) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.3e-50) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.3e-50: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.3e-50) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.3e-50) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-50], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around -inf 77.8%
distribute-lft-in77.8%
mul-1-neg77.8%
unsub-neg77.8%
metadata-eval77.8%
associate-*r/77.8%
associate-*r*77.8%
metadata-eval77.8%
*-lft-identity77.8%
Simplified77.8%
if -1.65e9 < F < 3.2999999999999998e-50Initial program 99.5%
Taylor expanded in F around -inf 38.9%
Taylor expanded in x around inf 67.9%
associate-/l*67.9%
tan-quot68.0%
expm1-log1p-u47.9%
expm1-udef31.5%
Applied egg-rr31.5%
expm1-def47.9%
expm1-log1p68.0%
Simplified68.0%
if 3.2999999999999998e-50 < F Initial program 55.6%
Simplified67.9%
Taylor expanded in F around inf 94.1%
associate-/r*94.1%
Simplified94.1%
associate-*r/94.3%
rgt-mult-inverse94.3%
frac-2neg94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in B around inf 94.3%
Final simplification79.6%
(FPCore (F B x) :precision binary64 (if (<= F -1650000000.0) (+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B)))) (if (<= F 2.05e-49) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 2.05e-49) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 2.05d-49) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 2.05e-49) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 2.05e-49: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 2.05e-49) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 2.05e-49) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e-49], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-49}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
if -1.65e9 < F < 2.0500000000000001e-49Initial program 99.5%
Taylor expanded in F around -inf 38.9%
Taylor expanded in x around inf 67.9%
associate-/l*67.9%
tan-quot68.0%
expm1-log1p-u47.9%
expm1-udef31.5%
Applied egg-rr31.5%
expm1-def47.9%
expm1-log1p68.0%
Simplified68.0%
if 2.0500000000000001e-49 < F Initial program 55.6%
Simplified67.9%
Taylor expanded in F around inf 94.1%
associate-/r*94.1%
Simplified94.1%
associate-*r/94.3%
rgt-mult-inverse94.3%
frac-2neg94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in B around inf 94.3%
Final simplification84.7%
(FPCore (F B x) :precision binary64 (if (<= F -1650000000.0) (+ (/ -1.0 (/ (tan B) x)) (/ -1.0 (sin B))) (if (<= F 8.4e-50) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B));
} else if (F <= 8.4e-50) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((-1.0d0) / sin(b))
else if (f <= 8.4d-50) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + (-1.0 / Math.sin(B));
} else if (F <= 8.4e-50) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / (math.tan(B) / x)) + (-1.0 / math.sin(B)) elif F <= 8.4e-50: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(-1.0 / sin(B))); elseif (F <= 8.4e-50) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / (tan(B) / x)) + (-1.0 / sin(B)); elseif (F <= 8.4e-50) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.4e-50], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 8.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
clear-num99.7%
Applied egg-rr99.7%
if -1.65e9 < F < 8.4000000000000003e-50Initial program 99.5%
Taylor expanded in F around -inf 38.9%
Taylor expanded in x around inf 67.9%
associate-/l*67.9%
tan-quot68.0%
expm1-log1p-u47.9%
expm1-udef31.5%
Applied egg-rr31.5%
expm1-def47.9%
expm1-log1p68.0%
Simplified68.0%
if 8.4000000000000003e-50 < F Initial program 55.6%
Simplified67.9%
Taylor expanded in F around inf 94.1%
associate-/r*94.1%
Simplified94.1%
associate-*r/94.3%
rgt-mult-inverse94.3%
frac-2neg94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in B around inf 94.3%
Final simplification84.7%
(FPCore (F B x) :precision binary64 (if (<= F -1650000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 2.4e-35) (/ (- x) (tan B)) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.4e-35) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.4d-35) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.4e-35) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.4e-35: tmp = -x / math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.4e-35) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1650000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.4e-35) tmp = -x / tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-35], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-35}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around -inf 77.8%
distribute-lft-in77.8%
mul-1-neg77.8%
unsub-neg77.8%
metadata-eval77.8%
associate-*r/77.8%
associate-*r*77.8%
metadata-eval77.8%
*-lft-identity77.8%
Simplified77.8%
if -1.65e9 < F < 2.4000000000000001e-35Initial program 99.5%
Taylor expanded in F around -inf 38.8%
Taylor expanded in x around inf 67.0%
associate-/l*67.0%
tan-quot67.1%
expm1-log1p-u46.6%
expm1-udef30.7%
Applied egg-rr30.7%
expm1-def46.6%
expm1-log1p67.1%
Simplified67.1%
if 2.4000000000000001e-35 < F Initial program 54.1%
Simplified66.8%
Taylor expanded in F around inf 96.0%
associate-/r*96.0%
Simplified96.0%
Taylor expanded in B around 0 73.7%
Final simplification71.9%
(FPCore (F B x) :precision binary64 (if (<= F -1650000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 5.6e-25) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.6e-25) {
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 <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.6d-25) 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 <= -1650000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.6e-25) {
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 <= -1650000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.6e-25: 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 <= -1650000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.6e-25) 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 <= -1650000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.6e-25) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-25], 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 -1650000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around -inf 77.8%
distribute-lft-in77.8%
mul-1-neg77.8%
unsub-neg77.8%
metadata-eval77.8%
associate-*r/77.8%
associate-*r*77.8%
metadata-eval77.8%
*-lft-identity77.8%
Simplified77.8%
if -1.65e9 < F < 5.59999999999999976e-25Initial program 99.5%
Taylor expanded in F around -inf 39.3%
Taylor expanded in x around inf 67.3%
associate-/l*67.3%
tan-quot67.4%
expm1-log1p-u47.0%
expm1-udef31.2%
Applied egg-rr31.2%
expm1-def47.0%
expm1-log1p67.4%
Simplified67.4%
if 5.59999999999999976e-25 < F Initial program 53.6%
Taylor expanded in B around 0 33.9%
Taylor expanded in F around inf 76.1%
Final simplification72.8%
(FPCore (F B x)
:precision binary64
(if (<= F -1.6e+17)
(/ (- -1.0 x) B)
(if (<= F 9500000.0)
(/ (- x) (sin B))
(+
(/ (- 1.0 x) B)
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e+17) {
tmp = (-1.0 - x) / B;
} else if (F <= 9500000.0) {
tmp = -x / sin(B);
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.6d+17)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 9500000.0d0) then
tmp = -x / sin(b)
else
tmp = ((1.0d0 - x) / b) + (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e+17) {
tmp = (-1.0 - x) / B;
} else if (F <= 9500000.0) {
tmp = -x / Math.sin(B);
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e+17: tmp = (-1.0 - x) / B elif F <= 9500000.0: tmp = -x / math.sin(B) else: tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e+17) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9500000.0) tmp = Float64(Float64(-x) / sin(B)); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.6e+17) tmp = (-1.0 - x) / B; elseif (F <= 9500000.0) tmp = -x / sin(B); else tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e+17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9500000.0], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.6 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9500000:\\
\;\;\;\;\frac{-x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -1.6e17Initial program 55.8%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 46.8%
associate-*r/46.8%
distribute-lft-in46.8%
metadata-eval46.8%
neg-mul-146.8%
Simplified46.8%
if -1.6e17 < F < 9.5e6Initial program 99.5%
Taylor expanded in F around -inf 39.7%
Taylor expanded in x around inf 64.9%
Taylor expanded in B around 0 36.4%
if 9.5e6 < F Initial program 49.5%
Simplified63.5%
Taylor expanded in F around inf 99.6%
associate-/r*99.6%
Simplified99.6%
associate-*r/99.8%
rgt-mult-inverse99.9%
frac-2neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in B around 0 55.9%
associate--l+55.9%
*-commutative55.9%
div-sub55.9%
Simplified55.9%
Final simplification44.8%
(FPCore (F B x) :precision binary64 (if (<= F -5.9e+152) (/ (- -1.0 x) B) (if (<= F 1.45e+176) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.9e+152) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.45e+176) {
tmp = -x / tan(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.9d+152)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.45d+176) then
tmp = -x / tan(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.9e+152) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.45e+176) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.9e+152: tmp = (-1.0 - x) / B elif F <= 1.45e+176: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.9e+152) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.45e+176) tmp = Float64(Float64(-x) / tan(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.9e+152) tmp = (-1.0 - x) / B; elseif (F <= 1.45e+176) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.9e+152], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.45e+176], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.9 \cdot 10^{+152}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{+176}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.9000000000000002e152Initial program 26.9%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 53.5%
associate-*r/53.5%
distribute-lft-in53.5%
metadata-eval53.5%
neg-mul-153.5%
Simplified53.5%
if -5.9000000000000002e152 < F < 1.4500000000000001e176Initial program 94.8%
Taylor expanded in F around -inf 50.9%
Taylor expanded in x around inf 61.4%
associate-/l*61.4%
tan-quot61.5%
expm1-log1p-u39.2%
expm1-udef29.5%
Applied egg-rr29.5%
expm1-def39.2%
expm1-log1p61.5%
Simplified61.5%
if 1.4500000000000001e176 < F Initial program 23.8%
Simplified34.7%
Taylor expanded in F around inf 99.6%
associate-/r*99.6%
Simplified99.6%
associate-*r/99.8%
rgt-mult-inverse99.8%
frac-2neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in B around 0 55.1%
Final simplification59.4%
(FPCore (F B x) :precision binary64 (if (<= F -1650000000.0) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.7e+176) (/ (- x) (tan B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1650000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.7e+176) {
tmp = -x / tan(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 <= (-1650000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.7d+176) then
tmp = -x / tan(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 <= -1650000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.7e+176) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1650000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.7e+176: tmp = -x / math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1650000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.7e+176) tmp = Float64(Float64(-x) / tan(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 <= -1650000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.7e+176) tmp = -x / tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1650000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e+176], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1650000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{+176}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.65e9Initial program 57.2%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around -inf 77.8%
distribute-lft-in77.8%
mul-1-neg77.8%
unsub-neg77.8%
metadata-eval77.8%
associate-*r/77.8%
associate-*r*77.8%
metadata-eval77.8%
*-lft-identity77.8%
Simplified77.8%
if -1.65e9 < F < 1.70000000000000007e176Initial program 94.0%
Taylor expanded in F around -inf 43.0%
Taylor expanded in x around inf 63.3%
associate-/l*63.3%
tan-quot63.4%
expm1-log1p-u39.3%
expm1-udef28.0%
Applied egg-rr28.0%
expm1-def39.3%
expm1-log1p63.4%
Simplified63.4%
if 1.70000000000000007e176 < F Initial program 23.8%
Simplified34.7%
Taylor expanded in F around inf 99.6%
associate-/r*99.6%
Simplified99.6%
associate-*r/99.8%
rgt-mult-inverse99.8%
frac-2neg99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in B around 0 55.1%
Final simplification65.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e-129)
(/ (- -1.0 x) B)
(if (<= F 9.5e-50)
(- (/ (- x) B) (* -0.3333333333333333 (* B x)))
(+
(/ (- 1.0 x) B)
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e-50) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.8d-129)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 9.5d-50) then
tmp = (-x / b) - ((-0.3333333333333333d0) * (b * x))
else
tmp = ((1.0d0 - x) / b) + (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.5e-50) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-129: tmp = (-1.0 - x) / B elif F <= 9.5e-50: tmp = (-x / B) - (-0.3333333333333333 * (B * x)) else: tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-129) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.5e-50) tmp = Float64(Float64(Float64(-x) / B) - Float64(-0.3333333333333333 * Float64(B * x))); else tmp = Float64(Float64(Float64(1.0 - x) / B) + Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.8e-129) tmp = (-1.0 - x) / B; elseif (F <= 9.5e-50) tmp = (-x / B) - (-0.3333333333333333 * (B * x)); else tmp = ((1.0 - x) / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-129], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.5e-50], N[(N[((-x) / B), $MachinePrecision] - N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision] + N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{B} - -0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B} + B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\\
\end{array}
\end{array}
if F < -1.8e-129Initial program 70.7%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 41.2%
associate-*r/41.2%
distribute-lft-in41.2%
metadata-eval41.2%
neg-mul-141.2%
Simplified41.2%
if -1.8e-129 < F < 9.4999999999999993e-50Initial program 99.5%
Taylor expanded in F around -inf 36.2%
Taylor expanded in x around inf 74.3%
associate-/l*74.3%
tan-quot74.4%
clear-num74.2%
associate-/r/74.3%
Applied egg-rr74.3%
Taylor expanded in B around 0 37.4%
if 9.4999999999999993e-50 < F Initial program 55.6%
Simplified67.9%
Taylor expanded in F around inf 94.1%
associate-/r*94.1%
Simplified94.1%
associate-*r/94.3%
rgt-mult-inverse94.3%
frac-2neg94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in B around 0 52.9%
associate--l+52.9%
*-commutative52.9%
div-sub52.9%
Simplified52.9%
Final simplification44.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e-129)
(/ (- -1.0 x) B)
(if (<= F 3.3e-32)
(- (/ (- x) B) (* -0.3333333333333333 (* B x)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.3e-32) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.8d-129)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 3.3d-32) then
tmp = (-x / b) - ((-0.3333333333333333d0) * (b * x))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 3.3e-32) {
tmp = (-x / B) - (-0.3333333333333333 * (B * x));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-129: tmp = (-1.0 - x) / B elif F <= 3.3e-32: tmp = (-x / B) - (-0.3333333333333333 * (B * x)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-129) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 3.3e-32) tmp = Float64(Float64(Float64(-x) / B) - Float64(-0.3333333333333333 * Float64(B * x))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.8e-129) tmp = (-1.0 - x) / B; elseif (F <= 3.3e-32) tmp = (-x / B) - (-0.3333333333333333 * (B * x)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-129], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.3e-32], N[(N[((-x) / B), $MachinePrecision] - N[(-0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-32}:\\
\;\;\;\;\frac{-x}{B} - -0.3333333333333333 \cdot \left(B \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8e-129Initial program 70.7%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 41.2%
associate-*r/41.2%
distribute-lft-in41.2%
metadata-eval41.2%
neg-mul-141.2%
Simplified41.2%
if -1.8e-129 < F < 3.30000000000000025e-32Initial program 99.5%
Taylor expanded in F around -inf 36.8%
Taylor expanded in x around inf 73.2%
associate-/l*73.3%
tan-quot73.3%
clear-num73.1%
associate-/r/73.2%
Applied egg-rr73.2%
Taylor expanded in B around 0 36.9%
if 3.30000000000000025e-32 < F Initial program 53.6%
Simplified66.4%
Taylor expanded in F around inf 96.0%
associate-/r*96.0%
Simplified96.0%
associate-*r/96.2%
rgt-mult-inverse96.2%
frac-2neg96.2%
metadata-eval96.2%
Applied egg-rr96.2%
Taylor expanded in B around 0 54.0%
Final simplification44.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e-129)
(/ (- -1.0 x) B)
(if (<= F 2.1e-31)
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-31) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.8d-129)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.1d-31) then
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.1e-31) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-129: tmp = (-1.0 - x) / B elif F <= 2.1e-31: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-129) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.1e-31) tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.8e-129) tmp = (-1.0 - x) / B; elseif (F <= 2.1e-31) tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-129], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.1e-31], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{-31}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8e-129Initial program 70.7%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 41.2%
associate-*r/41.2%
distribute-lft-in41.2%
metadata-eval41.2%
neg-mul-141.2%
Simplified41.2%
if -1.8e-129 < F < 2.09999999999999991e-31Initial program 99.5%
Taylor expanded in F around -inf 36.8%
Taylor expanded in x around inf 73.2%
associate-/l*73.3%
tan-quot73.3%
clear-num73.1%
associate-/r/73.2%
Applied egg-rr73.2%
Taylor expanded in B around 0 36.9%
if 2.09999999999999991e-31 < F Initial program 53.6%
Simplified66.4%
Taylor expanded in F around inf 96.0%
associate-/r*96.0%
Simplified96.0%
associate-*r/96.2%
rgt-mult-inverse96.2%
frac-2neg96.2%
metadata-eval96.2%
Applied egg-rr96.2%
Taylor expanded in B around 0 54.0%
Final simplification44.1%
(FPCore (F B x) :precision binary64 (if (<= F -7.6e+63) (/ -1.0 B) (if (<= F 1.9e-50) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.6e+63) {
tmp = -1.0 / B;
} else if (F <= 1.9e-50) {
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 <= (-7.6d+63)) then
tmp = (-1.0d0) / b
else if (f <= 1.9d-50) 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 <= -7.6e+63) {
tmp = -1.0 / B;
} else if (F <= 1.9e-50) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.6e+63: tmp = -1.0 / B elif F <= 1.9e-50: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.6e+63) tmp = Float64(-1.0 / B); elseif (F <= 1.9e-50) 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 <= -7.6e+63) tmp = -1.0 / B; elseif (F <= 1.9e-50) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.6e+63], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1.9e-50], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.6 \cdot 10^{+63}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.6000000000000002e63Initial program 46.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 45.9%
associate-*r/45.9%
distribute-lft-in45.9%
metadata-eval45.9%
neg-mul-145.9%
Simplified45.9%
Taylor expanded in x around 0 33.1%
if -7.6000000000000002e63 < F < 1.9e-50Initial program 99.5%
Taylor expanded in F around -inf 45.1%
Taylor expanded in B around 0 23.5%
associate-*r/23.5%
distribute-lft-in23.5%
metadata-eval23.5%
neg-mul-123.5%
Simplified23.5%
Taylor expanded in x around inf 34.8%
mul-1-neg34.8%
distribute-neg-frac34.8%
Simplified34.8%
if 1.9e-50 < F Initial program 55.6%
Simplified67.9%
Taylor expanded in F around inf 94.1%
associate-/r*94.1%
Simplified94.1%
associate-*r/94.3%
rgt-mult-inverse94.3%
frac-2neg94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in B around 0 52.8%
Final simplification40.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.8e-129) (/ (- -1.0 x) B) (if (<= F 4.2e-50) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-50) {
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 <= (-1.8d-129)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.2d-50) 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 <= -1.8e-129) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-50) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-129: tmp = (-1.0 - x) / B elif F <= 4.2e-50: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-129) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.2e-50) 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 <= -1.8e-129) tmp = (-1.0 - x) / B; elseif (F <= 4.2e-50) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-129], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e-50], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-129}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8e-129Initial program 70.7%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 41.2%
associate-*r/41.2%
distribute-lft-in41.2%
metadata-eval41.2%
neg-mul-141.2%
Simplified41.2%
if -1.8e-129 < F < 4.2000000000000002e-50Initial program 99.5%
Taylor expanded in F around -inf 36.2%
Taylor expanded in B around 0 17.4%
associate-*r/17.4%
distribute-lft-in17.4%
metadata-eval17.4%
neg-mul-117.4%
Simplified17.4%
Taylor expanded in x around inf 35.8%
mul-1-neg35.8%
distribute-neg-frac35.8%
Simplified35.8%
if 4.2000000000000002e-50 < F Initial program 55.6%
Simplified67.9%
Taylor expanded in F around inf 94.1%
associate-/r*94.1%
Simplified94.1%
associate-*r/94.3%
rgt-mult-inverse94.3%
frac-2neg94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in B around 0 52.8%
Final simplification43.6%
(FPCore (F B x) :precision binary64 (if (<= F -6.2e+63) (/ -1.0 B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+63) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.2d+63)) then
tmp = (-1.0d0) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+63) {
tmp = -1.0 / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e+63: tmp = -1.0 / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e+63) tmp = Float64(-1.0 / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e+63) tmp = -1.0 / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e+63], N[(-1.0 / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{+63}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -6.2000000000000001e63Initial program 46.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 45.9%
associate-*r/45.9%
distribute-lft-in45.9%
metadata-eval45.9%
neg-mul-145.9%
Simplified45.9%
Taylor expanded in x around 0 33.1%
if -6.2000000000000001e63 < F Initial program 80.5%
Taylor expanded in F around -inf 44.3%
Taylor expanded in B around 0 24.1%
associate-*r/24.1%
distribute-lft-in24.1%
metadata-eval24.1%
neg-mul-124.1%
Simplified24.1%
Taylor expanded in x around inf 30.7%
mul-1-neg30.7%
distribute-neg-frac30.7%
Simplified30.7%
Final simplification31.1%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 74.2%
Taylor expanded in F around -inf 54.7%
Taylor expanded in B around 0 28.2%
associate-*r/28.2%
distribute-lft-in28.2%
metadata-eval28.2%
neg-mul-128.2%
Simplified28.2%
Taylor expanded in x around 0 9.4%
Final simplification9.4%
herbie shell --seed 2024024
(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))))))