
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e+53)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 50000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.9e+53) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 50000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e+53) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 50000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e+53], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{+53}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.89999999999999999e53Initial program 50.2%
Simplified64.0%
Taylor expanded in x around 0 64.1%
associate-*l/64.0%
*-lft-identity64.0%
+-commutative64.0%
unpow264.0%
fma-undefine64.0%
Simplified64.0%
Taylor expanded in F around -inf 99.8%
if -1.89999999999999999e53 < F < 5e7Initial program 98.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
if 5e7 < F Initial program 56.2%
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 -14000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 50000000.0)
(- (/ F (* (sin B) (sqrt (fma F F 2.0)))) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -14000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 50000000.0) {
tmp = (F / (sin(B) * sqrt(fma(F, F, 2.0)))) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -14000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 50000000.0) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(fma(F, F, 2.0)))) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -14000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -14000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.4e10Initial program 57.3%
Simplified70.2%
Taylor expanded in x around 0 70.3%
associate-*l/70.2%
*-lft-identity70.2%
+-commutative70.2%
unpow270.2%
fma-undefine70.2%
Simplified70.2%
Taylor expanded in F around -inf 99.8%
if -1.4e10 < F < 5e7Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/l/99.6%
Simplified99.6%
if 5e7 < F Initial program 56.2%
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 -2e+156)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 9200000000.0)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2e+156) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 9200000000.0) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2e+156) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 9200000000.0) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2e+156], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9200000000.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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2 \cdot 10^{+156}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 9200000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2e156Initial program 17.9%
Simplified32.2%
Taylor expanded in x around 0 32.2%
associate-*l/32.2%
*-lft-identity32.2%
+-commutative32.2%
unpow232.2%
fma-undefine32.2%
Simplified32.2%
Taylor expanded in F around -inf 99.8%
if -2e156 < F < 9.2e9Initial program 96.4%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
if 9.2e9 < F Initial program 56.2%
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 -2.5e+37)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 150000000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -2.5e+37) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 150000000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-2.5d+37)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 150000000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -2.5e+37) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 150000000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -2.5e+37: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 150000000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -2.5e+37) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 150000000.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(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -2.5e+37) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 150000000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e+37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 150000000.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[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{+37}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 150000000:\\
\;\;\;\;t\_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.49999999999999994e37Initial program 54.0%
Simplified68.0%
Taylor expanded in x around 0 68.0%
associate-*l/68.0%
*-lft-identity68.0%
+-commutative68.0%
unpow268.0%
fma-undefine68.0%
Simplified68.0%
Taylor expanded in F around -inf 99.8%
if -2.49999999999999994e37 < F < 1.5e8Initial program 99.4%
if 1.5e8 < F Initial program 56.2%
Taylor expanded in F around inf 99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -2.8e+44)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 920000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e+44) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 920000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.8d+44)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 920000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.8e+44) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 920000000.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 = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.8e+44: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 920000000.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 = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.8e+44) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 920000000.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(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.8e+44) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 920000000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.8e+44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 920000000.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[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.8 \cdot 10^{+44}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 920000000:\\
\;\;\;\;\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}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -2.8000000000000001e44Initial program 51.8%
Simplified66.4%
Taylor expanded in x around 0 66.4%
associate-*l/66.4%
*-lft-identity66.4%
+-commutative66.4%
unpow266.4%
fma-undefine66.4%
Simplified66.4%
Taylor expanded in F around -inf 99.8%
if -2.8000000000000001e44 < F < 9.2e8Initial program 99.4%
div-inv46.2%
clear-num46.2%
Applied egg-rr99.4%
if 9.2e8 < F Initial program 56.2%
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.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.35e-8)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (* F (/ (/ (- 1.0 (* (/ 1.0 F) (/ 1.0 F))) F) (sin B))) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.35e-8) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (F * (((1.0 - ((1.0 / F) * (1.0 / F))) / F) / sin(B))) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.35d-8) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (f * (((1.0d0 - ((1.0d0 / f) * (1.0d0 / f))) / f) / sin(b))) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.35e-8) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (F * (((1.0 - ((1.0 / F) * (1.0 / F))) / F) / Math.sin(B))) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.35e-8: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (F * (((1.0 - ((1.0 / F) * (1.0 / F))) / F) / math.sin(B))) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.35e-8) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(F * Float64(Float64(Float64(1.0 - Float64(Float64(1.0 / F) * Float64(1.0 / F))) / F) / sin(B))) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.35e-8) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (F * (((1.0 - ((1.0 / F) * (1.0 / F))) / F) / sin(B))) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.35e-8], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(N[(1.0 - N[(N[(1.0 / F), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-8}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1 - \frac{1}{F} \cdot \frac{1}{F}}{F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 59.0%
Simplified71.4%
Taylor expanded in x around 0 71.5%
associate-*l/71.4%
*-lft-identity71.4%
+-commutative71.4%
unpow271.4%
fma-undefine71.4%
Simplified71.4%
Taylor expanded in F around -inf 99.2%
if -1.3999999999999999 < F < 2.3499999999999999e-8Initial program 99.4%
Simplified99.7%
Taylor expanded in x around 0 99.7%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
if 2.3499999999999999e-8 < F Initial program 58.0%
Simplified72.3%
Taylor expanded in x around 0 72.2%
associate-*l/72.2%
*-lft-identity72.2%
+-commutative72.2%
unpow272.2%
fma-undefine72.2%
Simplified72.2%
Taylor expanded in F around inf 98.3%
inv-pow98.3%
unpow298.3%
unpow-prod-down98.3%
inv-pow98.3%
inv-pow98.3%
Applied egg-rr98.3%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B))))
(if (<= F -0.48)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.25e-126)
t_0
(if (<= F 9e-169)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 210000.0)
t_0
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -0.48) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.25e-126) {
tmp = t_0;
} else if (F <= 9e-169) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 210000.0) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
if (f <= (-0.48d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.25d-126)) then
tmp = t_0
else if (f <= 9d-169) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 210000.0d0) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double tmp;
if (F <= -0.48) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.25e-126) {
tmp = t_0;
} else if (F <= 9e-169) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 210000.0) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) tmp = 0 if F <= -0.48: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.25e-126: tmp = t_0 elif F <= 9e-169: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 210000.0: tmp = t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) tmp = 0.0 if (F <= -0.48) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.25e-126) tmp = t_0; elseif (F <= 9e-169) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 210000.0) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); tmp = 0.0; if (F <= -0.48) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.25e-126) tmp = t_0; elseif (F <= 9e-169) tmp = (x * cos(B)) / -sin(B); elseif (F <= 210000.0) tmp = t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-126], t$95$0, If[LessEqual[F, 9e-169], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 210000.0], t$95$0, N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.48:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-126}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-169}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 210000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.47999999999999998Initial program 59.6%
Simplified71.8%
Taylor expanded in x around 0 71.8%
associate-*l/71.8%
*-lft-identity71.8%
+-commutative71.8%
unpow271.8%
fma-undefine71.8%
Simplified71.8%
Taylor expanded in F around -inf 99.2%
if -0.47999999999999998 < F < -1.25000000000000001e-126 or 8.9999999999999997e-169 < F < 2.1e5Initial program 99.4%
Taylor expanded in B around 0 78.3%
if -1.25000000000000001e-126 < F < 8.9999999999999997e-169Initial program 99.5%
Taylor expanded in F around -inf 52.4%
Taylor expanded in x around inf 95.5%
if 2.1e5 < F Initial program 56.2%
Taylor expanded in F around inf 99.7%
Final simplification93.5%
(FPCore (F B x)
:precision binary64
(if (<= F -4.8e-41)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 1.48e-27)
(/ (* x (cos B)) (- (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-41) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 1.48e-27) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.8d-41)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 1.48d-27) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-41) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 1.48e-27) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-41: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 1.48e-27: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-41) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 1.48e-27) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.8e-41) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 1.48e-27) tmp = (x * cos(B)) / -sin(B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-41], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.48e-27], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-41}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 1.48 \cdot 10^{-27}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -4.80000000000000044e-41Initial program 62.1%
Simplified73.6%
Taylor expanded in x around 0 73.6%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
fma-undefine73.6%
Simplified73.6%
Taylor expanded in F around -inf 94.6%
if -4.80000000000000044e-41 < F < 1.48000000000000008e-27Initial program 99.5%
Taylor expanded in F around -inf 41.9%
Taylor expanded in x around inf 71.1%
if 1.48000000000000008e-27 < F Initial program 59.6%
Taylor expanded in F around inf 95.9%
Final simplification85.7%
(FPCore (F B x)
:precision binary64
(if (<= F -8.8e-69)
(- (/ -1.0 (sin B)) (/ 1.0 (/ (tan B) x)))
(if (<= F 1.25e-27)
(/ (* x (cos B)) (- (sin B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-69) {
tmp = (-1.0 / sin(B)) - (1.0 / (tan(B) / x));
} else if (F <= 1.25e-27) {
tmp = (x * cos(B)) / -sin(B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.8d-69)) then
tmp = ((-1.0d0) / sin(b)) - (1.0d0 / (tan(b) / x))
else if (f <= 1.25d-27) then
tmp = (x * cos(b)) / -sin(b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.8e-69) {
tmp = (-1.0 / Math.sin(B)) - (1.0 / (Math.tan(B) / x));
} else if (F <= 1.25e-27) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.8e-69: tmp = (-1.0 / math.sin(B)) - (1.0 / (math.tan(B) / x)) elif F <= 1.25e-27: tmp = (x * math.cos(B)) / -math.sin(B) else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.8e-69) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(1.0 / Float64(tan(B) / x))); elseif (F <= 1.25e-27) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.8e-69) tmp = (-1.0 / sin(B)) - (1.0 / (tan(B) / x)); elseif (F <= 1.25e-27) tmp = (x * cos(B)) / -sin(B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.8e-69], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-27], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.8 \cdot 10^{-69}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -8.8000000000000001e-69Initial program 63.9%
Taylor expanded in F around -inf 91.3%
div-inv92.5%
clear-num92.5%
Applied egg-rr92.5%
if -8.8000000000000001e-69 < F < 1.25e-27Initial program 99.5%
Taylor expanded in F around -inf 41.4%
Taylor expanded in x around inf 71.8%
if 1.25e-27 < F Initial program 59.6%
Taylor expanded in F around inf 95.9%
Final simplification85.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.5e-41)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45e-27)
(/ (* 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 <= -4.5e-41) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45e-27) {
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 <= (-4.5d-41)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d-27) 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 <= -4.5e-41) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45e-27) {
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 <= -4.5e-41: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45e-27: 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 <= -4.5e-41) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45e-27) tmp = Float64(Float64(x * cos(B)) / Float64(-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 <= -4.5e-41) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45e-27) 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, -4.5e-41], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45e-27], 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 -4.5 \cdot 10^{-41}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-27}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.5e-41Initial program 62.1%
Simplified73.6%
Taylor expanded in x around 0 73.6%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
fma-undefine73.6%
Simplified73.6%
Taylor expanded in F around -inf 94.6%
if -4.5e-41 < F < 1.45000000000000002e-27Initial program 99.5%
Taylor expanded in F around -inf 41.9%
Taylor expanded in x around inf 71.1%
if 1.45000000000000002e-27 < F Initial program 59.6%
Simplified73.3%
Taylor expanded in x around 0 73.3%
associate-*l/73.3%
*-lft-identity73.3%
+-commutative73.3%
unpow273.3%
fma-undefine73.3%
Simplified73.3%
Taylor expanded in F around inf 95.9%
Final simplification85.7%
(FPCore (F B x)
:precision binary64
(if (<= F -9600000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.00017)
(* x (/ (cos B) (- (sin B))))
(if (or (<= F 8e+245) (not (<= F 1.28e+278)))
(- (/ F (* F (sin B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.00017) {
tmp = x * (cos(B) / -sin(B));
} else if ((F <= 8e+245) || !(F <= 1.28e+278)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.00017d0) then
tmp = x * (cos(b) / -sin(b))
else if ((f <= 8d+245) .or. (.not. (f <= 1.28d+278))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.00017) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if ((F <= 8e+245) || !(F <= 1.28e+278)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9600000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.00017: tmp = x * (math.cos(B) / -math.sin(B)) elif (F <= 8e+245) or not (F <= 1.28e+278): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.00017) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif ((F <= 8e+245) || !(F <= 1.28e+278)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9600000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.00017) tmp = x * (cos(B) / -sin(B)); elseif ((F <= 8e+245) || ~((F <= 1.28e+278))) tmp = (F / (F * sin(B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00017], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 8e+245], N[Not[LessEqual[F, 1.28e+278]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9600000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.00017:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{+245} \lor \neg \left(F \leq 1.28 \cdot 10^{+278}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.6e6Initial program 57.9%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 86.1%
if -9.6e6 < F < 1.7e-4Initial program 99.4%
Taylor expanded in F around -inf 42.7%
Taylor expanded in x around inf 68.1%
mul-1-neg68.1%
associate-/l*67.9%
distribute-rgt-neg-in67.9%
distribute-frac-neg67.9%
Simplified67.9%
if 1.7e-4 < F < 8.00000000000000035e245 or 1.2800000000000001e278 < F Initial program 56.2%
Taylor expanded in F around inf 78.6%
un-div-inv78.7%
associate-/l/97.8%
Applied egg-rr97.8%
Taylor expanded in B around 0 86.8%
if 8.00000000000000035e245 < F < 1.2800000000000001e278Initial program 66.3%
Simplified66.6%
Taylor expanded in x around 0 66.6%
associate-*l/66.6%
*-lft-identity66.6%
+-commutative66.6%
unpow266.6%
fma-undefine66.6%
Simplified66.6%
Taylor expanded in F around inf 99.3%
Taylor expanded in B around 0 99.5%
unpow-199.5%
exp-to-pow99.5%
*-commutative99.5%
exp-prod99.5%
*-commutative99.5%
associate-*l*99.5%
metadata-eval99.5%
exp-to-pow99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
Final simplification78.7%
(FPCore (F B x)
:precision binary64
(if (<= F -9600000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.48)
(/ (cos B) (/ (sin B) (- x)))
(if (or (<= F 1.65e+246) (not (<= F 1.35e+284)))
(- (/ F (* F (sin B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.48) {
tmp = cos(B) / (sin(B) / -x);
} else if ((F <= 1.65e+246) || !(F <= 1.35e+284)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.48d0) then
tmp = cos(b) / (sin(b) / -x)
else if ((f <= 1.65d+246) .or. (.not. (f <= 1.35d+284))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.48) {
tmp = Math.cos(B) / (Math.sin(B) / -x);
} else if ((F <= 1.65e+246) || !(F <= 1.35e+284)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9600000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.48: tmp = math.cos(B) / (math.sin(B) / -x) elif (F <= 1.65e+246) or not (F <= 1.35e+284): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.48) tmp = Float64(cos(B) / Float64(sin(B) / Float64(-x))); elseif ((F <= 1.65e+246) || !(F <= 1.35e+284)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9600000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.48) tmp = cos(B) / (sin(B) / -x); elseif ((F <= 1.65e+246) || ~((F <= 1.35e+284))) tmp = (F / (F * sin(B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.48], N[(N[Cos[B], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / (-x)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.65e+246], N[Not[LessEqual[F, 1.35e+284]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9600000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.48:\\
\;\;\;\;\frac{\cos B}{\frac{\sin B}{-x}}\\
\mathbf{elif}\;F \leq 1.65 \cdot 10^{+246} \lor \neg \left(F \leq 1.35 \cdot 10^{+284}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.6e6Initial program 57.9%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 86.1%
if -9.6e6 < F < 0.47999999999999998Initial program 99.4%
Taylor expanded in F around -inf 42.7%
Taylor expanded in x around inf 68.1%
clear-num67.9%
inv-pow67.9%
associate-/r*67.9%
Applied egg-rr67.9%
unpow-167.9%
clear-num67.9%
Applied egg-rr67.9%
if 0.47999999999999998 < F < 1.65e246 or 1.35000000000000003e284 < F Initial program 56.2%
Taylor expanded in F around inf 78.6%
un-div-inv78.7%
associate-/l/97.8%
Applied egg-rr97.8%
Taylor expanded in B around 0 86.8%
if 1.65e246 < F < 1.35000000000000003e284Initial program 66.3%
Simplified66.6%
Taylor expanded in x around 0 66.6%
associate-*l/66.6%
*-lft-identity66.6%
+-commutative66.6%
unpow266.6%
fma-undefine66.6%
Simplified66.6%
Taylor expanded in F around inf 99.3%
Taylor expanded in B around 0 99.5%
unpow-199.5%
exp-to-pow99.5%
*-commutative99.5%
exp-prod99.5%
*-commutative99.5%
associate-*l*99.5%
metadata-eval99.5%
exp-to-pow99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
Final simplification78.7%
(FPCore (F B x)
:precision binary64
(if (<= F -9600000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 0.03)
(/ (* x (cos B)) (- (sin B)))
(if (or (<= F 2.05e+246) (not (<= F 1.5e+279)))
(- (/ F (* F (sin B))) (/ x B))
(- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 0.03) {
tmp = (x * cos(B)) / -sin(B);
} else if ((F <= 2.05e+246) || !(F <= 1.5e+279)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 0.03d0) then
tmp = (x * cos(b)) / -sin(b)
else if ((f <= 2.05d+246) .or. (.not. (f <= 1.5d+279))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 0.03) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if ((F <= 2.05e+246) || !(F <= 1.5e+279)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9600000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 0.03: tmp = (x * math.cos(B)) / -math.sin(B) elif (F <= 2.05e+246) or not (F <= 1.5e+279): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 0.03) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif ((F <= 2.05e+246) || !(F <= 1.5e+279)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9600000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 0.03) tmp = (x * cos(B)) / -sin(B); elseif ((F <= 2.05e+246) || ~((F <= 1.5e+279))) tmp = (F / (F * sin(B))) - (x / B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.03], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 2.05e+246], N[Not[LessEqual[F, 1.5e+279]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9600000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.03:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+246} \lor \neg \left(F \leq 1.5 \cdot 10^{+279}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.6e6Initial program 57.9%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 86.1%
if -9.6e6 < F < 0.029999999999999999Initial program 99.4%
Taylor expanded in F around -inf 42.7%
Taylor expanded in x around inf 68.1%
if 0.029999999999999999 < F < 2.04999999999999988e246 or 1.4999999999999999e279 < F Initial program 56.2%
Taylor expanded in F around inf 78.6%
un-div-inv78.7%
associate-/l/97.8%
Applied egg-rr97.8%
Taylor expanded in B around 0 86.8%
if 2.04999999999999988e246 < F < 1.4999999999999999e279Initial program 66.3%
Simplified66.6%
Taylor expanded in x around 0 66.6%
associate-*l/66.6%
*-lft-identity66.6%
+-commutative66.6%
unpow266.6%
fma-undefine66.6%
Simplified66.6%
Taylor expanded in F around inf 99.3%
Taylor expanded in B around 0 99.5%
unpow-199.5%
exp-to-pow99.5%
*-commutative99.5%
exp-prod99.5%
*-commutative99.5%
associate-*l*99.5%
metadata-eval99.5%
exp-to-pow99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
Final simplification78.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.5e-42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.92)
(/ (* x (cos B)) (- (sin B)))
(if (or (<= F 2.1e+246) (not (<= F 5.3e+283)))
(- (/ F (* F (sin B))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.5e-42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.92) {
tmp = (x * cos(B)) / -sin(B);
} else if ((F <= 2.1e+246) || !(F <= 5.3e+283)) {
tmp = (F / (F * sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-7.5d-42)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.92d0) then
tmp = (x * cos(b)) / -sin(b)
else if ((f <= 2.1d+246) .or. (.not. (f <= 5.3d+283))) then
tmp = (f / (f * sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -7.5e-42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.92) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if ((F <= 2.1e+246) || !(F <= 5.3e+283)) {
tmp = (F / (F * Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -7.5e-42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.92: tmp = (x * math.cos(B)) / -math.sin(B) elif (F <= 2.1e+246) or not (F <= 5.3e+283): tmp = (F / (F * math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -7.5e-42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.92) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif ((F <= 2.1e+246) || !(F <= 5.3e+283)) tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -7.5e-42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.92) tmp = (x * cos(B)) / -sin(B); elseif ((F <= 2.1e+246) || ~((F <= 5.3e+283))) tmp = (F / (F * sin(B))) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.5e-42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.92], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[Or[LessEqual[F, 2.1e+246], N[Not[LessEqual[F, 5.3e+283]], $MachinePrecision]], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -7.5 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.92:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{+246} \lor \neg \left(F \leq 5.3 \cdot 10^{+283}\right):\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -7.49999999999999972e-42Initial program 62.1%
Simplified73.6%
Taylor expanded in x around 0 73.6%
associate-*l/73.6%
*-lft-identity73.6%
+-commutative73.6%
unpow273.6%
fma-undefine73.6%
Simplified73.6%
Taylor expanded in F around -inf 94.6%
if -7.49999999999999972e-42 < F < 0.92000000000000004Initial program 99.5%
Taylor expanded in F around -inf 42.2%
Taylor expanded in x around inf 70.4%
if 0.92000000000000004 < F < 2.1e246 or 5.3e283 < F Initial program 56.2%
Taylor expanded in F around inf 78.6%
un-div-inv78.7%
associate-/l/97.8%
Applied egg-rr97.8%
Taylor expanded in B around 0 86.8%
if 2.1e246 < F < 5.3e283Initial program 66.3%
Simplified66.6%
Taylor expanded in x around 0 66.6%
associate-*l/66.6%
*-lft-identity66.6%
+-commutative66.6%
unpow266.6%
fma-undefine66.6%
Simplified66.6%
Taylor expanded in F around inf 99.3%
Taylor expanded in B around 0 99.5%
unpow-199.5%
exp-to-pow99.5%
*-commutative99.5%
exp-prod99.5%
*-commutative99.5%
associate-*l*99.5%
metadata-eval99.5%
exp-to-pow99.5%
Simplified99.5%
Taylor expanded in F around inf 99.5%
Final simplification82.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ 1.0 (tan B)))))
(if (<= F -1.05e+48)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -4.2e-166)
(- (/ -1.0 B) t_0)
(if (<= F -3.1e-235)
(/ (- (* (pow B 2.0) (* x (- -0.3333333333333333))) x) B)
(if (<= F 1.65)
(- (* (/ 1.0 F) (/ F B)) t_0)
(- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x * (1.0 / tan(B));
double tmp;
if (F <= -1.05e+48) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -4.2e-166) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.1e-235) {
tmp = ((pow(B, 2.0) * (x * -(-0.3333333333333333))) - x) / B;
} else if (F <= 1.65) {
tmp = ((1.0 / F) * (F / B)) - t_0;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * (1.0d0 / tan(b))
if (f <= (-1.05d+48)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-4.2d-166)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3.1d-235)) then
tmp = (((b ** 2.0d0) * (x * -(-0.3333333333333333d0))) - x) / b
else if (f <= 1.65d0) then
tmp = ((1.0d0 / f) * (f / b)) - t_0
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (1.0 / Math.tan(B));
double tmp;
if (F <= -1.05e+48) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -4.2e-166) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.1e-235) {
tmp = ((Math.pow(B, 2.0) * (x * -(-0.3333333333333333))) - x) / B;
} else if (F <= 1.65) {
tmp = ((1.0 / F) * (F / B)) - t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x * (1.0 / math.tan(B)) tmp = 0 if F <= -1.05e+48: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -4.2e-166: tmp = (-1.0 / B) - t_0 elif F <= -3.1e-235: tmp = ((math.pow(B, 2.0) * (x * -(-0.3333333333333333))) - x) / B elif F <= 1.65: tmp = ((1.0 / F) * (F / B)) - t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(1.0 / tan(B))) tmp = 0.0 if (F <= -1.05e+48) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -4.2e-166) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3.1e-235) tmp = Float64(Float64(Float64((B ^ 2.0) * Float64(x * Float64(-(-0.3333333333333333)))) - x) / B); elseif (F <= 1.65) tmp = Float64(Float64(Float64(1.0 / F) * Float64(F / B)) - t_0); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (1.0 / tan(B)); tmp = 0.0; if (F <= -1.05e+48) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -4.2e-166) tmp = (-1.0 / B) - t_0; elseif (F <= -3.1e-235) tmp = (((B ^ 2.0) * (x * -(-0.3333333333333333))) - x) / B; elseif (F <= 1.65) tmp = ((1.0 / F) * (F / B)) - t_0; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.05e+48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.2e-166], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.1e-235], N[(N[(N[(N[Power[B, 2.0], $MachinePrecision] * N[(x * (--0.3333333333333333)), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.65], N[(N[(N[(1.0 / F), $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{1}{\tan B}\\
\mathbf{if}\;F \leq -1.05 \cdot 10^{+48}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -3.1 \cdot 10^{-235}:\\
\;\;\;\;\frac{{B}^{2} \cdot \left(x \cdot \left(--0.3333333333333333\right)\right) - x}{B}\\
\mathbf{elif}\;F \leq 1.65:\\
\;\;\;\;\frac{1}{F} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.0499999999999999e48Initial program 51.0%
Taylor expanded in F around -inf 98.1%
Taylor expanded in B around 0 90.2%
if -1.0499999999999999e48 < F < -4.1999999999999999e-166Initial program 99.3%
Taylor expanded in F around -inf 56.8%
Taylor expanded in B around 0 55.3%
if -4.1999999999999999e-166 < F < -3.1e-235Initial program 99.7%
Taylor expanded in F around -inf 50.7%
Taylor expanded in x around inf 99.7%
Taylor expanded in B around 0 92.2%
distribute-rgt-out--92.2%
metadata-eval92.2%
Simplified92.2%
if -3.1e-235 < F < 1.6499999999999999Initial program 99.4%
Taylor expanded in F around inf 41.3%
Taylor expanded in B around 0 50.4%
if 1.6499999999999999 < F Initial program 57.4%
Taylor expanded in F around inf 78.6%
un-div-inv78.7%
associate-/l/98.0%
Applied egg-rr98.0%
Taylor expanded in B around 0 81.8%
Final simplification71.5%
(FPCore (F B x)
:precision binary64
(if (<= F -8.5e+46)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.2e-166)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -8e-245)
(/ x (- B))
(if (<= F 5.3e+51)
(- (/ 1.0 B) (/ x (tan B)))
(- (/ F (* F (sin B))) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e+46) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.2e-166) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -8e-245) {
tmp = x / -B;
} else if (F <= 5.3e+51) {
tmp = (1.0 / B) - (x / tan(B));
} else {
tmp = (F / (F * 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 <= (-8.5d+46)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.2d-166)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-8d-245)) then
tmp = x / -b
else if (f <= 5.3d+51) then
tmp = (1.0d0 / b) - (x / tan(b))
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e+46) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.2e-166) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -8e-245) {
tmp = x / -B;
} else if (F <= 5.3e+51) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e+46: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.2e-166: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -8e-245: tmp = x / -B elif F <= 5.3e+51: tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e+46) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.2e-166) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -8e-245) tmp = Float64(x / Float64(-B)); elseif (F <= 5.3e+51) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e+46) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.2e-166) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -8e-245) tmp = x / -B; elseif (F <= 5.3e+51) tmp = (1.0 / B) - (x / tan(B)); else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e+46], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.2e-166], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8e-245], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 5.3e+51], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{+46}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-166}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -8 \cdot 10^{-245}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 5.3 \cdot 10^{+51}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -8.4999999999999996e46Initial program 51.0%
Taylor expanded in F around -inf 98.1%
Taylor expanded in B around 0 90.2%
if -8.4999999999999996e46 < F < -6.19999999999999968e-166Initial program 99.3%
Taylor expanded in F around -inf 56.8%
Taylor expanded in B around 0 55.3%
if -6.19999999999999968e-166 < F < -7.9999999999999994e-245Initial program 99.7%
Taylor expanded in F around -inf 43.7%
Taylor expanded in B around 0 44.5%
mul-1-neg44.5%
distribute-neg-frac244.5%
Simplified44.5%
Taylor expanded in x around inf 86.2%
associate-*r/86.2%
neg-mul-186.2%
Simplified86.2%
if -7.9999999999999994e-245 < F < 5.2999999999999997e51Initial program 98.3%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around inf 33.0%
Taylor expanded in B around 0 33.1%
unpow-133.1%
exp-to-pow30.3%
*-commutative30.3%
exp-prod30.3%
*-commutative30.3%
associate-*l*30.3%
metadata-eval30.3%
exp-to-pow33.1%
Simplified33.1%
Taylor expanded in F around inf 54.2%
if 5.2999999999999997e51 < F Initial program 47.3%
Taylor expanded in F around inf 76.3%
un-div-inv76.4%
associate-/l/99.5%
Applied egg-rr99.5%
Taylor expanded in B around 0 83.8%
Final simplification71.2%
(FPCore (F B x)
:precision binary64
(if (<= F -8e+46)
(/ (- -1.0 x) B)
(if (or (<= F -5.1e-166) (not (<= F -1.25e-245)))
(- (/ 1.0 B) (/ x (tan B)))
(/ x (- B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8e+46) {
tmp = (-1.0 - x) / B;
} else if ((F <= -5.1e-166) || !(F <= -1.25e-245)) {
tmp = (1.0 / B) - (x / tan(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 <= (-8d+46)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= (-5.1d-166)) .or. (.not. (f <= (-1.25d-245)))) then
tmp = (1.0d0 / b) - (x / tan(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 <= -8e+46) {
tmp = (-1.0 - x) / B;
} else if ((F <= -5.1e-166) || !(F <= -1.25e-245)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8e+46: tmp = (-1.0 - x) / B elif (F <= -5.1e-166) or not (F <= -1.25e-245): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8e+46) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= -5.1e-166) || !(F <= -1.25e-245)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8e+46) tmp = (-1.0 - x) / B; elseif ((F <= -5.1e-166) || ~((F <= -1.25e-245))) tmp = (1.0 / B) - (x / tan(B)); else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8e+46], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, -5.1e-166], N[Not[LessEqual[F, -1.25e-245]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8 \cdot 10^{+46}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -5.1 \cdot 10^{-166} \lor \neg \left(F \leq -1.25 \cdot 10^{-245}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -7.9999999999999999e46Initial program 51.0%
Taylor expanded in F around -inf 98.1%
Taylor expanded in B around 0 67.9%
mul-1-neg67.9%
distribute-neg-frac267.9%
Simplified67.9%
if -7.9999999999999999e46 < F < -5.1000000000000002e-166 or -1.2499999999999999e-245 < F Initial program 82.6%
Simplified88.5%
Taylor expanded in x around 0 88.5%
associate-*l/88.5%
*-lft-identity88.5%
+-commutative88.5%
unpow288.5%
fma-undefine88.5%
Simplified88.5%
Taylor expanded in F around inf 53.0%
Taylor expanded in B around 0 45.0%
unpow-145.0%
exp-to-pow32.7%
*-commutative32.7%
exp-prod32.7%
*-commutative32.7%
associate-*l*32.7%
metadata-eval32.7%
exp-to-pow45.0%
Simplified45.0%
Taylor expanded in F around inf 56.0%
if -5.1000000000000002e-166 < F < -1.2499999999999999e-245Initial program 99.7%
Taylor expanded in F around -inf 43.7%
Taylor expanded in B around 0 44.5%
mul-1-neg44.5%
distribute-neg-frac244.5%
Simplified44.5%
Taylor expanded in x around inf 86.2%
associate-*r/86.2%
neg-mul-186.2%
Simplified86.2%
Final simplification60.4%
(FPCore (F B x)
:precision binary64
(if (<= F -9600000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (or (<= F -4.9e-166) (not (<= F -1.12e-243)))
(- (/ 1.0 B) (/ x (tan B)))
(/ x (- B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9600000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if ((F <= -4.9e-166) || !(F <= -1.12e-243)) {
tmp = (1.0 / B) - (x / tan(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 <= (-9600000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if ((f <= (-4.9d-166)) .or. (.not. (f <= (-1.12d-243)))) then
tmp = (1.0d0 / b) - (x / tan(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 <= -9600000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if ((F <= -4.9e-166) || !(F <= -1.12e-243)) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9600000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif (F <= -4.9e-166) or not (F <= -1.12e-243): tmp = (1.0 / B) - (x / math.tan(B)) else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9600000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif ((F <= -4.9e-166) || !(F <= -1.12e-243)) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9600000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif ((F <= -4.9e-166) || ~((F <= -1.12e-243))) tmp = (1.0 / B) - (x / tan(B)); else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9600000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, -4.9e-166], N[Not[LessEqual[F, -1.12e-243]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9600000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -4.9 \cdot 10^{-166} \lor \neg \left(F \leq -1.12 \cdot 10^{-243}\right):\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -9.6e6Initial program 57.9%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 86.1%
if -9.6e6 < F < -4.8999999999999999e-166 or -1.12000000000000005e-243 < F Initial program 81.6%
Simplified87.9%
Taylor expanded in x around 0 87.9%
associate-*l/87.9%
*-lft-identity87.9%
+-commutative87.9%
unpow287.9%
fma-undefine87.9%
Simplified87.9%
Taylor expanded in F around inf 53.1%
Taylor expanded in B around 0 44.6%
unpow-144.6%
exp-to-pow34.6%
*-commutative34.6%
exp-prod34.6%
*-commutative34.6%
associate-*l*34.6%
metadata-eval34.6%
exp-to-pow44.6%
Simplified44.6%
Taylor expanded in F around inf 56.2%
if -4.8999999999999999e-166 < F < -1.12000000000000005e-243Initial program 99.7%
Taylor expanded in F around -inf 43.7%
Taylor expanded in B around 0 44.5%
mul-1-neg44.5%
distribute-neg-frac244.5%
Simplified44.5%
Taylor expanded in x around inf 86.2%
associate-*r/86.2%
neg-mul-186.2%
Simplified86.2%
Final simplification66.0%
(FPCore (F B x)
:precision binary64
(if (<= F -5.4e+47)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.2e-166)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -6.4e-244) (/ x (- B)) (- (/ 1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e+47) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.2e-166) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -6.4e-244) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.4d+47)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.2d-166)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-6.4d-244)) then
tmp = x / -b
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.4e+47) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.2e-166) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -6.4e-244) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.4e+47: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.2e-166: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -6.4e-244: tmp = x / -B else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.4e+47) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.2e-166) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -6.4e-244) tmp = Float64(x / Float64(-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 <= -5.4e+47) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.2e-166) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -6.4e-244) tmp = x / -B; else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.4e+47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-166], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.4e-244], N[(x / (-B)), $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 -5.4 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-166}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-244}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.39999999999999991e47Initial program 51.0%
Taylor expanded in F around -inf 98.1%
Taylor expanded in B around 0 90.2%
if -5.39999999999999991e47 < F < -5.19999999999999979e-166Initial program 99.3%
Taylor expanded in F around -inf 56.8%
Taylor expanded in B around 0 55.3%
if -5.19999999999999979e-166 < F < -6.3999999999999996e-244Initial program 99.7%
Taylor expanded in F around -inf 43.7%
Taylor expanded in B around 0 44.5%
mul-1-neg44.5%
distribute-neg-frac244.5%
Simplified44.5%
Taylor expanded in x around inf 86.2%
associate-*r/86.2%
neg-mul-186.2%
Simplified86.2%
if -6.3999999999999996e-244 < F Initial program 76.7%
Simplified84.7%
Taylor expanded in x around 0 84.6%
associate-*l/84.7%
*-lft-identity84.7%
+-commutative84.7%
unpow284.7%
fma-undefine84.7%
Simplified84.7%
Taylor expanded in F around inf 61.0%
Taylor expanded in B around 0 45.7%
unpow-145.7%
exp-to-pow44.1%
*-commutative44.1%
exp-prod44.1%
*-commutative44.1%
associate-*l*44.1%
metadata-eval44.1%
exp-to-pow45.7%
Simplified45.7%
Taylor expanded in F around inf 57.9%
Final simplification66.5%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e-50) (/ (- -1.0 x) B) (if (<= F 66000.0) (/ x (- (sin B))) (/ 1.0 (/ B (+ x 1.0))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-50) {
tmp = (-1.0 - x) / B;
} else if (F <= 66000.0) {
tmp = x / -sin(B);
} else {
tmp = 1.0 / (B / (x + 1.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) :: tmp
if (f <= (-7.2d-50)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 66000.0d0) then
tmp = x / -sin(b)
else
tmp = 1.0d0 / (b / (x + 1.0d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-50) {
tmp = (-1.0 - x) / B;
} else if (F <= 66000.0) {
tmp = x / -Math.sin(B);
} else {
tmp = 1.0 / (B / (x + 1.0));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-50: tmp = (-1.0 - x) / B elif F <= 66000.0: tmp = x / -math.sin(B) else: tmp = 1.0 / (B / (x + 1.0)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-50) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 66000.0) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(1.0 / Float64(B / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-50) tmp = (-1.0 - x) / B; elseif (F <= 66000.0) tmp = x / -sin(B); else tmp = 1.0 / (B / (x + 1.0)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 66000.0], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(1.0 / N[(B / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 66000:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{B}{x + 1}}\\
\end{array}
\end{array}
if F < -7.19999999999999958e-50Initial program 63.0%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 58.2%
mul-1-neg58.2%
distribute-neg-frac258.2%
Simplified58.2%
if -7.19999999999999958e-50 < F < 66000Initial program 99.5%
Taylor expanded in F around -inf 41.2%
Taylor expanded in x around inf 69.4%
Taylor expanded in B around 0 41.9%
if 66000 < F Initial program 56.2%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 17.9%
mul-1-neg17.9%
distribute-neg-frac217.9%
Simplified17.9%
clear-num17.9%
inv-pow17.9%
add-sqr-sqrt10.1%
sqrt-unprod14.8%
sqr-neg14.8%
sqrt-unprod15.1%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
unpow-133.7%
Simplified33.7%
Final simplification44.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.7e-54) (/ (- -1.0 x) B) (if (<= F 2.35e-8) (/ x (- B)) (/ 1.0 (/ B (+ x 1.0))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.35e-8) {
tmp = x / -B;
} else {
tmp = 1.0 / (B / (x + 1.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) :: tmp
if (f <= (-1.7d-54)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.35d-8) then
tmp = x / -b
else
tmp = 1.0d0 / (b / (x + 1.0d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.35e-8) {
tmp = x / -B;
} else {
tmp = 1.0 / (B / (x + 1.0));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-54: tmp = (-1.0 - x) / B elif F <= 2.35e-8: tmp = x / -B else: tmp = 1.0 / (B / (x + 1.0)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.35e-8) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / Float64(B / Float64(x + 1.0))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-54) tmp = (-1.0 - x) / B; elseif (F <= 2.35e-8) tmp = x / -B; else tmp = 1.0 / (B / (x + 1.0)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.35e-8], N[(x / (-B)), $MachinePrecision], N[(1.0 / N[(B / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{B}{x + 1}}\\
\end{array}
\end{array}
if F < -1.69999999999999994e-54Initial program 63.5%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 57.5%
mul-1-neg57.5%
distribute-neg-frac257.5%
Simplified57.5%
if -1.69999999999999994e-54 < F < 2.3499999999999999e-8Initial program 99.5%
Taylor expanded in F around -inf 40.8%
Taylor expanded in B around 0 24.8%
mul-1-neg24.8%
distribute-neg-frac224.8%
Simplified24.8%
Taylor expanded in x around inf 41.6%
associate-*r/41.6%
neg-mul-141.6%
Simplified41.6%
if 2.3499999999999999e-8 < F Initial program 58.0%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 17.3%
mul-1-neg17.3%
distribute-neg-frac217.3%
Simplified17.3%
clear-num17.2%
inv-pow17.2%
add-sqr-sqrt9.7%
sqrt-unprod14.3%
sqr-neg14.3%
sqrt-unprod14.6%
add-sqr-sqrt32.5%
Applied egg-rr32.5%
unpow-132.5%
Simplified32.5%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.02e-10) (/ -1.0 B) (if (<= F 2.35e-8) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.02e-10) {
tmp = -1.0 / B;
} else if (F <= 2.35e-8) {
tmp = x / -B;
} 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) :: tmp
if (f <= (-1.02d-10)) then
tmp = (-1.0d0) / b
else if (f <= 2.35d-8) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.02e-10) {
tmp = -1.0 / B;
} else if (F <= 2.35e-8) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.02e-10: tmp = -1.0 / B elif F <= 2.35e-8: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.02e-10) tmp = Float64(-1.0 / B); elseif (F <= 2.35e-8) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.02e-10) tmp = -1.0 / B; elseif (F <= 2.35e-8) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.02e-10], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 2.35e-8], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.02 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -1.01999999999999997e-10Initial program 60.1%
Taylor expanded in F around -inf 96.6%
Taylor expanded in B around 0 59.7%
mul-1-neg59.7%
distribute-neg-frac259.7%
Simplified59.7%
Taylor expanded in x around 0 40.2%
if -1.01999999999999997e-10 < F < 2.3499999999999999e-8Initial program 99.4%
Taylor expanded in F around -inf 41.2%
Taylor expanded in B around 0 25.4%
mul-1-neg25.4%
distribute-neg-frac225.4%
Simplified25.4%
Taylor expanded in x around inf 40.9%
associate-*r/40.9%
neg-mul-140.9%
Simplified40.9%
if 2.3499999999999999e-8 < F Initial program 58.0%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 17.3%
mul-1-neg17.3%
distribute-neg-frac217.3%
Simplified17.3%
add-sqr-sqrt9.7%
sqrt-unprod14.4%
sqr-neg14.4%
sqrt-unprod14.6%
add-sqr-sqrt32.5%
*-un-lft-identity32.5%
Applied egg-rr32.5%
*-lft-identity32.5%
Simplified32.5%
Final simplification38.3%
(FPCore (F B x) :precision binary64 (if (<= F -5e-54) (/ (- -1.0 x) B) (if (<= F 2.35e-8) (/ x (- B)) (/ (+ x 1.0) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.35e-8) {
tmp = x / -B;
} 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) :: tmp
if (f <= (-5d-54)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.35d-8) then
tmp = x / -b
else
tmp = (x + 1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e-54) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.35e-8) {
tmp = x / -B;
} else {
tmp = (x + 1.0) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e-54: tmp = (-1.0 - x) / B elif F <= 2.35e-8: tmp = x / -B else: tmp = (x + 1.0) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e-54) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.35e-8) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(x + 1.0) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e-54) tmp = (-1.0 - x) / B; elseif (F <= 2.35e-8) tmp = x / -B; else tmp = (x + 1.0) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.35e-8], N[(x / (-B)), $MachinePrecision], N[(N[(x + 1.0), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.35 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + 1}{B}\\
\end{array}
\end{array}
if F < -5.00000000000000015e-54Initial program 63.5%
Taylor expanded in F around -inf 92.3%
Taylor expanded in B around 0 57.5%
mul-1-neg57.5%
distribute-neg-frac257.5%
Simplified57.5%
if -5.00000000000000015e-54 < F < 2.3499999999999999e-8Initial program 99.5%
Taylor expanded in F around -inf 40.8%
Taylor expanded in B around 0 24.8%
mul-1-neg24.8%
distribute-neg-frac224.8%
Simplified24.8%
Taylor expanded in x around inf 41.6%
associate-*r/41.6%
neg-mul-141.6%
Simplified41.6%
if 2.3499999999999999e-8 < F Initial program 58.0%
Taylor expanded in F around -inf 34.1%
Taylor expanded in B around 0 17.3%
mul-1-neg17.3%
distribute-neg-frac217.3%
Simplified17.3%
add-sqr-sqrt9.7%
sqrt-unprod14.4%
sqr-neg14.4%
sqrt-unprod14.6%
add-sqr-sqrt32.5%
*-un-lft-identity32.5%
Applied egg-rr32.5%
*-lft-identity32.5%
Simplified32.5%
Final simplification44.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -1.3e-92) (not (<= x 8.3e-88))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -1.3e-92) || !(x <= 8.3e-88)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-1.3d-92)) .or. (.not. (x <= 8.3d-88))) then
tmp = x / -b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -1.3e-92) || !(x <= 8.3e-88)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -1.3e-92) or not (x <= 8.3e-88): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -1.3e-92) || !(x <= 8.3e-88)) 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 ((x <= -1.3e-92) || ~((x <= 8.3e-88))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -1.3e-92], N[Not[LessEqual[x, 8.3e-88]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-92} \lor \neg \left(x \leq 8.3 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -1.3e-92 or 8.3e-88 < x Initial program 81.7%
Taylor expanded in F around -inf 73.2%
Taylor expanded in B around 0 40.5%
mul-1-neg40.5%
distribute-neg-frac240.5%
Simplified40.5%
Taylor expanded in x around inf 46.5%
associate-*r/46.5%
neg-mul-146.5%
Simplified46.5%
if -1.3e-92 < x < 8.3e-88Initial program 69.1%
Taylor expanded in F around -inf 32.8%
Taylor expanded in B around 0 23.7%
mul-1-neg23.7%
distribute-neg-frac223.7%
Simplified23.7%
Taylor expanded in x around 0 23.7%
Final simplification36.4%
(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 76.1%
Taylor expanded in F around -inf 55.2%
Taylor expanded in B around 0 33.0%
mul-1-neg33.0%
distribute-neg-frac233.0%
Simplified33.0%
Taylor expanded in x around 0 14.1%
Final simplification14.1%
herbie shell --seed 2024080
(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))))))