
(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 24 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 -5.5e+22)
(- (/ -1.0 (sin B)) (/ x (/ (sin B) (cos B))))
(if (<= F 1e+98)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -0.5) (sin B))) (/ x (tan B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.5e+22) {
tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B)));
} else if (F <= 1e+98) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -5.5e+22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(B)))); elseif (F <= 1e+98) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -5.5e+22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e+98], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 10^{+98}:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.50000000000000021e22Initial program 56.4%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
sub-neg99.8%
mul-1-neg99.8%
distribute-lft-in99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-*r/99.8%
metadata-eval99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-/l*99.8%
Simplified99.8%
if -5.50000000000000021e22 < F < 9.99999999999999998e97Initial program 98.8%
distribute-lft-neg-in98.8%
+-commutative98.8%
cancel-sign-sub-inv98.8%
Simplified99.7%
if 9.99999999999999998e97 < F Initial program 40.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(if (<= x -1.0)
(- (/ -1.0 (sin B)) (/ 1.0 (/ (tan B) x)))
(+
(* x (/ -1.0 (tan B)))
(/ (/ F (hypot F (sqrt (fma 2.0 x 2.0)))) (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (x <= -1.0) {
tmp = (-1.0 / sin(B)) - (1.0 / (tan(B) / x));
} else {
tmp = (x * (-1.0 / tan(B))) + ((F / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(1.0 / Float64(tan(B) / x))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[x, -1.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{\frac{F}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}{\sin B}\\
\end{array}
\end{array}
if x < -1Initial program 84.3%
Taylor expanded in F around -inf 99.6%
div-inv99.6%
clear-num99.9%
Applied egg-rr99.9%
if -1 < x Initial program 75.8%
add-sqr-sqrt75.8%
unpow-prod-down75.7%
+-commutative75.7%
fma-def75.7%
fma-def75.7%
metadata-eval75.7%
metadata-eval75.7%
+-commutative75.7%
fma-def75.7%
fma-def75.7%
metadata-eval75.7%
metadata-eval75.7%
Applied egg-rr75.7%
pow-sqr75.8%
metadata-eval75.8%
unpow-175.8%
fma-udef75.8%
fma-udef75.8%
unpow275.8%
associate-+r+75.8%
+-commutative75.8%
associate-+l+75.8%
unpow275.8%
+-commutative75.8%
unpow175.8%
sqr-pow75.8%
hypot-def92.2%
+-commutative92.2%
fma-def92.2%
metadata-eval92.2%
Simplified92.2%
associate-*l/99.5%
unpow1/299.5%
Applied egg-rr99.5%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -2e+31)
(- (/ -1.0 (sin B)) (/ x (/ (sin B) (cos B))))
(if (<= F 5e+32)
(- (* F (/ (sqrt (/ 1.0 (fma F F 2.0))) (sin B))) (/ x (tan B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2e+31) {
tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B)));
} else if (F <= 5e+32) {
tmp = (F * (sqrt((1.0 / fma(F, F, 2.0))) / sin(B))) - (x / tan(B));
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -2e+31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(B)))); elseif (F <= 5e+32) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / fma(F, F, 2.0))) / sin(B))) - Float64(x / tan(B))); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -2e+31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e+32], 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[(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 \cdot 10^{+31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{+32}:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.9999999999999999e31Initial program 56.4%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
sub-neg99.8%
mul-1-neg99.8%
distribute-lft-in99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-*r/99.8%
metadata-eval99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-/l*99.8%
Simplified99.8%
if -1.9999999999999999e31 < F < 4.9999999999999997e32Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
cancel-sign-sub-inv99.5%
Simplified99.7%
Taylor expanded in x around 0 99.6%
associate-*l/99.7%
*-lft-identity99.7%
+-commutative99.7%
unpow299.7%
fma-udef99.7%
Simplified99.7%
if 4.9999999999999997e32 < F Initial program 47.3%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -1e+16)
(- (/ -1.0 (sin B)) (/ x (/ (sin B) (cos B))))
(if (<= F 400000000.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 <= -1e+16) {
tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B)));
} else if (F <= 400000000.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 <= (-1d+16)) then
tmp = ((-1.0d0) / sin(b)) - (x / (sin(b) / cos(b)))
else if (f <= 400000000.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 <= -1e+16) {
tmp = (-1.0 / Math.sin(B)) - (x / (Math.sin(B) / Math.cos(B)));
} else if (F <= 400000000.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 <= -1e+16: tmp = (-1.0 / math.sin(B)) - (x / (math.sin(B) / math.cos(B))) elif F <= 400000000.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 <= -1e+16) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(B)))); elseif (F <= 400000000.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 <= -1e+16) tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B))); elseif (F <= 400000000.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, -1e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 400000000.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 -1 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 400000000:\\
\;\;\;\;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 < -1e16Initial program 57.7%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.8%
sub-neg99.8%
mul-1-neg99.8%
distribute-lft-in99.8%
+-commutative99.8%
distribute-lft-in99.8%
associate-*r/99.8%
metadata-eval99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-/l*99.8%
Simplified99.8%
if -1e16 < F < 4e8Initial program 99.5%
if 4e8 < F Initial program 52.1%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.45)
(- (/ -1.0 (sin B)) (/ x (/ (sin B) (cos B))))
(if (<= F 8.5e-10)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x (tan B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B)));
} else if (F <= 8.5e-10) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / tan(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 <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / (sin(b) / cos(b)))
else if (f <= 8.5d-10) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / tan(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 <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - (x / (Math.sin(B) / Math.cos(B)));
} else if (F <= 8.5e-10) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / Math.tan(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 <= -1.45: tmp = (-1.0 / math.sin(B)) - (x / (math.sin(B) / math.cos(B))) elif F <= 8.5e-10: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / math.tan(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 <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(B)))); elseif (F <= 8.5e-10) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / tan(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 <= -1.45) tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B))); elseif (F <= 8.5e-10) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / tan(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-10], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 59.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.7%
sub-neg99.7%
mul-1-neg99.7%
distribute-lft-in99.7%
+-commutative99.7%
distribute-lft-in99.7%
associate-*r/99.7%
metadata-eval99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-/l*99.8%
Simplified99.8%
if -1.44999999999999996 < F < 8.4999999999999996e-10Initial program 99.5%
Taylor expanded in F around 0 99.2%
div-inv99.4%
expm1-log1p-u71.8%
expm1-udef51.3%
Applied egg-rr51.3%
expm1-def71.8%
expm1-log1p99.4%
Simplified99.4%
if 8.4999999999999996e-10 < F Initial program 53.5%
Taylor expanded in F around inf 99.2%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8.5e-10)
(- (* (/ F (sin B)) (sqrt 0.5)) t_0)
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8.5e-10) {
tmp = ((F / sin(B)) * sqrt(0.5)) - t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8.5d-10) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8.5e-10) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8.5e-10: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - t_0 else: tmp = (x * (-1.0 / math.tan(B))) + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8.5e-10) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - t_0); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8.5e-10) tmp = ((F / sin(B)) * sqrt(0.5)) - t_0; else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.5e-10], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 59.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u37.8%
expm1-udef37.8%
neg-mul-137.8%
fma-def37.8%
un-div-inv37.8%
Applied egg-rr37.8%
expm1-def37.8%
expm1-log1p99.8%
rem-log-exp40.1%
fma-udef40.1%
neg-mul-140.1%
prod-exp35.3%
*-commutative35.3%
prod-exp40.1%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -1.3999999999999999 < F < 8.4999999999999996e-10Initial program 99.5%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 99.2%
expm1-log1p-u68.4%
expm1-udef30.9%
neg-mul-130.9%
fma-def30.9%
un-div-inv30.9%
associate-/l*30.9%
Applied egg-rr30.9%
expm1-def68.4%
expm1-log1p99.3%
rem-log-exp15.7%
fma-udef15.7%
neg-mul-115.7%
prod-exp13.8%
*-commutative13.8%
prod-exp15.7%
rem-log-exp99.3%
unsub-neg99.3%
associate-/r/99.4%
Simplified99.4%
if 8.4999999999999996e-10 < F Initial program 53.5%
Taylor expanded in F around inf 99.2%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.45)
(- (/ -1.0 (sin B)) (/ x (/ (sin B) (cos B))))
(if (<= F 8.5e-10)
(- (* (/ F (sin B)) (sqrt 0.5)) (/ x (tan B)))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B)));
} else if (F <= 8.5e-10) {
tmp = ((F / sin(B)) * sqrt(0.5)) - (x / tan(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 <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / (sin(b) / cos(b)))
else if (f <= 8.5d-10) then
tmp = ((f / sin(b)) * sqrt(0.5d0)) - (x / tan(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 <= -1.45) {
tmp = (-1.0 / Math.sin(B)) - (x / (Math.sin(B) / Math.cos(B)));
} else if (F <= 8.5e-10) {
tmp = ((F / Math.sin(B)) * Math.sqrt(0.5)) - (x / Math.tan(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 <= -1.45: tmp = (-1.0 / math.sin(B)) - (x / (math.sin(B) / math.cos(B))) elif F <= 8.5e-10: tmp = ((F / math.sin(B)) * math.sqrt(0.5)) - (x / math.tan(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 <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / Float64(sin(B) / cos(B)))); elseif (F <= 8.5e-10) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(0.5)) - Float64(x / tan(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 <= -1.45) tmp = (-1.0 / sin(B)) - (x / (sin(B) / cos(B))); elseif (F <= 8.5e-10) tmp = ((F / sin(B)) * sqrt(0.5)) - (x / tan(B)); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-10], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\frac{\sin B}{\cos B}}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 59.6%
Taylor expanded in F around -inf 99.7%
Taylor expanded in x around 0 99.7%
sub-neg99.7%
mul-1-neg99.7%
distribute-lft-in99.7%
+-commutative99.7%
distribute-lft-in99.7%
associate-*r/99.7%
metadata-eval99.7%
mul-1-neg99.7%
unsub-neg99.7%
associate-/l*99.8%
Simplified99.8%
if -1.44999999999999996 < F < 8.4999999999999996e-10Initial program 99.5%
Taylor expanded in F around 0 99.2%
Taylor expanded in x around 0 99.2%
expm1-log1p-u68.4%
expm1-udef30.9%
neg-mul-130.9%
fma-def30.9%
un-div-inv30.9%
associate-/l*30.9%
Applied egg-rr30.9%
expm1-def68.4%
expm1-log1p99.3%
rem-log-exp15.7%
fma-udef15.7%
neg-mul-115.7%
prod-exp13.8%
*-commutative13.8%
prod-exp15.7%
rem-log-exp99.3%
unsub-neg99.3%
associate-/r/99.4%
Simplified99.4%
if 8.4999999999999996e-10 < F Initial program 53.5%
Taylor expanded in F around inf 99.2%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -0.31)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 8.5e-10)
(+ t_0 (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)))
(+ t_0 (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -0.31) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 8.5e-10) {
tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = t_0 + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-0.31d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 8.5d-10) then
tmp = t_0 + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
else
tmp = t_0 + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -0.31) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 8.5e-10) {
tmp = t_0 + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
} else {
tmp = t_0 + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -0.31: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 8.5e-10: tmp = t_0 + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) else: tmp = t_0 + (1.0 / math.sin(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -0.31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 8.5e-10) tmp = Float64(t_0 + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))); else tmp = Float64(t_0 + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -0.31) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 8.5e-10) tmp = t_0 + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); else tmp = t_0 + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-10], N[(t$95$0 + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -0.31:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-10}:\\
\;\;\;\;t_0 + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0 + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -0.309999999999999998Initial program 59.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u37.8%
expm1-udef37.8%
neg-mul-137.8%
fma-def37.8%
un-div-inv37.8%
Applied egg-rr37.8%
expm1-def37.8%
expm1-log1p99.8%
rem-log-exp40.1%
fma-udef40.1%
neg-mul-140.1%
prod-exp35.3%
*-commutative35.3%
prod-exp40.1%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -0.309999999999999998 < F < 8.4999999999999996e-10Initial program 99.5%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 87.8%
if 8.4999999999999996e-10 < F Initial program 53.5%
Taylor expanded in F around inf 99.2%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ F (/ (sin B) (sqrt 0.5))) (/ x B))))
(if (<= F -0.000115)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -5.8e-124)
t_0
(if (<= F 6.5e-182)
(/ (- x) (tan B))
(if (<= F 6.2e-33)
t_0
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))))
double code(double F, double B, double x) {
double t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B);
double tmp;
if (F <= -0.000115) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -5.8e-124) {
tmp = t_0;
} else if (F <= 6.5e-182) {
tmp = -x / tan(B);
} else if (F <= 6.2e-33) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (f / (sin(b) / sqrt(0.5d0))) - (x / b)
if (f <= (-0.000115d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-5.8d-124)) then
tmp = t_0
else if (f <= 6.5d-182) then
tmp = -x / tan(b)
else if (f <= 6.2d-33) then
tmp = t_0
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / (Math.sin(B) / Math.sqrt(0.5))) - (x / B);
double tmp;
if (F <= -0.000115) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -5.8e-124) {
tmp = t_0;
} else if (F <= 6.5e-182) {
tmp = -x / Math.tan(B);
} else if (F <= 6.2e-33) {
tmp = t_0;
} else {
tmp = (x * (-1.0 / Math.tan(B))) + (1.0 / Math.sin(B));
}
return tmp;
}
def code(F, B, x): t_0 = (F / (math.sin(B) / math.sqrt(0.5))) - (x / B) tmp = 0 if F <= -0.000115: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -5.8e-124: tmp = t_0 elif F <= 6.5e-182: tmp = -x / math.tan(B) elif F <= 6.2e-33: 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(F / Float64(sin(B) / sqrt(0.5))) - Float64(x / B)) tmp = 0.0 if (F <= -0.000115) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -5.8e-124) tmp = t_0; elseif (F <= 6.5e-182) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 6.2e-33) tmp = t_0; else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / (sin(B) / sqrt(0.5))) - (x / B); tmp = 0.0; if (F <= -0.000115) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -5.8e-124) tmp = t_0; elseif (F <= 6.5e-182) tmp = -x / tan(B); elseif (F <= 6.2e-33) 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[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000115], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.8e-124], t$95$0, If[LessEqual[F, 6.5e-182], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-33], 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}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\
\mathbf{if}\;F \leq -0.000115:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{-124}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-182}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-33}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.15e-4Initial program 59.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u37.8%
expm1-udef37.8%
neg-mul-137.8%
fma-def37.8%
un-div-inv37.8%
Applied egg-rr37.8%
expm1-def37.8%
expm1-log1p99.8%
rem-log-exp40.1%
fma-udef40.1%
neg-mul-140.1%
prod-exp35.3%
*-commutative35.3%
prod-exp40.1%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -1.15e-4 < F < -5.8000000000000004e-124 or 6.49999999999999997e-182 < F < 6.19999999999999994e-33Initial program 99.4%
Taylor expanded in F around 0 98.8%
Taylor expanded in B around 0 77.7%
Taylor expanded in x around 0 77.7%
associate-/l*77.6%
Simplified77.6%
if -5.8000000000000004e-124 < F < 6.49999999999999997e-182Initial program 99.5%
Taylor expanded in F around -inf 43.1%
Taylor expanded in x around inf 88.4%
mul-1-neg88.4%
Simplified88.4%
associate-/l*88.4%
tan-quot88.6%
un-div-inv88.3%
expm1-log1p-u60.7%
expm1-udef32.9%
un-div-inv32.9%
Applied egg-rr32.9%
expm1-def60.7%
expm1-log1p88.6%
Simplified88.6%
if 6.19999999999999994e-33 < F Initial program 58.3%
Taylor expanded in F around inf 96.0%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(if (<= F -0.001)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -3.65e-125)
(- (/ (/ F (sqrt (+ 2.0 (* x 2.0)))) (sin B)) (/ x B))
(if (<= F 5.2e-182)
(/ (- x) (tan B))
(if (<= F 6.2e-33)
(- (/ F (/ (sin B) (sqrt 0.5))) (/ x B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.001) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -3.65e-125) {
tmp = ((F / sqrt((2.0 + (x * 2.0)))) / sin(B)) - (x / B);
} else if (F <= 5.2e-182) {
tmp = -x / tan(B);
} else if (F <= 6.2e-33) {
tmp = (F / (sin(B) / sqrt(0.5))) - (x / B);
} else {
tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.001d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-3.65d-125)) then
tmp = ((f / sqrt((2.0d0 + (x * 2.0d0)))) / sin(b)) - (x / b)
else if (f <= 5.2d-182) then
tmp = -x / tan(b)
else if (f <= 6.2d-33) then
tmp = (f / (sin(b) / sqrt(0.5d0))) - (x / b)
else
tmp = (x * ((-1.0d0) / tan(b))) + (1.0d0 / sin(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.001) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -3.65e-125) {
tmp = ((F / Math.sqrt((2.0 + (x * 2.0)))) / Math.sin(B)) - (x / B);
} else if (F <= 5.2e-182) {
tmp = -x / Math.tan(B);
} else if (F <= 6.2e-33) {
tmp = (F / (Math.sin(B) / Math.sqrt(0.5))) - (x / 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 <= -0.001: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -3.65e-125: tmp = ((F / math.sqrt((2.0 + (x * 2.0)))) / math.sin(B)) - (x / B) elif F <= 5.2e-182: tmp = -x / math.tan(B) elif F <= 6.2e-33: tmp = (F / (math.sin(B) / math.sqrt(0.5))) - (x / 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 <= -0.001) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -3.65e-125) tmp = Float64(Float64(Float64(F / sqrt(Float64(2.0 + Float64(x * 2.0)))) / sin(B)) - Float64(x / B)); elseif (F <= 5.2e-182) tmp = Float64(Float64(-x) / tan(B)); elseif (F <= 6.2e-33) tmp = Float64(Float64(F / Float64(sin(B) / sqrt(0.5))) - Float64(x / B)); else tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(1.0 / sin(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.001) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -3.65e-125) tmp = ((F / sqrt((2.0 + (x * 2.0)))) / sin(B)) - (x / B); elseif (F <= 5.2e-182) tmp = -x / tan(B); elseif (F <= 6.2e-33) tmp = (F / (sin(B) / sqrt(0.5))) - (x / B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.001], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.65e-125], N[(N[(N[(F / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.2e-182], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.2e-33], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.001:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.65 \cdot 10^{-125}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2 + x \cdot 2}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.2 \cdot 10^{-182}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{F}{\frac{\sin B}{\sqrt{0.5}}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1e-3Initial program 59.6%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u37.8%
expm1-udef37.8%
neg-mul-137.8%
fma-def37.8%
un-div-inv37.8%
Applied egg-rr37.8%
expm1-def37.8%
expm1-log1p99.8%
rem-log-exp40.1%
fma-udef40.1%
neg-mul-140.1%
prod-exp35.3%
*-commutative35.3%
prod-exp40.1%
rem-log-exp99.8%
unsub-neg99.8%
Simplified99.8%
if -1e-3 < F < -3.6499999999999998e-125Initial program 99.7%
add-sqr-sqrt99.4%
unpow-prod-down99.4%
+-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
+-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
pow-sqr99.4%
metadata-eval99.4%
unpow-199.4%
fma-udef99.4%
fma-udef99.4%
unpow299.4%
associate-+r+99.4%
+-commutative99.4%
associate-+l+99.4%
unpow299.4%
+-commutative99.4%
unpow199.4%
sqr-pow99.4%
hypot-def99.4%
+-commutative99.4%
fma-def99.4%
metadata-eval99.4%
Simplified99.4%
associate-*l/99.5%
unpow1/299.5%
Applied egg-rr99.5%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in B around 0 85.5%
Taylor expanded in F around 0 84.2%
if -3.6499999999999998e-125 < F < 5.20000000000000011e-182Initial program 99.5%
Taylor expanded in F around -inf 43.1%
Taylor expanded in x around inf 88.4%
mul-1-neg88.4%
Simplified88.4%
associate-/l*88.4%
tan-quot88.6%
un-div-inv88.3%
expm1-log1p-u60.7%
expm1-udef32.9%
un-div-inv32.9%
Applied egg-rr32.9%
expm1-def60.7%
expm1-log1p88.6%
Simplified88.6%
if 5.20000000000000011e-182 < F < 6.19999999999999994e-33Initial program 99.2%
Taylor expanded in F around 0 99.2%
Taylor expanded in B around 0 72.5%
Taylor expanded in x around 0 72.7%
associate-/l*72.6%
Simplified72.6%
if 6.19999999999999994e-33 < F Initial program 58.3%
Taylor expanded in F around inf 96.0%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.8e-56)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -4.6e-121)
(-
(*
(sqrt (/ 1.0 (+ 2.0 (* x 2.0))))
(+ (/ F B) (* 0.16666666666666666 (* B F))))
(/ x B))
(if (<= F 2.9e-12)
(/ (- x) (tan B))
(+ (* x (/ -1.0 (tan B))) (/ 1.0 (sin B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.8e-56) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -4.6e-121) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B);
} else if (F <= 2.9e-12) {
tmp = -x / tan(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 <= (-1.8d-56)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-4.6d-121)) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * ((f / b) + (0.16666666666666666d0 * (b * f)))) - (x / b)
else if (f <= 2.9d-12) then
tmp = -x / tan(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 <= -1.8e-56) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -4.6e-121) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B);
} else if (F <= 2.9e-12) {
tmp = -x / Math.tan(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 <= -1.8e-56: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -4.6e-121: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B) elif F <= 2.9e-12: tmp = -x / math.tan(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 <= -1.8e-56) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -4.6e-121) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(B * F)))) - Float64(x / B)); elseif (F <= 2.9e-12) tmp = Float64(Float64(-x) / tan(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 <= -1.8e-56) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -4.6e-121) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B); elseif (F <= 2.9e-12) tmp = -x / tan(B); else tmp = (x * (-1.0 / tan(B))) + (1.0 / sin(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.8e-56], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.6e-121], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(B * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-12], N[((-x) / N[Tan[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 -1.8 \cdot 10^{-56}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-121}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(B \cdot F\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-12}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.79999999999999989e-56Initial program 62.9%
Taylor expanded in F around -inf 96.1%
expm1-log1p-u36.1%
expm1-udef36.1%
neg-mul-136.1%
fma-def36.1%
un-div-inv36.1%
Applied egg-rr36.1%
expm1-def36.1%
expm1-log1p96.1%
rem-log-exp38.6%
fma-udef38.6%
neg-mul-138.6%
prod-exp34.2%
*-commutative34.2%
prod-exp38.6%
rem-log-exp96.1%
unsub-neg96.1%
Simplified96.1%
if -1.79999999999999989e-56 < F < -4.60000000000000025e-121Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 92.8%
Taylor expanded in B around 0 86.5%
if -4.60000000000000025e-121 < F < 2.9000000000000002e-12Initial program 99.4%
Taylor expanded in F around -inf 39.7%
Taylor expanded in x around inf 77.3%
mul-1-neg77.3%
Simplified77.3%
associate-/l*77.4%
tan-quot77.4%
un-div-inv77.2%
expm1-log1p-u50.3%
expm1-udef27.4%
un-div-inv27.4%
Applied egg-rr27.4%
expm1-def50.4%
expm1-log1p77.4%
Simplified77.4%
if 2.9000000000000002e-12 < F Initial program 53.5%
Taylor expanded in F around inf 99.2%
Final simplification89.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= F -5.2e-44)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.4e-120)
(-
(* (sqrt (/ 1.0 t_0)) (+ (/ F B) (* 0.16666666666666666 (* B F))))
(/ x B))
(if (<= F 3.5)
(/ (- x) (tan B))
(- (/ (/ F (+ F (* 0.5 (/ t_0 F)))) (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -5.2e-44) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.4e-120) {
tmp = (sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B);
} else if (F <= 3.5) {
tmp = -x / tan(B);
} else {
tmp = ((F / (F + (0.5 * (t_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) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
if (f <= (-5.2d-44)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.4d-120)) then
tmp = (sqrt((1.0d0 / t_0)) * ((f / b) + (0.16666666666666666d0 * (b * f)))) - (x / b)
else if (f <= 3.5d0) then
tmp = -x / tan(b)
else
tmp = ((f / (f + (0.5d0 * (t_0 / f)))) / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -5.2e-44) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.4e-120) {
tmp = (Math.sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B);
} else if (F <= 3.5) {
tmp = -x / Math.tan(B);
} else {
tmp = ((F / (F + (0.5 * (t_0 / F)))) / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) tmp = 0 if F <= -5.2e-44: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.4e-120: tmp = (math.sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B) elif F <= 3.5: tmp = -x / math.tan(B) else: tmp = ((F / (F + (0.5 * (t_0 / F)))) / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -5.2e-44) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.4e-120) tmp = Float64(Float64(sqrt(Float64(1.0 / t_0)) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(B * F)))) - Float64(x / B)); elseif (F <= 3.5) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(t_0 / F)))) / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -5.2e-44) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.4e-120) tmp = (sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B); elseif (F <= 3.5) tmp = -x / tan(B); else tmp = ((F / (F + (0.5 * (t_0 / F)))) / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.2e-44], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.4e-120], N[(N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(B * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.5], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -5.2 \cdot 10^{-44}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-120}:\\
\;\;\;\;\sqrt{\frac{1}{t_0}} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(B \cdot F\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.5:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{t_0}{F}}}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5.1999999999999996e-44Initial program 62.9%
Taylor expanded in F around -inf 96.1%
expm1-log1p-u36.1%
expm1-udef36.1%
neg-mul-136.1%
fma-def36.1%
un-div-inv36.1%
Applied egg-rr36.1%
expm1-def36.1%
expm1-log1p96.1%
rem-log-exp38.6%
fma-udef38.6%
neg-mul-138.6%
prod-exp34.2%
*-commutative34.2%
prod-exp38.6%
rem-log-exp96.1%
unsub-neg96.1%
Simplified96.1%
if -5.1999999999999996e-44 < F < -1.39999999999999997e-120Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 92.8%
Taylor expanded in B around 0 86.5%
if -1.39999999999999997e-120 < F < 3.5Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 77.5%
mul-1-neg77.5%
Simplified77.5%
associate-/l*77.6%
tan-quot77.7%
un-div-inv77.5%
expm1-log1p-u50.7%
expm1-udef28.0%
un-div-inv28.0%
Applied egg-rr28.0%
expm1-def50.8%
expm1-log1p77.7%
Simplified77.7%
if 3.5 < F Initial program 52.8%
add-sqr-sqrt52.8%
unpow-prod-down52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
pow-sqr52.8%
metadata-eval52.8%
unpow-152.8%
fma-udef52.8%
fma-udef52.8%
unpow252.8%
associate-+r+52.8%
+-commutative52.8%
associate-+l+52.8%
unpow252.8%
+-commutative52.8%
unpow152.8%
sqr-pow39.4%
hypot-def75.0%
+-commutative75.0%
fma-def75.0%
metadata-eval75.0%
Simplified75.0%
associate-*l/86.4%
unpow1/286.4%
Applied egg-rr86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around inf 74.9%
Final simplification82.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= F -6.8e-47)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -1.9e-120)
(- (* (sqrt (/ 1.0 t_0)) (/ F B)) (/ x B))
(if (<= F 2.4)
(/ (- x) (tan B))
(- (/ (/ F (+ F (* 0.5 (/ t_0 F)))) (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -6.8e-47) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -1.9e-120) {
tmp = (sqrt((1.0 / t_0)) * (F / B)) - (x / B);
} else if (F <= 2.4) {
tmp = -x / tan(B);
} else {
tmp = ((F / (F + (0.5 * (t_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) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
if (f <= (-6.8d-47)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-1.9d-120)) then
tmp = (sqrt((1.0d0 / t_0)) * (f / b)) - (x / b)
else if (f <= 2.4d0) then
tmp = -x / tan(b)
else
tmp = ((f / (f + (0.5d0 * (t_0 / f)))) / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -6.8e-47) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -1.9e-120) {
tmp = (Math.sqrt((1.0 / t_0)) * (F / B)) - (x / B);
} else if (F <= 2.4) {
tmp = -x / Math.tan(B);
} else {
tmp = ((F / (F + (0.5 * (t_0 / F)))) / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) tmp = 0 if F <= -6.8e-47: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -1.9e-120: tmp = (math.sqrt((1.0 / t_0)) * (F / B)) - (x / B) elif F <= 2.4: tmp = -x / math.tan(B) else: tmp = ((F / (F + (0.5 * (t_0 / F)))) / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -6.8e-47) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -1.9e-120) tmp = Float64(Float64(sqrt(Float64(1.0 / t_0)) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.4) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(t_0 / F)))) / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -6.8e-47) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -1.9e-120) tmp = (sqrt((1.0 / t_0)) * (F / B)) - (x / B); elseif (F <= 2.4) tmp = -x / tan(B); else tmp = ((F / (F + (0.5 * (t_0 / F)))) / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-47], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.9e-120], N[(N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -1.9 \cdot 10^{-120}:\\
\;\;\;\;\sqrt{\frac{1}{t_0}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{t_0}{F}}}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.8000000000000003e-47Initial program 62.9%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 70.6%
if -6.8000000000000003e-47 < F < -1.8999999999999999e-120Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 92.8%
Taylor expanded in B around 0 86.4%
if -1.8999999999999999e-120 < F < 2.39999999999999991Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 77.5%
mul-1-neg77.5%
Simplified77.5%
associate-/l*77.6%
tan-quot77.7%
un-div-inv77.5%
expm1-log1p-u50.7%
expm1-udef28.0%
un-div-inv28.0%
Applied egg-rr28.0%
expm1-def50.8%
expm1-log1p77.7%
Simplified77.7%
if 2.39999999999999991 < F Initial program 52.8%
add-sqr-sqrt52.8%
unpow-prod-down52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
pow-sqr52.8%
metadata-eval52.8%
unpow-152.8%
fma-udef52.8%
fma-udef52.8%
unpow252.8%
associate-+r+52.8%
+-commutative52.8%
associate-+l+52.8%
unpow252.8%
+-commutative52.8%
unpow152.8%
sqr-pow39.4%
hypot-def75.0%
+-commutative75.0%
fma-def75.0%
metadata-eval75.0%
Simplified75.0%
associate-*l/86.4%
unpow1/286.4%
Applied egg-rr86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around inf 74.9%
Final simplification75.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))))
(if (<= F -1.15e-47)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -1.34e-120)
(-
(* (sqrt (/ 1.0 t_0)) (+ (/ F B) (* 0.16666666666666666 (* B F))))
(/ x B))
(if (<= F 3.9)
(/ (- x) (tan B))
(- (/ (/ F (+ F (* 0.5 (/ t_0 F)))) (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -1.15e-47) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -1.34e-120) {
tmp = (sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B);
} else if (F <= 3.9) {
tmp = -x / tan(B);
} else {
tmp = ((F / (F + (0.5 * (t_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) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
if (f <= (-1.15d-47)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-1.34d-120)) then
tmp = (sqrt((1.0d0 / t_0)) * ((f / b) + (0.16666666666666666d0 * (b * f)))) - (x / b)
else if (f <= 3.9d0) then
tmp = -x / tan(b)
else
tmp = ((f / (f + (0.5d0 * (t_0 / f)))) / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double tmp;
if (F <= -1.15e-47) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -1.34e-120) {
tmp = (Math.sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B);
} else if (F <= 3.9) {
tmp = -x / Math.tan(B);
} else {
tmp = ((F / (F + (0.5 * (t_0 / F)))) / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) tmp = 0 if F <= -1.15e-47: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -1.34e-120: tmp = (math.sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B) elif F <= 3.9: tmp = -x / math.tan(B) else: tmp = ((F / (F + (0.5 * (t_0 / F)))) / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) tmp = 0.0 if (F <= -1.15e-47) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -1.34e-120) tmp = Float64(Float64(sqrt(Float64(1.0 / t_0)) * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(B * F)))) - Float64(x / B)); elseif (F <= 3.9) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(0.5 * Float64(t_0 / F)))) / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); tmp = 0.0; if (F <= -1.15e-47) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -1.34e-120) tmp = (sqrt((1.0 / t_0)) * ((F / B) + (0.16666666666666666 * (B * F)))) - (x / B); elseif (F <= 3.9) tmp = -x / tan(B); else tmp = ((F / (F + (0.5 * (t_0 / F)))) / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.15e-47], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.34e-120], N[(N[(N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(B * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.9], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(0.5 * N[(t$95$0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
\mathbf{if}\;F \leq -1.15 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -1.34 \cdot 10^{-120}:\\
\;\;\;\;\sqrt{\frac{1}{t_0}} \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(B \cdot F\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.9:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + 0.5 \cdot \frac{t_0}{F}}}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.14999999999999991e-47Initial program 62.9%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 70.6%
if -1.14999999999999991e-47 < F < -1.34e-120Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 92.8%
Taylor expanded in B around 0 86.5%
if -1.34e-120 < F < 3.89999999999999991Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 77.5%
mul-1-neg77.5%
Simplified77.5%
associate-/l*77.6%
tan-quot77.7%
un-div-inv77.5%
expm1-log1p-u50.7%
expm1-udef28.0%
un-div-inv28.0%
Applied egg-rr28.0%
expm1-def50.8%
expm1-log1p77.7%
Simplified77.7%
if 3.89999999999999991 < F Initial program 52.8%
add-sqr-sqrt52.8%
unpow-prod-down52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
pow-sqr52.8%
metadata-eval52.8%
unpow-152.8%
fma-udef52.8%
fma-udef52.8%
unpow252.8%
associate-+r+52.8%
+-commutative52.8%
associate-+l+52.8%
unpow252.8%
+-commutative52.8%
unpow152.8%
sqr-pow39.4%
hypot-def75.0%
+-commutative75.0%
fma-def75.0%
metadata-eval75.0%
Simplified75.0%
associate-*l/86.4%
unpow1/286.4%
Applied egg-rr86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around inf 74.9%
Final simplification75.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.2e-48)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -7.8e-122)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(if (<= F 10.2) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-48) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -7.8e-122) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 10.2) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.2d-48)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-7.8d-122)) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else if (f <= 10.2d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e-48) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -7.8e-122) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 10.2) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2e-48: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -7.8e-122: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) elif F <= 10.2: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2e-48) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -7.8e-122) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); elseif (F <= 10.2) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.2e-48) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -7.8e-122) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); elseif (F <= 10.2) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2e-48], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.8e-122], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 10.2], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -7.8 \cdot 10^{-122}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10.2:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.2e-48Initial program 62.9%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 70.6%
if -1.2e-48 < F < -7.79999999999999979e-122Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 92.8%
Taylor expanded in B around 0 86.4%
if -7.79999999999999979e-122 < F < 10.199999999999999Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 77.5%
mul-1-neg77.5%
Simplified77.5%
associate-/l*77.6%
tan-quot77.7%
un-div-inv77.5%
expm1-log1p-u50.7%
expm1-udef28.0%
un-div-inv28.0%
Applied egg-rr28.0%
expm1-def50.8%
expm1-log1p77.7%
Simplified77.7%
if 10.199999999999999 < F Initial program 52.8%
add-sqr-sqrt52.8%
unpow-prod-down52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
pow-sqr52.8%
metadata-eval52.8%
unpow-152.8%
fma-udef52.8%
fma-udef52.8%
unpow252.8%
associate-+r+52.8%
+-commutative52.8%
associate-+l+52.8%
unpow252.8%
+-commutative52.8%
unpow152.8%
sqr-pow39.4%
hypot-def75.0%
+-commutative75.0%
fma-def75.0%
metadata-eval75.0%
Simplified75.0%
associate-*l/86.4%
unpow1/286.4%
Applied egg-rr86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around inf 74.4%
Final simplification75.2%
(FPCore (F B x)
:precision binary64
(if (<= F -0.028)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -9.4e-122)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.55) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.028) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -9.4e-122) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.55) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.028d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-9.4d-122)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.55d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.028) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -9.4e-122) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.55) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.028: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -9.4e-122: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.55: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.028) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -9.4e-122) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.55) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.028) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -9.4e-122) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.55) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.028], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -9.4e-122], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.028:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -9.4 \cdot 10^{-122}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.55:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0280000000000000006Initial program 59.6%
add-sqr-sqrt59.6%
unpow-prod-down59.6%
+-commutative59.6%
fma-def59.6%
fma-def59.6%
metadata-eval59.6%
metadata-eval59.6%
+-commutative59.6%
fma-def59.6%
fma-def59.6%
metadata-eval59.6%
metadata-eval59.6%
Applied egg-rr59.6%
pow-sqr59.6%
metadata-eval59.6%
unpow-159.6%
fma-udef59.6%
fma-udef59.6%
unpow259.6%
associate-+r+59.6%
+-commutative59.6%
associate-+l+59.6%
unpow259.6%
+-commutative59.6%
unpow159.6%
sqr-pow40.6%
hypot-def61.1%
+-commutative61.1%
fma-def61.1%
metadata-eval61.1%
Simplified61.1%
associate-*l/74.7%
unpow1/274.7%
Applied egg-rr74.7%
associate-*r/74.8%
*-rgt-identity74.8%
Simplified74.8%
Taylor expanded in B around 0 61.1%
Taylor expanded in F around -inf 70.8%
distribute-lft-in70.8%
mul-1-neg70.8%
unsub-neg70.8%
associate-*r/70.8%
metadata-eval70.8%
Simplified70.8%
if -0.0280000000000000006 < F < -9.3999999999999999e-122Initial program 99.7%
Taylor expanded in F around 0 98.3%
Taylor expanded in x around 0 98.1%
Taylor expanded in B around 0 69.8%
if -9.3999999999999999e-122 < F < 1.55000000000000004Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 77.5%
mul-1-neg77.5%
Simplified77.5%
associate-/l*77.6%
tan-quot77.7%
un-div-inv77.5%
expm1-log1p-u50.7%
expm1-udef28.0%
un-div-inv28.0%
Applied egg-rr28.0%
expm1-def50.8%
expm1-log1p77.7%
Simplified77.7%
if 1.55000000000000004 < F Initial program 52.8%
add-sqr-sqrt52.8%
unpow-prod-down52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
pow-sqr52.8%
metadata-eval52.8%
unpow-152.8%
fma-udef52.8%
fma-udef52.8%
unpow252.8%
associate-+r+52.8%
+-commutative52.8%
associate-+l+52.8%
unpow252.8%
+-commutative52.8%
unpow152.8%
sqr-pow39.4%
hypot-def75.0%
+-commutative75.0%
fma-def75.0%
metadata-eval75.0%
Simplified75.0%
associate-*l/86.4%
unpow1/286.4%
Applied egg-rr86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around inf 74.4%
Final simplification74.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1.12e-46)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(if (<= F -1.9e-120)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 2400.0) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-46) {
tmp = (-1.0 / B) - (x * (1.0 / tan(B)));
} else if (F <= -1.9e-120) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 2400.0) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.12d-46)) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / tan(b)))
else if (f <= (-1.9d-120)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 2400.0d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.12e-46) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else if (F <= -1.9e-120) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 2400.0) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.12e-46: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) elif F <= -1.9e-120: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 2400.0: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.12e-46) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= -1.9e-120) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 2400.0) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.12e-46) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); elseif (F <= -1.9e-120) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 2400.0) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.12e-46], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.9e-120], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2400.0], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.12 \cdot 10^{-46}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq -1.9 \cdot 10^{-120}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2400:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.11999999999999997e-46Initial program 62.9%
Taylor expanded in F around -inf 96.1%
Taylor expanded in B around 0 70.6%
if -1.11999999999999997e-46 < F < -1.8999999999999999e-120Initial program 99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.4%
Taylor expanded in B around 0 86.2%
if -1.8999999999999999e-120 < F < 2400Initial program 99.4%
Taylor expanded in F around -inf 40.3%
Taylor expanded in x around inf 77.5%
mul-1-neg77.5%
Simplified77.5%
associate-/l*77.6%
tan-quot77.7%
un-div-inv77.5%
expm1-log1p-u50.7%
expm1-udef28.0%
un-div-inv28.0%
Applied egg-rr28.0%
expm1-def50.8%
expm1-log1p77.7%
Simplified77.7%
if 2400 < F Initial program 52.8%
add-sqr-sqrt52.8%
unpow-prod-down52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
pow-sqr52.8%
metadata-eval52.8%
unpow-152.8%
fma-udef52.8%
fma-udef52.8%
unpow252.8%
associate-+r+52.8%
+-commutative52.8%
associate-+l+52.8%
unpow252.8%
+-commutative52.8%
unpow152.8%
sqr-pow39.4%
hypot-def75.0%
+-commutative75.0%
fma-def75.0%
metadata-eval75.0%
Simplified75.0%
associate-*l/86.4%
unpow1/286.4%
Applied egg-rr86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around inf 74.4%
Final simplification75.2%
(FPCore (F B x) :precision binary64 (if (<= F -9.2e-32) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 3.2) (/ (- x) (tan B)) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.2e-32) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.2) {
tmp = -x / tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.2d-32)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.2d0) then
tmp = -x / tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.2e-32) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.2) {
tmp = -x / Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.2e-32: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.2: tmp = -x / math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.2e-32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.2) tmp = Float64(Float64(-x) / tan(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.2e-32) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.2) tmp = -x / tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.2e-32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.2:\\
\;\;\;\;\frac{-x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -9.2000000000000002e-32Initial program 61.8%
add-sqr-sqrt61.8%
unpow-prod-down61.8%
+-commutative61.8%
fma-def61.8%
fma-def61.8%
metadata-eval61.8%
metadata-eval61.8%
+-commutative61.8%
fma-def61.8%
fma-def61.8%
metadata-eval61.8%
metadata-eval61.8%
Applied egg-rr61.8%
pow-sqr61.8%
metadata-eval61.8%
unpow-161.8%
fma-udef61.8%
fma-udef61.8%
unpow261.8%
associate-+r+61.8%
+-commutative61.8%
associate-+l+61.8%
unpow261.8%
+-commutative61.8%
unpow161.8%
sqr-pow43.8%
hypot-def63.2%
+-commutative63.2%
fma-def63.2%
metadata-eval63.2%
Simplified63.2%
associate-*l/76.1%
unpow1/276.1%
Applied egg-rr76.1%
associate-*r/76.2%
*-rgt-identity76.2%
Simplified76.2%
Taylor expanded in B around 0 63.3%
Taylor expanded in F around -inf 68.6%
distribute-lft-in68.6%
mul-1-neg68.6%
unsub-neg68.6%
associate-*r/68.6%
metadata-eval68.6%
Simplified68.6%
if -9.2000000000000002e-32 < F < 3.2000000000000002Initial program 99.5%
Taylor expanded in F around -inf 40.5%
Taylor expanded in x around inf 73.2%
mul-1-neg73.2%
Simplified73.2%
associate-/l*73.2%
tan-quot73.3%
un-div-inv73.2%
expm1-log1p-u46.5%
expm1-udef26.9%
un-div-inv26.9%
Applied egg-rr26.9%
expm1-def46.6%
expm1-log1p73.3%
Simplified73.3%
if 3.2000000000000002 < F Initial program 52.8%
add-sqr-sqrt52.8%
unpow-prod-down52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
+-commutative52.6%
fma-def52.6%
fma-def52.6%
metadata-eval52.6%
metadata-eval52.6%
Applied egg-rr52.6%
pow-sqr52.8%
metadata-eval52.8%
unpow-152.8%
fma-udef52.8%
fma-udef52.8%
unpow252.8%
associate-+r+52.8%
+-commutative52.8%
associate-+l+52.8%
unpow252.8%
+-commutative52.8%
unpow152.8%
sqr-pow39.4%
hypot-def75.0%
+-commutative75.0%
fma-def75.0%
metadata-eval75.0%
Simplified75.0%
associate-*l/86.4%
unpow1/286.4%
Applied egg-rr86.4%
associate-*r/86.4%
*-rgt-identity86.4%
Simplified86.4%
Taylor expanded in B around 0 72.6%
Taylor expanded in F around inf 74.4%
Final simplification72.3%
(FPCore (F B x) :precision binary64 (if (<= F -9.2e-32) (- (/ -1.0 (sin B)) (/ x B)) (/ (- x) (tan B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.2e-32) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = -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 <= (-9.2d-32)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = -x / tan(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.2e-32) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = -x / Math.tan(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.2e-32: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = -x / math.tan(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.2e-32) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(-x) / tan(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.2e-32) tmp = (-1.0 / sin(B)) - (x / B); else tmp = -x / tan(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.2e-32], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.2 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\tan B}\\
\end{array}
\end{array}
if F < -9.2000000000000002e-32Initial program 61.8%
add-sqr-sqrt61.8%
unpow-prod-down61.8%
+-commutative61.8%
fma-def61.8%
fma-def61.8%
metadata-eval61.8%
metadata-eval61.8%
+-commutative61.8%
fma-def61.8%
fma-def61.8%
metadata-eval61.8%
metadata-eval61.8%
Applied egg-rr61.8%
pow-sqr61.8%
metadata-eval61.8%
unpow-161.8%
fma-udef61.8%
fma-udef61.8%
unpow261.8%
associate-+r+61.8%
+-commutative61.8%
associate-+l+61.8%
unpow261.8%
+-commutative61.8%
unpow161.8%
sqr-pow43.8%
hypot-def63.2%
+-commutative63.2%
fma-def63.2%
metadata-eval63.2%
Simplified63.2%
associate-*l/76.1%
unpow1/276.1%
Applied egg-rr76.1%
associate-*r/76.2%
*-rgt-identity76.2%
Simplified76.2%
Taylor expanded in B around 0 63.3%
Taylor expanded in F around -inf 68.6%
distribute-lft-in68.6%
mul-1-neg68.6%
unsub-neg68.6%
associate-*r/68.6%
metadata-eval68.6%
Simplified68.6%
if -9.2000000000000002e-32 < F Initial program 82.5%
Taylor expanded in F around -inf 37.1%
Taylor expanded in x around inf 58.6%
mul-1-neg58.6%
Simplified58.6%
associate-/l*58.6%
tan-quot58.6%
un-div-inv58.5%
expm1-log1p-u35.4%
expm1-udef22.8%
un-div-inv22.8%
Applied egg-rr22.8%
expm1-def35.4%
expm1-log1p58.6%
Simplified58.6%
Final simplification61.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.3e-42) (/ (- -1.0 x) B) (/ (- x) (sin B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-42) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / 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.3d-42)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.3e-42) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.3e-42: tmp = (-1.0 - x) / B else: tmp = -x / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.3e-42) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.3e-42) tmp = (-1.0 - x) / B; else tmp = -x / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.3e-42], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.3 \cdot 10^{-42}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{\sin B}\\
\end{array}
\end{array}
if F < -1.3e-42Initial program 62.4%
Taylor expanded in F around -inf 96.0%
Taylor expanded in B around 0 44.2%
associate-*r/44.2%
distribute-lft-in44.2%
metadata-eval44.2%
neg-mul-144.2%
Simplified44.2%
Taylor expanded in B around 0 44.2%
associate-*r/44.2%
distribute-lft-in44.2%
metadata-eval44.2%
neg-mul-144.2%
sub-neg44.2%
Simplified44.2%
if -1.3e-42 < F Initial program 82.4%
Taylor expanded in F around -inf 36.8%
Taylor expanded in x around inf 58.3%
mul-1-neg58.3%
Simplified58.3%
Taylor expanded in B around 0 28.8%
Final simplification33.2%
(FPCore (F B x) :precision binary64 (/ (- x) (tan B)))
double code(double F, double B, double x) {
return -x / tan(B);
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / tan(b)
end function
public static double code(double F, double B, double x) {
return -x / Math.tan(B);
}
def code(F, B, x): return -x / math.tan(B)
function code(F, B, x) return Float64(Float64(-x) / tan(B)) end
function tmp = code(F, B, x) tmp = -x / tan(B); end
code[F_, B_, x_] := N[((-x) / N[Tan[B], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{\tan B}
\end{array}
Initial program 76.7%
Taylor expanded in F around -inf 53.7%
Taylor expanded in x around inf 55.6%
mul-1-neg55.6%
Simplified55.6%
associate-/l*55.6%
tan-quot55.7%
un-div-inv55.6%
expm1-log1p-u32.2%
expm1-udef23.1%
un-div-inv23.1%
Applied egg-rr23.1%
expm1-def32.2%
expm1-log1p55.7%
Simplified55.7%
Final simplification55.7%
(FPCore (F B x) :precision binary64 (if (<= F -6.5e-74) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-74) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.5d-74)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-74) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e-74: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e-74) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.5e-74) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e-74], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -6.5000000000000002e-74Initial program 64.7%
Taylor expanded in F around -inf 91.5%
Taylor expanded in B around 0 41.7%
associate-*r/41.7%
distribute-lft-in41.7%
metadata-eval41.7%
neg-mul-141.7%
Simplified41.7%
Taylor expanded in B around 0 41.7%
associate-*r/41.7%
distribute-lft-in41.7%
metadata-eval41.7%
neg-mul-141.7%
sub-neg41.7%
Simplified41.7%
if -6.5000000000000002e-74 < F Initial program 81.9%
Taylor expanded in F around -inf 37.1%
Taylor expanded in B around 0 15.5%
associate-*r/15.5%
distribute-lft-in15.5%
metadata-eval15.5%
neg-mul-115.5%
Simplified15.5%
Taylor expanded in x around inf 26.5%
mul-1-neg26.5%
distribute-frac-neg26.5%
Simplified26.5%
Final simplification31.1%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 76.7%
Taylor expanded in F around -inf 53.7%
Taylor expanded in B around 0 23.5%
associate-*r/23.5%
distribute-lft-in23.5%
metadata-eval23.5%
neg-mul-123.5%
Simplified23.5%
Taylor expanded in x around inf 24.9%
mul-1-neg24.9%
distribute-frac-neg24.9%
Simplified24.9%
Final simplification24.9%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 76.7%
Taylor expanded in F around -inf 53.7%
Taylor expanded in B around 0 23.5%
associate-*r/23.5%
distribute-lft-in23.5%
metadata-eval23.5%
neg-mul-123.5%
Simplified23.5%
Taylor expanded in x around 0 9.7%
Final simplification9.7%
herbie shell --seed 2023292
(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))))))