
(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
(if (<= F -2e+20)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 2.2e+37)
(- (/ (pow (fma 2.0 x (fma F F 2.0)) -0.5) (/ (sin B) F)) (/ x (tan B)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e+20) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 2.2e+37) {
tmp = (pow(fma(2.0, x, fma(F, F, 2.0)), -0.5) / (sin(B) / F)) - (x / tan(B));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2e+20) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 2.2e+37) tmp = Float64(Float64((fma(2.0, x, fma(F, F, 2.0)) ^ -0.5) / Float64(sin(B) / F)) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2e+20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e+37], N[(N[(N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2 \cdot 10^{+20}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+37}:\\
\;\;\;\;\frac{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\frac{\sin B}{F}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2e20Initial program 48.6%
Simplified64.0%
Taylor expanded in F around -inf 99.8%
distribute-lft-in99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l*99.8%
Simplified99.8%
if -2e20 < F < 2.2000000000000001e37Initial program 99.4%
Simplified99.6%
associate-*r/99.6%
associate-*l/99.6%
*-commutative99.6%
clear-num99.6%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
if 2.2000000000000001e37 < F Initial program 46.1%
Simplified64.0%
Taylor expanded in x around 0 64.0%
associate-*l/64.0%
*-lft-identity64.0%
+-commutative64.0%
unpow264.0%
fma-undefine64.0%
Simplified64.0%
Taylor expanded in F around inf 99.9%
div-sub99.9%
Simplified99.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1e+16)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 85000000.0)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) (/ x (tan B)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1e+16) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 85000000.0) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - (x / tan(B));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -1e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 85000000.0) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -1e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 85000000.0], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 85000000:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1e16Initial program 49.2%
Simplified64.5%
Taylor expanded in F around -inf 99.8%
distribute-lft-in99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l*99.8%
Simplified99.8%
if -1e16 < F < 8.5e7Initial 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%
if 8.5e7 < F Initial program 52.2%
Simplified68.1%
Taylor expanded in x around 0 68.1%
associate-*l/68.1%
*-lft-identity68.1%
+-commutative68.1%
unpow268.1%
fma-undefine68.1%
Simplified68.1%
Taylor expanded in F around inf 99.9%
div-sub99.9%
Simplified99.9%
(FPCore (F B x)
:precision binary64
(if (<= F -9e+15)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 115000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ 1.0 (/ (sin B) F)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e+15) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 115000000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((1.0 / (sin(B) / F)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 - (x * cos(B))) / 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 <= (-9d+15)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 115000000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((1.0d0 / (sin(b) / f)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e+15) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 115000000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((1.0 / (Math.sin(B) / F)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e+15: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 115000000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((1.0 / (math.sin(B) / F)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e+15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 115000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(1.0 / Float64(sin(B) / F)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e+15) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 115000000.0) tmp = (-1.0 / (tan(B) / x)) + ((1.0 / (sin(B) / F)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 115000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $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[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 115000000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{1}{\frac{\sin B}{F}} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -9e15Initial program 49.2%
Simplified64.5%
Taylor expanded in F around -inf 99.8%
distribute-lft-in99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l*99.8%
Simplified99.8%
if -9e15 < F < 1.15e8Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
if 1.15e8 < F Initial program 52.2%
Simplified68.1%
Taylor expanded in x around 0 68.1%
associate-*l/68.1%
*-lft-identity68.1%
+-commutative68.1%
unpow268.1%
fma-undefine68.1%
Simplified68.1%
Taylor expanded in F around inf 99.9%
div-sub99.9%
Simplified99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.16e+14)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 85000000.0)
(+
(/ -1.0 (* (tan B) (/ 1.0 x)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B))))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.16e+14) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 85000000.0) {
tmp = (-1.0 / (tan(B) * (1.0 / x))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B)));
} else {
tmp = (1.0 - (x * cos(B))) / 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 <= (-1.16d+14)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 85000000.0d0) then
tmp = ((-1.0d0) / (tan(b) * (1.0d0 / x))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b)))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.16e+14) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 85000000.0) {
tmp = (-1.0 / (Math.tan(B) * (1.0 / x))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B)));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.16e+14: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 85000000.0: tmp = (-1.0 / (math.tan(B) * (1.0 / x))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.16e+14) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 85000000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) * Float64(1.0 / x))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B)))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.16e+14) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 85000000.0) tmp = (-1.0 / (tan(B) * (1.0 / x))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.16e+14], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 85000000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.16 \cdot 10^{+14}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 85000000:\\
\;\;\;\;\frac{-1}{\tan B \cdot \frac{1}{x}} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.16e14Initial program 49.9%
Simplified64.9%
Taylor expanded in F around -inf 99.8%
distribute-lft-in99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l*99.9%
Simplified99.9%
if -1.16e14 < F < 8.5e7Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.4%
un-div-inv99.4%
Applied egg-rr99.4%
div-inv99.4%
Applied egg-rr99.4%
if 8.5e7 < F Initial program 52.2%
Simplified68.1%
Taylor expanded in x around 0 68.1%
associate-*l/68.1%
*-lft-identity68.1%
+-commutative68.1%
unpow268.1%
fma-undefine68.1%
Simplified68.1%
Taylor expanded in F around inf 99.9%
div-sub99.9%
Simplified99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -9e+15)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 115000000.0)
(+
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B)))
(* x (/ -1.0 (tan B))))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9e+15) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 115000000.0) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 - (x * cos(B))) / 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 <= (-9d+15)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 115000000.0d0) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9e+15) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 115000000.0) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9e+15: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 115000000.0: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9e+15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 115000000.0) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9e+15) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 115000000.0) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) + (x * (-1.0 / tan(B))); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 115000000.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 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 115000000:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -9e15Initial program 49.2%
Simplified64.5%
Taylor expanded in F around -inf 99.8%
distribute-lft-in99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l*99.8%
Simplified99.8%
if -9e15 < F < 1.15e8Initial program 99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
if 1.15e8 < F Initial program 52.2%
Simplified68.1%
Taylor expanded in x around 0 68.1%
associate-*l/68.1%
*-lft-identity68.1%
+-commutative68.1%
unpow268.1%
fma-undefine68.1%
Simplified68.1%
Taylor expanded in F around inf 99.9%
div-sub99.9%
Simplified99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.5)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F 1.45)
(- (/ (* F (sqrt 0.5)) (sin B)) (/ x (tan B)))
(/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= 1.45) {
tmp = ((F * sqrt(0.5)) / sin(B)) - (x / tan(B));
} else {
tmp = (1.0 - (x * cos(B))) / 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 <= (-1.5d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= 1.45d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - (x / tan(b))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= 1.45) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - (x / Math.tan(B));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= 1.45: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - (x / math.tan(B)) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= 1.45) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - Float64(x / tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= 1.45) tmp = ((F * sqrt(0.5)) / sin(B)) - (x / tan(B)); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -1.5Initial program 51.9%
Simplified66.3%
Taylor expanded in F around -inf 99.7%
distribute-lft-in99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-*r/99.7%
metadata-eval99.7%
associate-/l*99.8%
Simplified99.8%
if -1.5 < F < 1.44999999999999996Initial 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 0 98.9%
if 1.44999999999999996 < F Initial program 53.5%
Simplified68.9%
Taylor expanded in x around 0 69.0%
associate-*l/68.9%
*-lft-identity68.9%
+-commutative68.9%
unpow268.9%
fma-undefine68.9%
Simplified68.9%
Taylor expanded in F around inf 98.7%
div-sub98.7%
Simplified98.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B)))
(/ x B))))
(if (<= F -27000000000000.0)
(- (/ -1.0 (sin B)) (* x (/ (cos B) (sin B))))
(if (<= F -4.9e-144)
t_0
(if (<= F 5.5e-125)
(- (* F (* (sqrt 0.5) (/ 1.0 B))) (/ x (tan B)))
(if (<= F 35000000.0) t_0 (/ (- 1.0 (* x (cos B))) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) - (x / B);
double tmp;
if (F <= -27000000000000.0) {
tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B)));
} else if (F <= -4.9e-144) {
tmp = t_0;
} else if (F <= 5.5e-125) {
tmp = (F * (sqrt(0.5) * (1.0 / B))) - (x / tan(B));
} else if (F <= 35000000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / 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 = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) - (x / b)
if (f <= (-27000000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x * (cos(b) / sin(b)))
else if (f <= (-4.9d-144)) then
tmp = t_0
else if (f <= 5.5d-125) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / b))) - (x / tan(b))
else if (f <= 35000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) - (x / B);
double tmp;
if (F <= -27000000000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x * (Math.cos(B) / Math.sin(B)));
} else if (F <= -4.9e-144) {
tmp = t_0;
} else if (F <= 5.5e-125) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / B))) - (x / Math.tan(B));
} else if (F <= 35000000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) - (x / B) tmp = 0 if F <= -27000000000000.0: tmp = (-1.0 / math.sin(B)) - (x * (math.cos(B) / math.sin(B))) elif F <= -4.9e-144: tmp = t_0 elif F <= 5.5e-125: tmp = (F * (math.sqrt(0.5) * (1.0 / B))) - (x / math.tan(B)) elif F <= 35000000.0: tmp = t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) - Float64(x / B)) tmp = 0.0 if (F <= -27000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(cos(B) / sin(B)))); elseif (F <= -4.9e-144) tmp = t_0; elseif (F <= 5.5e-125) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / B))) - Float64(x / tan(B))); elseif (F <= 35000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) - (x / B); tmp = 0.0; if (F <= -27000000000000.0) tmp = (-1.0 / sin(B)) - (x * (cos(B) / sin(B))); elseif (F <= -4.9e-144) tmp = t_0; elseif (F <= 5.5e-125) tmp = (F * (sqrt(0.5) * (1.0 / B))) - (x / tan(B)); elseif (F <= 35000000.0) tmp = t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$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 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -27000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.9e-144], t$95$0, If[LessEqual[F, 5.5e-125], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 35000000.0], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -27000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{\cos B}{\sin B}\\
\mathbf{elif}\;F \leq -4.9 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-125}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 35000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.7e13Initial program 49.9%
Simplified64.9%
Taylor expanded in F around -inf 99.8%
distribute-lft-in99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-*r/99.8%
metadata-eval99.8%
associate-/l*99.9%
Simplified99.9%
if -2.7e13 < F < -4.9000000000000001e-144 or 5.4999999999999997e-125 < F < 3.5e7Initial program 99.4%
Taylor expanded in B around 0 89.1%
associate-*r/89.1%
neg-mul-189.1%
Simplified89.1%
if -4.9000000000000001e-144 < F < 5.4999999999999997e-125Initial program 99.5%
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 B around 0 95.2%
*-commutative95.2%
+-commutative95.2%
unpow295.2%
fma-undefine95.2%
Simplified95.2%
Taylor expanded in F around 0 95.2%
if 3.5e7 < F Initial program 52.2%
Simplified68.1%
Taylor expanded in x around 0 68.1%
associate-*l/68.1%
*-lft-identity68.1%
+-commutative68.1%
unpow268.1%
fma-undefine68.1%
Simplified68.1%
Taylor expanded in F around inf 99.9%
div-sub99.9%
Simplified99.9%
Final simplification96.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F (sin B)))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -27000000000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.6e-144)
t_0
(if (<= F 1.35e-127)
(- (* F (* (sqrt 0.5) (/ 1.0 B))) t_1)
(if (<= F 33000000.0) t_0 (/ (- 1.0 (* x (cos B))) (sin B))))))))
double code(double F, double B, double x) {
double t_0 = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / sin(B))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -27000000000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.6e-144) {
tmp = t_0;
} else if (F <= 1.35e-127) {
tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_1;
} else if (F <= 33000000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / sin(b))) - (x / b)
t_1 = x / tan(b)
if (f <= (-27000000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-5.6d-144)) then
tmp = t_0
else if (f <= 1.35d-127) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / b))) - t_1
else if (f <= 33000000.0d0) then
tmp = t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / Math.sin(B))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -27000000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -5.6e-144) {
tmp = t_0;
} else if (F <= 1.35e-127) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / B))) - t_1;
} else if (F <= 33000000.0) {
tmp = t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / math.sin(B))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -27000000000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -5.6e-144: tmp = t_0 elif F <= 1.35e-127: tmp = (F * (math.sqrt(0.5) * (1.0 / B))) - t_1 elif F <= 33000000.0: tmp = t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / sin(B))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -27000000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.6e-144) tmp = t_0; elseif (F <= 1.35e-127) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / B))) - t_1); elseif (F <= 33000000.0) tmp = t_0; else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / sin(B))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -27000000000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -5.6e-144) tmp = t_0; elseif (F <= 1.35e-127) tmp = (F * (sqrt(0.5) * (1.0 / B))) - t_1; elseif (F <= 33000000.0) tmp = t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$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 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -27000000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.6e-144], t$95$0, If[LessEqual[F, 1.35e-127], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 33000000.0], t$95$0, N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -27000000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -5.6 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-127}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t\_1\\
\mathbf{elif}\;F \leq 33000000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.7e13Initial program 49.9%
Simplified64.9%
Taylor expanded in F around -inf 99.8%
if -2.7e13 < F < -5.59999999999999995e-144 or 1.35e-127 < F < 3.3e7Initial program 99.4%
Taylor expanded in B around 0 89.1%
associate-*r/89.1%
neg-mul-189.1%
Simplified89.1%
if -5.59999999999999995e-144 < F < 1.35e-127Initial program 99.5%
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 B around 0 95.2%
*-commutative95.2%
+-commutative95.2%
unpow295.2%
fma-undefine95.2%
Simplified95.2%
Taylor expanded in F around 0 95.2%
if 3.3e7 < F Initial program 52.2%
Simplified68.1%
Taylor expanded in x around 0 68.1%
associate-*l/68.1%
*-lft-identity68.1%
+-commutative68.1%
unpow268.1%
fma-undefine68.1%
Simplified68.1%
Taylor expanded in F around inf 99.9%
div-sub99.9%
Simplified99.9%
Final simplification96.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.055)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.31)
(- (* F (/ (sqrt 0.5) B)) t_0)
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.055) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.31) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.055d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.31d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.055) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.31) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.055: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.31: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.055) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.31) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.055) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.31) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.055], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.31], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.055:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.31:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -0.0550000000000000003Initial program 52.5%
Simplified66.7%
Taylor expanded in F around -inf 98.6%
if -0.0550000000000000003 < F < 0.309999999999999998Initial 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 B around 0 81.6%
*-commutative81.6%
+-commutative81.6%
unpow281.6%
fma-undefine81.6%
Simplified81.6%
Taylor expanded in F around 0 81.5%
associate-/l*81.6%
Simplified81.6%
if 0.309999999999999998 < F Initial program 53.5%
Simplified68.9%
Taylor expanded in x around 0 69.0%
associate-*l/68.9%
*-lft-identity68.9%
+-commutative68.9%
unpow268.9%
fma-undefine68.9%
Simplified68.9%
Taylor expanded in F around inf 98.7%
div-sub98.7%
Simplified98.7%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-87) (- (/ -1.0 (sin B)) (/ x (tan B))) (if (<= F 3.1e-53) (/ x (- (tan B))) (/ (- 1.0 (* x (cos B))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3.1e-53) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - (x * cos(B))) / 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 <= (-3.6d-87)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3.1d-53) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3.1e-53) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-87: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3.1e-53: tmp = x / -math.tan(B) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-87) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3.1e-53) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-87) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3.1e-53) tmp = x / -tan(B); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-87], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.1e-53], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
if -3.59999999999999993e-87 < F < 3.10000000000000015e-53Initial program 99.5%
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 76.7%
associate-*r/76.6%
*-commutative76.6%
neg-mul-176.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
*-commutative76.6%
add-sqr-sqrt22.7%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod1.2%
add-sqr-sqrt2.1%
clear-num2.1%
tan-quot2.1%
div-inv2.1%
frac-2neg2.1%
neg-sub02.1%
div-sub2.1%
add-sqr-sqrt1.2%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod22.8%
add-sqr-sqrt76.7%
frac-2neg76.7%
Applied egg-rr76.7%
div076.7%
neg-sub076.7%
distribute-neg-frac76.7%
Simplified76.7%
if 3.10000000000000015e-53 < F Initial program 59.1%
Simplified72.7%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
Taylor expanded in F around inf 92.2%
div-sub92.2%
Simplified92.2%
Final simplification84.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.6e-87)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.7e-53) (/ x (- (tan 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 <= -3.6e-87) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.7e-53) {
tmp = x / -tan(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 <= (-3.6d-87)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.7d-53) then
tmp = x / -tan(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 <= -3.6e-87) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.7e-53) {
tmp = x / -Math.tan(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 <= -3.6e-87: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.7e-53: tmp = x / -math.tan(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 <= -3.6e-87) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.7e-53) tmp = Float64(x / Float64(-tan(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 <= -3.6e-87) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.7e-53) tmp = x / -tan(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, -3.6e-87], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.7e-53], N[(x / (-N[Tan[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 -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
if -3.59999999999999993e-87 < F < 3.69999999999999982e-53Initial program 99.5%
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 76.7%
associate-*r/76.6%
*-commutative76.6%
neg-mul-176.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
*-commutative76.6%
add-sqr-sqrt22.7%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod1.2%
add-sqr-sqrt2.1%
clear-num2.1%
tan-quot2.1%
div-inv2.1%
frac-2neg2.1%
neg-sub02.1%
div-sub2.1%
add-sqr-sqrt1.2%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod22.8%
add-sqr-sqrt76.7%
frac-2neg76.7%
Applied egg-rr76.7%
div076.7%
neg-sub076.7%
distribute-neg-frac76.7%
Simplified76.7%
if 3.69999999999999982e-53 < F Initial program 59.1%
Simplified72.7%
Taylor expanded in F around inf 92.1%
Final simplification84.0%
(FPCore (F B x)
:precision binary64
(if (<= F -3.6e-87)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 3.7e-53)
(/ x (- (tan B)))
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 3.7e-53) {
tmp = x / -tan(B);
} else {
tmp = (F * ((1.0 / 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 <= (-3.6d-87)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 3.7d-53) then
tmp = x / -tan(b)
else
tmp = (f * ((1.0d0 / 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 <= -3.6e-87) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 3.7e-53) {
tmp = x / -Math.tan(B);
} else {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-87: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 3.7e-53: tmp = x / -math.tan(B) else: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-87) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 3.7e-53) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-87) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 3.7e-53) tmp = x / -tan(B); else tmp = (F * ((1.0 / F) / sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-87], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-53], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
if -3.59999999999999993e-87 < F < 3.69999999999999982e-53Initial program 99.5%
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 76.7%
associate-*r/76.6%
*-commutative76.6%
neg-mul-176.6%
distribute-rgt-neg-in76.6%
Simplified76.6%
*-commutative76.6%
add-sqr-sqrt22.7%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod1.2%
add-sqr-sqrt2.1%
clear-num2.1%
tan-quot2.1%
div-inv2.1%
frac-2neg2.1%
neg-sub02.1%
div-sub2.1%
add-sqr-sqrt1.2%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod22.8%
add-sqr-sqrt76.7%
frac-2neg76.7%
Applied egg-rr76.7%
div076.7%
neg-sub076.7%
distribute-neg-frac76.7%
Simplified76.7%
if 3.69999999999999982e-53 < F Initial program 59.1%
Simplified72.7%
Taylor expanded in F around inf 91.9%
Taylor expanded in B around 0 74.2%
Final simplification78.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00031)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.7e-53)
(/ x (- (tan B)))
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00031) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.7e-53) {
tmp = x / -tan(B);
} else {
tmp = (F * ((1.0 / 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 <= (-0.00031d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.7d-53) then
tmp = x / -tan(b)
else
tmp = (f * ((1.0d0 / 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 <= -0.00031) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.7e-53) {
tmp = x / -Math.tan(B);
} else {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00031: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.7e-53: tmp = x / -math.tan(B) else: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00031) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.7e-53) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00031) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.7e-53) tmp = x / -tan(B); else tmp = (F * ((1.0 / F) / sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00031], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-53], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00031:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.1e-4Initial program 52.5%
Simplified66.7%
Taylor expanded in F around -inf 98.6%
Taylor expanded in B around 0 76.7%
if -3.1e-4 < F < 3.69999999999999982e-53Initial program 99.5%
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 0 64.8%
associate-*r/64.7%
*-commutative64.7%
neg-mul-164.7%
distribute-rgt-neg-in64.7%
Simplified64.7%
*-commutative64.7%
add-sqr-sqrt18.1%
sqrt-unprod13.3%
sqr-neg13.3%
sqrt-unprod1.2%
add-sqr-sqrt2.4%
clear-num2.4%
tan-quot2.4%
div-inv2.4%
frac-2neg2.4%
neg-sub02.4%
div-sub2.4%
add-sqr-sqrt1.2%
sqrt-unprod13.4%
sqr-neg13.4%
sqrt-unprod18.1%
add-sqr-sqrt64.9%
frac-2neg64.9%
Applied egg-rr64.9%
div064.9%
neg-sub064.9%
distribute-neg-frac64.9%
Simplified64.9%
if 3.69999999999999982e-53 < F Initial program 59.1%
Simplified72.7%
Taylor expanded in F around inf 91.9%
Taylor expanded in B around 0 74.2%
Final simplification71.4%
(FPCore (F B x) :precision binary64 (if (<= F -0.00032) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 1.15e-119) (/ x (- (tan B))) (- (/ 1.0 B) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00032) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.15e-119) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00032d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.15d-119) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00032) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.15e-119) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00032: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.15e-119: tmp = x / -math.tan(B) else: tmp = (1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00032) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.15e-119) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00032) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.15e-119) tmp = x / -tan(B); else tmp = (1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e-119], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00032:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-119}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -3.20000000000000026e-4Initial program 52.5%
Simplified66.7%
Taylor expanded in F around -inf 98.6%
Taylor expanded in B around 0 76.7%
if -3.20000000000000026e-4 < F < 1.14999999999999997e-119Initial program 99.5%
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 0 68.2%
associate-*r/68.2%
*-commutative68.2%
neg-mul-168.2%
distribute-rgt-neg-in68.2%
Simplified68.2%
*-commutative68.2%
add-sqr-sqrt18.7%
sqrt-unprod13.5%
sqr-neg13.5%
sqrt-unprod1.1%
add-sqr-sqrt2.3%
clear-num2.3%
tan-quot2.3%
div-inv2.3%
frac-2neg2.3%
neg-sub02.3%
div-sub2.3%
add-sqr-sqrt1.1%
sqrt-unprod13.5%
sqr-neg13.5%
sqrt-unprod18.7%
add-sqr-sqrt68.3%
frac-2neg68.3%
Applied egg-rr68.3%
div068.3%
neg-sub068.3%
distribute-neg-frac68.3%
Simplified68.3%
if 1.14999999999999997e-119 < F Initial program 61.9%
Simplified74.5%
Taylor expanded in F around inf 85.9%
Taylor expanded in B around 0 62.8%
Final simplification68.9%
(FPCore (F B x) :precision binary64 (if (<= F -0.032) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 2.05e+111) (/ x (- (tan B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.05e+111) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.032d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.05d+111) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.032) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.05e+111) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.032: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.05e+111: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.032) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.05e+111) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.032) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.05e+111) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.032], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e+111], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.032:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+111}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.032000000000000001Initial program 52.5%
Simplified66.7%
Taylor expanded in F around -inf 98.6%
Taylor expanded in B around 0 76.7%
if -0.032000000000000001 < F < 2.04999999999999993e111Initial program 98.8%
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 0 58.5%
associate-*r/58.4%
*-commutative58.4%
neg-mul-158.4%
distribute-rgt-neg-in58.4%
Simplified58.4%
*-commutative58.4%
add-sqr-sqrt14.9%
sqrt-unprod11.8%
sqr-neg11.8%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
clear-num2.3%
tan-quot2.3%
div-inv2.3%
frac-2neg2.3%
neg-sub02.3%
div-sub2.3%
add-sqr-sqrt1.3%
sqrt-unprod11.9%
sqr-neg11.9%
sqrt-unprod15.0%
add-sqr-sqrt58.5%
frac-2neg58.5%
Applied egg-rr58.5%
div058.5%
neg-sub058.5%
distribute-neg-frac58.5%
Simplified58.5%
if 2.04999999999999993e111 < F Initial program 28.0%
Simplified50.6%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 59.5%
Final simplification64.1%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-87) (- (/ -1.0 B) (/ x (tan B))) (if (<= F 2.9e+112) (/ x (- (tan B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.9e+112) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d-87)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.9d+112) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.9e+112) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-87: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.9e+112: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-87) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.9e+112) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-87) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.9e+112) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-87], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e+112], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{+112}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 58.8%
if -3.59999999999999993e-87 < F < 2.9000000000000002e112Initial program 98.7%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 65.3%
associate-*r/65.2%
*-commutative65.2%
neg-mul-165.2%
distribute-rgt-neg-in65.2%
Simplified65.2%
*-commutative65.2%
add-sqr-sqrt17.5%
sqrt-unprod13.5%
sqr-neg13.5%
sqrt-unprod1.3%
add-sqr-sqrt2.1%
clear-num2.1%
tan-quot2.1%
div-inv2.1%
frac-2neg2.1%
neg-sub02.1%
div-sub2.1%
add-sqr-sqrt1.3%
sqrt-unprod13.6%
sqr-neg13.6%
sqrt-unprod17.5%
add-sqr-sqrt65.3%
frac-2neg65.3%
Applied egg-rr65.3%
div065.3%
neg-sub065.3%
distribute-neg-frac65.3%
Simplified65.3%
if 2.9000000000000002e112 < F Initial program 28.0%
Simplified50.6%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 59.5%
Final simplification61.8%
(FPCore (F B x) :precision binary64 (if (<= F -0.0048) (/ -1.0 (sin B)) (if (<= F 2.05e+111) (/ x (- (tan B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0048) {
tmp = -1.0 / sin(B);
} else if (F <= 2.05e+111) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.0048d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 2.05d+111) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0048) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 2.05e+111) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0048: tmp = -1.0 / math.sin(B) elif F <= 2.05e+111: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0048) tmp = Float64(-1.0 / sin(B)); elseif (F <= 2.05e+111) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0048) tmp = -1.0 / sin(B); elseif (F <= 2.05e+111) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0048], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e+111], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0048:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{+111}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -0.00479999999999999958Initial program 52.5%
Simplified66.7%
Taylor expanded in F around -inf 98.6%
distribute-lft-in98.6%
mul-1-neg98.6%
unsub-neg98.6%
associate-*r/98.6%
metadata-eval98.6%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in x around 0 56.4%
if -0.00479999999999999958 < F < 2.04999999999999993e111Initial program 98.8%
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 0 58.5%
associate-*r/58.4%
*-commutative58.4%
neg-mul-158.4%
distribute-rgt-neg-in58.4%
Simplified58.4%
*-commutative58.4%
add-sqr-sqrt14.9%
sqrt-unprod11.8%
sqr-neg11.8%
sqrt-unprod1.3%
add-sqr-sqrt2.3%
clear-num2.3%
tan-quot2.3%
div-inv2.3%
frac-2neg2.3%
neg-sub02.3%
div-sub2.3%
add-sqr-sqrt1.3%
sqrt-unprod11.9%
sqr-neg11.9%
sqrt-unprod15.0%
add-sqr-sqrt58.5%
frac-2neg58.5%
Applied egg-rr58.5%
div058.5%
neg-sub058.5%
distribute-neg-frac58.5%
Simplified58.5%
if 2.04999999999999993e111 < F Initial program 28.0%
Simplified50.6%
Taylor expanded in F around inf 99.5%
Taylor expanded in B around 0 59.5%
Final simplification58.0%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-87) (/ -1.0 (sin B)) (if (<= F 4.2e-119) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = -1.0 / sin(B);
} else if (F <= 4.2e-119) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d-87)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 4.2d-119) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 4.2e-119) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-87: tmp = -1.0 / math.sin(B) elif F <= 4.2e-119: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-87) tmp = Float64(-1.0 / sin(B)); elseif (F <= 4.2e-119) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-87) tmp = -1.0 / sin(B); elseif (F <= 4.2e-119) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-87], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-119], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-119}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
distribute-lft-in82.8%
mul-1-neg82.8%
unsub-neg82.8%
associate-*r/82.8%
metadata-eval82.8%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in x around 0 45.7%
if -3.59999999999999993e-87 < F < 4.2e-119Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 26.5%
Taylor expanded in B around 0 17.5%
Taylor expanded in x around inf 51.3%
mul-1-neg51.3%
Simplified51.3%
if 4.2e-119 < F Initial program 61.9%
Simplified74.5%
Taylor expanded in F around inf 85.9%
Taylor expanded in B around 0 46.8%
Final simplification47.6%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-87) (/ (- -1.0 x) B) (if (<= F 4.2e-119) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-119) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d-87)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.2d-119) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.2e-119) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-87: tmp = (-1.0 - x) / B elif F <= 4.2e-119: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-87) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.2e-119) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-87) tmp = (-1.0 - x) / B; elseif (F <= 4.2e-119) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-87], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.2e-119], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-119}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
distribute-lft-in82.8%
mul-1-neg82.8%
unsub-neg82.8%
associate-*r/82.8%
metadata-eval82.8%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in B around 0 40.6%
associate-*r/40.6%
distribute-lft-in40.6%
metadata-eval40.6%
neg-mul-140.6%
unsub-neg40.6%
Simplified40.6%
if -3.59999999999999993e-87 < F < 4.2e-119Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 26.5%
Taylor expanded in B around 0 17.5%
Taylor expanded in x around inf 51.3%
mul-1-neg51.3%
Simplified51.3%
if 4.2e-119 < F Initial program 61.9%
Simplified74.5%
Taylor expanded in F around inf 85.9%
Taylor expanded in B around 0 46.8%
Final simplification45.7%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-87) (/ (- -1.0 x) B) (if (<= F 1e-17) (/ x (- B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = (-1.0 - x) / B;
} else if (F <= 1e-17) {
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 <= (-3.6d-87)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1d-17) 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 <= -3.6e-87) {
tmp = (-1.0 - x) / B;
} else if (F <= 1e-17) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-87: tmp = (-1.0 - x) / B elif F <= 1e-17: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-87) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1e-17) 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 <= -3.6e-87) tmp = (-1.0 - x) / B; elseif (F <= 1e-17) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-87], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-17], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 10^{-17}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
distribute-lft-in82.8%
mul-1-neg82.8%
unsub-neg82.8%
associate-*r/82.8%
metadata-eval82.8%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in B around 0 40.6%
associate-*r/40.6%
distribute-lft-in40.6%
metadata-eval40.6%
neg-mul-140.6%
unsub-neg40.6%
Simplified40.6%
if -3.59999999999999993e-87 < F < 1.00000000000000007e-17Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 27.6%
Taylor expanded in B around 0 20.1%
Taylor expanded in x around inf 47.9%
mul-1-neg47.9%
Simplified47.9%
if 1.00000000000000007e-17 < F Initial program 54.7%
Simplified69.8%
Taylor expanded in F around inf 96.0%
Taylor expanded in B around 0 49.4%
Taylor expanded in x around 0 29.5%
Final simplification39.8%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-87) (/ -1.0 B) (if (<= F 1e-17) (/ x (- B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-87) {
tmp = -1.0 / B;
} else if (F <= 1e-17) {
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 <= (-3.6d-87)) then
tmp = (-1.0d0) / b
else if (f <= 1d-17) 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 <= -3.6e-87) {
tmp = -1.0 / B;
} else if (F <= 1e-17) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-87: tmp = -1.0 / B elif F <= 1e-17: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-87) tmp = Float64(-1.0 / B); elseif (F <= 1e-17) 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 <= -3.6e-87) tmp = -1.0 / B; elseif (F <= 1e-17) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-87], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 1e-17], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 10^{-17}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -3.59999999999999993e-87Initial program 62.5%
Simplified73.7%
Taylor expanded in F around -inf 82.8%
Taylor expanded in B around 0 58.8%
Taylor expanded in x around 0 24.4%
if -3.59999999999999993e-87 < F < 1.00000000000000007e-17Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 27.6%
Taylor expanded in B around 0 20.1%
Taylor expanded in x around inf 47.9%
mul-1-neg47.9%
Simplified47.9%
if 1.00000000000000007e-17 < F Initial program 54.7%
Simplified69.8%
Taylor expanded in F around inf 96.0%
Taylor expanded in B around 0 49.4%
Taylor expanded in x around 0 29.5%
Final simplification33.6%
(FPCore (F B x) :precision binary64 (if (<= F 3e-247) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3e-247) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 3d-247) then
tmp = (-1.0d0) / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 3e-247) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3e-247: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3e-247) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 3e-247) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3e-247], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3 \cdot 10^{-247}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 2.9999999999999997e-247Initial program 75.0%
Simplified82.5%
Taylor expanded in F around -inf 65.9%
Taylor expanded in B around 0 54.1%
Taylor expanded in x around 0 17.8%
if 2.9999999999999997e-247 < F Initial program 68.8%
Simplified79.1%
Taylor expanded in F around inf 76.0%
Taylor expanded in B around 0 40.7%
Taylor expanded in x around 0 21.6%
(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 72.4%
Simplified81.1%
Taylor expanded in F around -inf 53.7%
Taylor expanded in B around 0 47.3%
Taylor expanded in x around 0 11.5%
herbie shell --seed 2024191
(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))))))