
(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 -1e+98)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 320000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1e+98) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 320000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+98) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 320000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+98], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 320000.0], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+98}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 320000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.99999999999999998e97Initial program 40.9%
Taylor expanded in F around -inf 99.9%
if -9.99999999999999998e97 < F < 3.2e5Initial program 98.8%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-*r/99.6%
fma-define99.6%
un-div-inv99.6%
fma-define99.6%
Applied egg-rr99.6%
if 3.2e5 < F Initial program 57.3%
Simplified67.5%
Taylor expanded in x around 0 67.6%
associate-*l/67.6%
*-lft-identity67.6%
+-commutative67.6%
unpow267.6%
fma-undefine67.6%
Simplified67.6%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+60)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 6.2e+18)
(- (/ (/ F (sin B)) (sqrt (fma F F 2.0))) 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 <= -1e+60) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 6.2e+18) {
tmp = ((F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1e+60) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 6.2e+18) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1e+60], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e+18], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.9999999999999995e59Initial program 52.0%
Taylor expanded in F around -inf 99.9%
if -9.9999999999999995e59 < F < 6.2e18Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-/l/99.6%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r*99.6%
Simplified99.6%
if 6.2e18 < F Initial program 54.1%
Simplified65.0%
Taylor expanded in x around 0 65.1%
associate-*l/65.1%
*-lft-identity65.1%
+-commutative65.1%
unpow265.1%
fma-undefine65.1%
Simplified65.1%
Taylor expanded in F around inf 99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -6.2e+58)
(+ t_0 (/ -1.0 (sin B)))
(if (<= F 320000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -6.2e+58) {
tmp = t_0 + (-1.0 / sin(B));
} else if (F <= 320000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} 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) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-6.2d+58)) then
tmp = t_0 + ((-1.0d0) / sin(b))
else if (f <= 320000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
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 t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -6.2e+58) {
tmp = t_0 + (-1.0 / Math.sin(B));
} else if (F <= 320000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -6.2e+58: tmp = t_0 + (-1.0 / math.sin(B)) elif F <= 320000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -6.2e+58) tmp = Float64(t_0 + Float64(-1.0 / sin(B))); elseif (F <= 320000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -6.2e+58) tmp = t_0 + (-1.0 / sin(B)); elseif (F <= 320000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.2e+58], N[(t$95$0 + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 320000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{+58}:\\
\;\;\;\;t\_0 + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 320000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.1999999999999998e58Initial program 52.0%
Taylor expanded in F around -inf 99.9%
if -6.1999999999999998e58 < F < 3.2e5Initial program 99.4%
if 3.2e5 < F Initial program 57.3%
Simplified67.5%
Taylor expanded in x around 0 67.6%
associate-*l/67.6%
*-lft-identity67.6%
+-commutative67.6%
unpow267.6%
fma-undefine67.6%
Simplified67.6%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -6e+58)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 320000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e+58) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 320000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} 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 <= (-6d+58)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 320000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
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 <= -6e+58) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 320000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e+58: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 320000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e+58) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 320000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6e+58) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 320000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e+58], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 320000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(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 -6 \cdot 10^{+58}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 320000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.0000000000000005e58Initial program 52.0%
Taylor expanded in F around -inf 99.9%
if -6.0000000000000005e58 < F < 3.2e5Initial program 99.4%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 3.2e5 < F Initial program 57.3%
Simplified67.5%
Taylor expanded in x around 0 67.6%
associate-*l/67.6%
*-lft-identity67.6%
+-commutative67.6%
unpow267.6%
fma-undefine67.6%
Simplified67.6%
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 -1.42)
(+ (* x (/ -1.0 (tan B))) (/ -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 <= -1.42) {
tmp = (x * (-1.0 / tan(B))) + (-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 <= (-1.42d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-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 <= -1.42) {
tmp = (x * (-1.0 / Math.tan(B))) + (-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 <= -1.42: tmp = (x * (-1.0 / math.tan(B))) + (-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 <= -1.42) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (x * (-1.0 / tan(B))) + (-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, -1.42], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 59.3%
Taylor expanded in F around -inf 98.9%
if -1.4199999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.1%
if 1.3999999999999999 < F Initial program 57.3%
Simplified67.5%
Taylor expanded in x around 0 67.6%
associate-*l/67.6%
*-lft-identity67.6%
+-commutative67.6%
unpow267.6%
fma-undefine67.6%
Simplified67.6%
Taylor expanded in F around inf 99.7%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 1.4)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 1.4) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 1.4d0) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 1.4) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 1.4: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 1.4) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 1.4) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 59.3%
Taylor expanded in F around -inf 98.9%
if -1.4199999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-*r/99.6%
fma-define99.6%
un-div-inv99.6%
fma-define99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.2%
if 1.3999999999999999 < F Initial program 57.3%
Simplified67.5%
Taylor expanded in x around 0 67.6%
associate-*l/67.6%
*-lft-identity67.6%
+-commutative67.6%
unpow267.6%
fma-undefine67.6%
Simplified67.6%
Taylor expanded in F around inf 99.7%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.85e+208)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.95e+55)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -6.0)
(- (* (/ F (sin B)) (/ -1.0 F)) (/ x B))
(if (<= F 340000.0)
(/ (- (* x (cos B))) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e+208) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.95e+55) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -6.0) {
tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= 340000.0) {
tmp = -(x * cos(B)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.85d+208)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.95d+55)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-6.0d0)) then
tmp = ((f / sin(b)) * ((-1.0d0) / f)) - (x / b)
else if (f <= 340000.0d0) then
tmp = -(x * cos(b)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e+208) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.95e+55) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -6.0) {
tmp = ((F / Math.sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= 340000.0) {
tmp = -(x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.85e+208: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.95e+55: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -6.0: tmp = ((F / math.sin(B)) * (-1.0 / F)) - (x / B) elif F <= 340000.0: tmp = -(x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.85e+208) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.95e+55) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -6.0) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= 340000.0) tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.85e+208) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.95e+55) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -6.0) tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B); elseif (F <= 340000.0) tmp = -(x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.85e+208], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.95e+55], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 340000.0], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{+208}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{+55}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -6:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 340000:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.84999999999999994e208Initial program 22.6%
Taylor expanded in B around 0 7.1%
Taylor expanded in F around -inf 83.6%
distribute-lft-in83.6%
associate-*r/83.6%
metadata-eval83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
if -1.84999999999999994e208 < F < -1.95000000000000014e55Initial program 77.0%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 79.0%
if -1.95000000000000014e55 < F < -6Initial program 99.6%
Taylor expanded in B around 0 99.6%
Taylor expanded in F around -inf 91.6%
if -6 < F < 3.4e5Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around -inf 32.4%
Taylor expanded in x around inf 72.8%
mul-1-neg72.8%
Simplified72.8%
if 3.4e5 < F Initial program 56.7%
Taylor expanded in B around 0 40.2%
Taylor expanded in F around inf 82.0%
Final simplification77.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (* x (/ 1.0 (tan B))))))
(if (<= F -2.8e+208)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.4e+55)
t_0
(if (<= F -0.41)
(- (* (/ F (sin B)) (/ -1.0 F)) (/ x B))
(if (<= F -2e-89)
(/ F (* (sin B) (sqrt 2.0)))
(if (<= F -6.9e-133)
t_0
(if (<= F 2300.0)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x * (1.0 / tan(B)));
double tmp;
if (F <= -2.8e+208) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.4e+55) {
tmp = t_0;
} else if (F <= -0.41) {
tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= -2e-89) {
tmp = F / (sin(B) * sqrt(2.0));
} else if (F <= -6.9e-133) {
tmp = t_0;
} else if (F <= 2300.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (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 = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
if (f <= (-2.8d+208)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.4d+55)) then
tmp = t_0
else if (f <= (-0.41d0)) then
tmp = ((f / sin(b)) * ((-1.0d0) / f)) - (x / b)
else if (f <= (-2d-89)) then
tmp = f / (sin(b) * sqrt(2.0d0))
else if (f <= (-6.9d-133)) then
tmp = t_0
else if (f <= 2300.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (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 = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
double tmp;
if (F <= -2.8e+208) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.4e+55) {
tmp = t_0;
} else if (F <= -0.41) {
tmp = ((F / Math.sin(B)) * (-1.0 / F)) - (x / B);
} else if (F <= -2e-89) {
tmp = F / (Math.sin(B) * Math.sqrt(2.0));
} else if (F <= -6.9e-133) {
tmp = t_0;
} else if (F <= 2300.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x * (1.0 / math.tan(B))) tmp = 0 if F <= -2.8e+208: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.4e+55: tmp = t_0 elif F <= -0.41: tmp = ((F / math.sin(B)) * (-1.0 / F)) - (x / B) elif F <= -2e-89: tmp = F / (math.sin(B) * math.sqrt(2.0)) elif F <= -6.9e-133: tmp = t_0 elif F <= 2300.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))) tmp = 0.0 if (F <= -2.8e+208) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.4e+55) tmp = t_0; elseif (F <= -0.41) tmp = Float64(Float64(Float64(F / sin(B)) * Float64(-1.0 / F)) - Float64(x / B)); elseif (F <= -2e-89) tmp = Float64(F / Float64(sin(B) * sqrt(2.0))); elseif (F <= -6.9e-133) tmp = t_0; elseif (F <= 2300.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * 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 = (-1.0 / B) - (x * (1.0 / tan(B))); tmp = 0.0; if (F <= -2.8e+208) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.4e+55) tmp = t_0; elseif (F <= -0.41) tmp = ((F / sin(B)) * (-1.0 / F)) - (x / B); elseif (F <= -2e-89) tmp = F / (sin(B) * sqrt(2.0)); elseif (F <= -6.9e-133) tmp = t_0; elseif (F <= 2300.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (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[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.8e+208], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.4e+55], t$95$0, If[LessEqual[F, -0.41], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2e-89], N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.9e-133], t$95$0, If[LessEqual[F, 2300.0], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - 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 := \frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -2.8 \cdot 10^{+208}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{+55}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -0.41:\\
\;\;\;\;\frac{F}{\sin B} \cdot \frac{-1}{F} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-89}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2}}\\
\mathbf{elif}\;F \leq -6.9 \cdot 10^{-133}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2300:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.80000000000000022e208Initial program 22.6%
Taylor expanded in B around 0 7.1%
Taylor expanded in F around -inf 83.6%
distribute-lft-in83.6%
associate-*r/83.6%
metadata-eval83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
if -2.80000000000000022e208 < F < -5.39999999999999954e55 or -2.00000000000000008e-89 < F < -6.9000000000000001e-133Initial program 80.9%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 82.5%
if -5.39999999999999954e55 < F < -0.409999999999999976Initial program 99.6%
Taylor expanded in B around 0 99.6%
Taylor expanded in F around -inf 91.6%
if -0.409999999999999976 < F < -2.00000000000000008e-89Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.4%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 50.6%
if -6.9000000000000001e-133 < F < 2300Initial program 99.4%
Taylor expanded in B around 0 67.9%
Taylor expanded in B around 0 56.9%
if 2300 < F Initial program 57.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 80.9%
Final simplification70.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e-30)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.024)
(- (/ F (* B (sqrt 2.0))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.6e-30) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.024) {
tmp = (F / (B * sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.6d-30)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.024d0) then
tmp = (f / (b * sqrt(2.0d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.6e-30) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.024) {
tmp = (F / (B * Math.sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.6e-30: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.024: tmp = (F / (B * math.sqrt(2.0))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6e-30) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.024) tmp = Float64(Float64(F / Float64(B * sqrt(2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.6e-30) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.024) tmp = (F / (B * sqrt(2.0))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e-30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.024], N[(N[(F / N[(B * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.024:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.6e-30Initial program 60.5%
Simplified73.8%
Taylor expanded in x around 0 73.7%
associate-*l/73.7%
*-lft-identity73.7%
+-commutative73.7%
unpow273.7%
fma-undefine73.7%
Simplified73.7%
Taylor expanded in F around -inf 97.5%
if -1.6e-30 < F < 0.024Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 84.7%
if 0.024 < F Initial program 57.3%
Simplified67.5%
Taylor expanded in x around 0 67.6%
associate-*l/67.6%
*-lft-identity67.6%
+-commutative67.6%
unpow267.6%
fma-undefine67.6%
Simplified67.6%
Taylor expanded in F around inf 99.7%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.6e-30)
(+ (* x (/ -1.0 (tan B))) (/ -1.0 (sin B)))
(if (<= F 0.42) (- (/ F (* B (sqrt 2.0))) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.6e-30) {
tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B));
} else if (F <= 0.42) {
tmp = (F / (B * sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.6d-30)) then
tmp = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / sin(b))
else if (f <= 0.42d0) then
tmp = (f / (b * sqrt(2.0d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.6e-30) {
tmp = (x * (-1.0 / Math.tan(B))) + (-1.0 / Math.sin(B));
} else if (F <= 0.42) {
tmp = (F / (B * Math.sqrt(2.0))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.6e-30: tmp = (x * (-1.0 / math.tan(B))) + (-1.0 / math.sin(B)) elif F <= 0.42: tmp = (F / (B * math.sqrt(2.0))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.6e-30) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / sin(B))); elseif (F <= 0.42) tmp = Float64(Float64(F / Float64(B * sqrt(2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.6e-30) tmp = (x * (-1.0 / tan(B))) + (-1.0 / sin(B)); elseif (F <= 0.42) tmp = (F / (B * sqrt(2.0))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.6e-30], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.42], N[(N[(F / N[(B * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 0.42:\\
\;\;\;\;\frac{F}{B \cdot \sqrt{2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.6e-30Initial program 60.5%
Taylor expanded in F around -inf 97.6%
if -1.6e-30 < F < 0.419999999999999984Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 84.7%
if 0.419999999999999984 < F Initial program 57.3%
Simplified67.5%
Taylor expanded in x around 0 67.6%
associate-*l/67.6%
*-lft-identity67.6%
+-commutative67.6%
unpow267.6%
fma-undefine67.6%
Simplified67.6%
Taylor expanded in F around inf 99.7%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.6e-40)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.7e-37)
(/ (- (* x (cos B))) (sin B))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.6e-40) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.7e-37) {
tmp = -(x * cos(B)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.6d-40)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.7d-37) then
tmp = -(x * cos(b)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.6e-40) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.7e-37) {
tmp = -(x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.6e-40: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.7e-37: tmp = -(x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.6e-40) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.7e-37) tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.6e-40) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.7e-37) tmp = -(x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.6e-40], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.7e-37], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.6 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-37}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.59999999999999986e-40Initial program 62.2%
Simplified74.9%
Taylor expanded in x around 0 74.8%
associate-*l/74.9%
*-lft-identity74.9%
+-commutative74.9%
unpow274.9%
fma-undefine74.9%
Simplified74.9%
Taylor expanded in F around -inf 93.7%
if -6.59999999999999986e-40 < F < 1.70000000000000009e-37Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around -inf 31.7%
Taylor expanded in x around inf 76.2%
mul-1-neg76.2%
Simplified76.2%
if 1.70000000000000009e-37 < F Initial program 60.2%
Simplified69.7%
Taylor expanded in x around 0 69.7%
associate-*l/69.7%
*-lft-identity69.7%
+-commutative69.7%
unpow269.7%
fma-undefine69.7%
Simplified69.7%
Taylor expanded in F around inf 96.1%
Final simplification86.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e-39)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 340000.0)
(/ (- (* x (cos B))) (sin B))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-39) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 340000.0) {
tmp = -(x * cos(B)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.8d-39)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 340000.0d0) then
tmp = -(x * cos(b)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-39) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 340000.0) {
tmp = -(x * Math.cos(B)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.8e-39: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 340000.0: tmp = -(x * math.cos(B)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.8e-39) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 340000.0) tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.8e-39) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 340000.0) tmp = -(x * cos(B)) / sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 340000.0], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.8 \cdot 10^{-39}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 340000:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.8e-39Initial program 62.2%
Simplified74.9%
Taylor expanded in x around 0 74.8%
associate-*l/74.9%
*-lft-identity74.9%
+-commutative74.9%
unpow274.9%
fma-undefine74.9%
Simplified74.9%
Taylor expanded in F around -inf 93.7%
if -1.8e-39 < F < 3.4e5Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around -inf 32.6%
Taylor expanded in x around inf 75.0%
mul-1-neg75.0%
Simplified75.0%
if 3.4e5 < F Initial program 56.7%
Taylor expanded in B around 0 40.2%
Taylor expanded in F around inf 82.0%
Final simplification82.0%
(FPCore (F B x)
:precision binary64
(if (<= F -2.9e+209)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.35e-142)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 850.0)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.9e+209) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.35e-142) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 850.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (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) :: tmp
if (f <= (-2.9d+209)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.35d-142)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 850.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (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 tmp;
if (F <= -2.9e+209) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.35e-142) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 850.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.9e+209: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.35e-142: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 850.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.9e+209) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.35e-142) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 850.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * 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) tmp = 0.0; if (F <= -2.9e+209) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.35e-142) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 850.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.9e+209], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.35e-142], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 850.0], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - 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}
\mathbf{if}\;F \leq -2.9 \cdot 10^{+209}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.35 \cdot 10^{-142}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 850:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.89999999999999999e209Initial program 22.6%
Taylor expanded in B around 0 7.1%
Taylor expanded in F around -inf 83.6%
distribute-lft-in83.6%
associate-*r/83.6%
metadata-eval83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
if -2.89999999999999999e209 < F < -2.34999999999999995e-142Initial program 86.5%
Taylor expanded in F around -inf 84.6%
Taylor expanded in B around 0 70.6%
if -2.34999999999999995e-142 < F < 850Initial program 99.4%
Taylor expanded in B around 0 67.9%
Taylor expanded in B around 0 56.9%
if 850 < F Initial program 57.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 80.9%
Final simplification69.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.65e+208)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.2e-146)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F 0.025)
(/ (- (/ F (sqrt 2.0)) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e+208) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.2e-146) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= 0.025) {
tmp = ((F / sqrt(2.0)) - 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) :: tmp
if (f <= (-1.65d+208)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.2d-146)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= 0.025d0) then
tmp = ((f / sqrt(2.0d0)) - 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 tmp;
if (F <= -1.65e+208) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.2e-146) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= 0.025) {
tmp = ((F / Math.sqrt(2.0)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.65e+208: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.2e-146: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= 0.025: tmp = ((F / math.sqrt(2.0)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.65e+208) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.2e-146) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 0.025) tmp = Float64(Float64(Float64(F / sqrt(2.0)) - x) / 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 <= -1.65e+208) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.2e-146) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= 0.025) tmp = ((F / sqrt(2.0)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.65e+208], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-146], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.025], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -1.65 \cdot 10^{+208}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-146}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 0.025:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.65e208Initial program 22.6%
Taylor expanded in B around 0 7.1%
Taylor expanded in F around -inf 83.6%
distribute-lft-in83.6%
associate-*r/83.6%
metadata-eval83.6%
mul-1-neg83.6%
unsub-neg83.6%
Simplified83.6%
if -1.65e208 < F < -5.19999999999999974e-146Initial program 86.5%
Taylor expanded in F around -inf 84.6%
Taylor expanded in B around 0 70.6%
if -5.19999999999999974e-146 < F < 0.025000000000000001Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 56.6%
if 0.025000000000000001 < F Initial program 57.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 80.9%
Final simplification68.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.12e-123) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.95e-55) (/ x (- B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-123) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.95e-55) {
tmp = 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) :: tmp
if (f <= (-1.12d-123)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.95d-55) then
tmp = 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 tmp;
if (F <= -1.12e-123) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.95e-55) {
tmp = x / -B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.12e-123: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.95e-55: tmp = x / -B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.12e-123) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.95e-55) tmp = Float64(x / Float64(-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 <= -1.12e-123) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.95e-55) tmp = x / -B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.12e-123], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.95e-55], N[(x / (-B)), $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 -1.12 \cdot 10^{-123}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.11999999999999999e-123Initial program 68.1%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around -inf 64.7%
distribute-lft-in64.7%
associate-*r/64.7%
metadata-eval64.7%
mul-1-neg64.7%
unsub-neg64.7%
Simplified64.7%
if -1.11999999999999999e-123 < F < 1.95e-55Initial program 99.4%
Taylor expanded in B around 0 66.9%
Taylor expanded in x around inf 47.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified47.2%
if 1.95e-55 < F Initial program 63.5%
Taylor expanded in B around 0 45.1%
Taylor expanded in F around inf 72.4%
Final simplification60.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.6e-30) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 0.018) (/ (- (/ F (sqrt 2.0)) x) B) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.6e-30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.018) {
tmp = ((F / sqrt(2.0)) - 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) :: tmp
if (f <= (-1.6d-30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.018d0) then
tmp = ((f / sqrt(2.0d0)) - 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 tmp;
if (F <= -1.6e-30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.018) {
tmp = ((F / Math.sqrt(2.0)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.6e-30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.018: tmp = ((F / math.sqrt(2.0)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.6e-30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.018) tmp = Float64(Float64(Float64(F / sqrt(2.0)) - x) / 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 <= -1.6e-30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.018) tmp = ((F / sqrt(2.0)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.6e-30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.018], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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 -1.6 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.018:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.6e-30Initial program 60.5%
Taylor expanded in B around 0 35.1%
Taylor expanded in F around -inf 73.0%
distribute-lft-in73.0%
associate-*r/73.0%
metadata-eval73.0%
mul-1-neg73.0%
unsub-neg73.0%
Simplified73.0%
if -1.6e-30 < F < 0.0179999999999999986Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
sqrt-div99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.1%
Taylor expanded in B around 0 53.7%
if 0.0179999999999999986 < F Initial program 57.3%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around inf 80.9%
Final simplification66.1%
(FPCore (F B x) :precision binary64 (if (<= F -7.5e+18) (+ (/ -1.0 (sin B)) (/ x B)) (if (<= F 5.6e-55) (/ x (- B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e+18) {
tmp = (-1.0 / sin(B)) + (x / B);
} else if (F <= 5.6e-55) {
tmp = x / -B;
} else {
tmp = (1.0 / 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 <= (-7.5d+18)) then
tmp = ((-1.0d0) / sin(b)) + (x / b)
else if (f <= 5.6d-55) then
tmp = x / -b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e+18) {
tmp = (-1.0 / Math.sin(B)) + (x / B);
} else if (F <= 5.6e-55) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.5e+18: tmp = (-1.0 / math.sin(B)) + (x / B) elif F <= 5.6e-55: tmp = x / -B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.5e+18) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x / B)); elseif (F <= 5.6e-55) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.5e+18) tmp = (-1.0 / sin(B)) + (x / B); elseif (F <= 5.6e-55) tmp = x / -B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.5e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.6e-55], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.5e18Initial program 58.1%
Taylor expanded in B around 0 33.8%
Taylor expanded in F around -inf 58.2%
*-un-lft-identity58.2%
fma-define58.2%
add-sqr-sqrt36.5%
sqrt-unprod53.2%
sqr-neg53.2%
sqrt-unprod27.6%
add-sqr-sqrt51.5%
*-commutative51.5%
frac-2neg51.5%
metadata-eval51.5%
frac-times57.9%
*-un-lft-identity57.9%
Applied egg-rr57.9%
fma-undefine57.9%
*-lft-identity57.9%
distribute-lft-neg-in57.9%
distribute-frac-neg257.9%
distribute-frac-neg57.9%
remove-double-neg57.9%
distribute-rgt-neg-in57.9%
distribute-lft-neg-out57.9%
associate-/r*58.0%
*-inverses58.0%
distribute-frac-neg258.0%
distribute-neg-frac58.0%
metadata-eval58.0%
Simplified58.0%
if -7.5e18 < F < 5.59999999999999968e-55Initial program 99.4%
Taylor expanded in B around 0 65.5%
Taylor expanded in x around inf 43.9%
associate-*r/43.9%
neg-mul-143.9%
Simplified43.9%
if 5.59999999999999968e-55 < F Initial program 63.5%
Taylor expanded in B around 0 45.1%
Taylor expanded in B around 0 29.1%
Taylor expanded in F around inf 40.8%
Final simplification46.4%
(FPCore (F B x) :precision binary64 (if (<= F -1.12e-123) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 4.5e-55) (/ x (- B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-123) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.5e-55) {
tmp = x / -B;
} else {
tmp = (1.0 / 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 <= (-1.12d-123)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.5d-55) then
tmp = x / -b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-123) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.5e-55) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.12e-123: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.5e-55: tmp = x / -B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.12e-123) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.5e-55) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.12e-123) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.5e-55) tmp = x / -B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.12e-123], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-55], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.12 \cdot 10^{-123}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.11999999999999999e-123Initial program 68.1%
Taylor expanded in B around 0 39.8%
Taylor expanded in F around -inf 64.7%
distribute-lft-in64.7%
associate-*r/64.7%
metadata-eval64.7%
mul-1-neg64.7%
unsub-neg64.7%
Simplified64.7%
if -1.11999999999999999e-123 < F < 4.4999999999999997e-55Initial program 99.4%
Taylor expanded in B around 0 66.9%
Taylor expanded in x around inf 47.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified47.2%
if 4.4999999999999997e-55 < F Initial program 63.5%
Taylor expanded in B around 0 45.1%
Taylor expanded in B around 0 29.1%
Taylor expanded in F around inf 40.8%
Final simplification50.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- B))))
(if (<= F -2.5e+217)
t_0
(if (<= F -6.5e+21)
(/ -1.0 B)
(if (or (<= F 2.2e+16) (and (not (<= F 3.15e+94)) (<= F 1.35e+202)))
t_0
(/ (+ x 1.0) B))))))
double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (F <= -2.5e+217) {
tmp = t_0;
} else if (F <= -6.5e+21) {
tmp = -1.0 / B;
} else if ((F <= 2.2e+16) || (!(F <= 3.15e+94) && (F <= 1.35e+202))) {
tmp = t_0;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -b
if (f <= (-2.5d+217)) then
tmp = t_0
else if (f <= (-6.5d+21)) then
tmp = (-1.0d0) / b
else if ((f <= 2.2d+16) .or. (.not. (f <= 3.15d+94)) .and. (f <= 1.35d+202)) then
tmp = t_0
else
tmp = (x + 1.0d0) / 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 <= -2.5e+217) {
tmp = t_0;
} else if (F <= -6.5e+21) {
tmp = -1.0 / B;
} else if ((F <= 2.2e+16) || (!(F <= 3.15e+94) && (F <= 1.35e+202))) {
tmp = t_0;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / -B tmp = 0 if F <= -2.5e+217: tmp = t_0 elif F <= -6.5e+21: tmp = -1.0 / B elif (F <= 2.2e+16) or (not (F <= 3.15e+94) and (F <= 1.35e+202)): tmp = t_0 else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-B)) tmp = 0.0 if (F <= -2.5e+217) tmp = t_0; elseif (F <= -6.5e+21) tmp = Float64(-1.0 / B); elseif ((F <= 2.2e+16) || (!(F <= 3.15e+94) && (F <= 1.35e+202))) tmp = t_0; else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -B; tmp = 0.0; if (F <= -2.5e+217) tmp = t_0; elseif (F <= -6.5e+21) tmp = -1.0 / B; elseif ((F <= 2.2e+16) || (~((F <= 3.15e+94)) && (F <= 1.35e+202))) tmp = t_0; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-B)), $MachinePrecision]}, If[LessEqual[F, -2.5e+217], t$95$0, If[LessEqual[F, -6.5e+21], N[(-1.0 / B), $MachinePrecision], If[Or[LessEqual[F, 2.2e+16], And[N[Not[LessEqual[F, 3.15e+94]], $MachinePrecision], LessEqual[F, 1.35e+202]]], t$95$0, N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{+217}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+16} \lor \neg \left(F \leq 3.15 \cdot 10^{+94}\right) \land F \leq 1.35 \cdot 10^{+202}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -2.50000000000000021e217 or -6.5e21 < F < 2.2e16 or 3.15e94 < F < 1.34999999999999998e202Initial program 84.5%
Taylor expanded in B around 0 56.6%
Taylor expanded in x around inf 39.9%
associate-*r/39.9%
neg-mul-139.9%
Simplified39.9%
if -2.50000000000000021e217 < F < -6.5e21Initial program 76.0%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 47.3%
mul-1-neg47.3%
distribute-neg-frac247.3%
Simplified47.3%
Taylor expanded in x around 0 38.5%
if 2.2e16 < F < 3.15e94 or 1.34999999999999998e202 < F Initial program 49.9%
Taylor expanded in F around -inf 24.1%
Taylor expanded in B around 0 7.3%
mul-1-neg7.3%
distribute-neg-frac27.3%
Simplified7.3%
add-sqr-sqrt3.6%
sqrt-unprod11.1%
sqr-neg11.1%
sqrt-unprod17.0%
add-sqr-sqrt30.8%
*-un-lft-identity30.8%
Applied egg-rr30.8%
*-lft-identity30.8%
Simplified30.8%
Final simplification38.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -3.8e-42)
t_0
(if (<= F 8.2e+15)
(/ x (- B))
(if (or (<= F 1.6e+94) (not (<= F 6.5e+202))) (/ (+ x 1.0) B) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -3.8e-42) {
tmp = t_0;
} else if (F <= 8.2e+15) {
tmp = x / -B;
} else if ((F <= 1.6e+94) || !(F <= 6.5e+202)) {
tmp = (x + 1.0) / B;
} else {
tmp = 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 = ((-1.0d0) - x) / b
if (f <= (-3.8d-42)) then
tmp = t_0
else if (f <= 8.2d+15) then
tmp = x / -b
else if ((f <= 1.6d+94) .or. (.not. (f <= 6.5d+202))) then
tmp = (x + 1.0d0) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -3.8e-42) {
tmp = t_0;
} else if (F <= 8.2e+15) {
tmp = x / -B;
} else if ((F <= 1.6e+94) || !(F <= 6.5e+202)) {
tmp = (x + 1.0) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -3.8e-42: tmp = t_0 elif F <= 8.2e+15: tmp = x / -B elif (F <= 1.6e+94) or not (F <= 6.5e+202): tmp = (x + 1.0) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -3.8e-42) tmp = t_0; elseif (F <= 8.2e+15) tmp = Float64(x / Float64(-B)); elseif ((F <= 1.6e+94) || !(F <= 6.5e+202)) tmp = Float64(Float64(x + 1.0) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -3.8e-42) tmp = t_0; elseif (F <= 8.2e+15) tmp = x / -B; elseif ((F <= 1.6e+94) || ~((F <= 6.5e+202))) tmp = (x + 1.0) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -3.8e-42], t$95$0, If[LessEqual[F, 8.2e+15], N[(x / (-B)), $MachinePrecision], If[Or[LessEqual[F, 1.6e+94], N[Not[LessEqual[F, 6.5e+202]], $MachinePrecision]], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{-42}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+94} \lor \neg \left(F \leq 6.5 \cdot 10^{+202}\right):\\
\;\;\;\;\frac{x + 1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -3.80000000000000017e-42 or 1.60000000000000007e94 < F < 6.4999999999999996e202Initial program 62.9%
Taylor expanded in F around -inf 80.9%
Taylor expanded in B around 0 41.7%
mul-1-neg41.7%
distribute-neg-frac241.7%
Simplified41.7%
if -3.80000000000000017e-42 < F < 8.2e15Initial program 99.4%
Taylor expanded in B around 0 66.3%
Taylor expanded in x around inf 43.1%
associate-*r/43.1%
neg-mul-143.1%
Simplified43.1%
if 8.2e15 < F < 1.60000000000000007e94 or 6.4999999999999996e202 < F Initial program 49.9%
Taylor expanded in F around -inf 24.1%
Taylor expanded in B around 0 7.3%
mul-1-neg7.3%
distribute-neg-frac27.3%
Simplified7.3%
add-sqr-sqrt3.6%
sqrt-unprod11.1%
sqr-neg11.1%
sqrt-unprod17.0%
add-sqr-sqrt30.8%
*-un-lft-identity30.8%
Applied egg-rr30.8%
*-lft-identity30.8%
Simplified30.8%
Final simplification40.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.56e-38) (/ (- -1.0 x) B) (if (<= F 5.8e-55) (/ x (- B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.56e-38) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.8e-55) {
tmp = x / -B;
} else {
tmp = (1.0 / 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 <= (-1.56d-38)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 5.8d-55) then
tmp = x / -b
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.56e-38) {
tmp = (-1.0 - x) / B;
} else if (F <= 5.8e-55) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.56e-38: tmp = (-1.0 - x) / B elif F <= 5.8e-55: tmp = x / -B else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.56e-38) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 5.8e-55) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.56e-38) tmp = (-1.0 - x) / B; elseif (F <= 5.8e-55) tmp = x / -B; else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.56e-38], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 5.8e-55], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.56 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.56000000000000012e-38Initial program 62.2%
Taylor expanded in F around -inf 93.8%
Taylor expanded in B around 0 43.8%
mul-1-neg43.8%
distribute-neg-frac243.8%
Simplified43.8%
if -1.56000000000000012e-38 < F < 5.8e-55Initial program 99.5%
Taylor expanded in B around 0 65.5%
Taylor expanded in x around inf 45.6%
associate-*r/45.6%
neg-mul-145.6%
Simplified45.6%
if 5.8e-55 < F Initial program 63.5%
Taylor expanded in B around 0 45.1%
Taylor expanded in B around 0 29.1%
Taylor expanded in F around inf 40.8%
Final simplification43.6%
(FPCore (F B x) :precision binary64 (if (or (<= F -2.6e+218) (not (<= F -1.15e+20))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((F <= -2.6e+218) || !(F <= -1.15e+20)) {
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 <= (-2.6d+218)) .or. (.not. (f <= (-1.15d+20)))) 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 <= -2.6e+218) || !(F <= -1.15e+20)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (F <= -2.6e+218) or not (F <= -1.15e+20): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((F <= -2.6e+218) || !(F <= -1.15e+20)) tmp = Float64(x / Float64(-B)); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((F <= -2.6e+218) || ~((F <= -1.15e+20))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[F, -2.6e+218], N[Not[LessEqual[F, -1.15e+20]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.6 \cdot 10^{+218} \lor \neg \left(F \leq -1.15 \cdot 10^{+20}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if F < -2.60000000000000002e218 or -1.15e20 < F Initial program 78.3%
Taylor expanded in B around 0 51.9%
Taylor expanded in x around inf 34.2%
associate-*r/34.2%
neg-mul-134.2%
Simplified34.2%
if -2.60000000000000002e218 < F < -1.15e20Initial program 76.0%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 47.3%
mul-1-neg47.3%
distribute-neg-frac247.3%
Simplified47.3%
Taylor expanded in x around 0 38.5%
Final simplification34.9%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 77.9%
Taylor expanded in F around -inf 51.9%
Taylor expanded in B around 0 27.4%
mul-1-neg27.4%
distribute-neg-frac227.4%
Simplified27.4%
Taylor expanded in x around 0 10.1%
Final simplification10.1%
herbie shell --seed 2024085
(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))))))