
(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 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.9e+34)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 140000.0)
(- (/ (/ F (sin B)) (hypot F (sqrt (fma 2.0 x 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.9e+34) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 140000.0) {
tmp = ((F / sin(B)) / hypot(F, sqrt(fma(2.0, x, 2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.9e+34) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 140000.0) tmp = Float64(Float64(Float64(F / sin(B)) / hypot(F, sqrt(fma(2.0, x, 2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.9e+34], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 140000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.9 \cdot 10^{+34}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 140000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.90000000000000037e34Initial program 54.3%
Taylor expanded in F around -inf 99.7%
if -6.90000000000000037e34 < F < 1.4e5Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
expm1-log1p-u88.9%
expm1-udef65.5%
un-div-inv65.5%
div-inv65.5%
pow-flip65.5%
metadata-eval65.5%
pow1/265.5%
fma-udef65.5%
add-sqr-sqrt65.5%
hypot-def65.5%
Applied egg-rr65.5%
expm1-def89.0%
expm1-log1p99.6%
associate-/r*99.7%
Simplified99.7%
if 1.4e5 < F Initial program 56.4%
+-commutative56.4%
unsub-neg56.4%
associate-*l/78.7%
associate-*r/78.6%
*-commutative78.6%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
+-commutative78.7%
associate-+r+78.7%
+-commutative78.7%
+-commutative78.7%
unpow278.7%
fma-def78.7%
+-commutative78.7%
fma-def78.7%
Simplified78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= x -1.0)
(- (/ -1.0 (sin B)) t_0)
(- (* F (/ (/ 1.0 (hypot F (sqrt (fma 2.0 x 2.0)))) (sin B))) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (x <= -1.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else {
tmp = (F * ((1.0 / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B))) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); else tmp = Float64(Float64(F * Float64(Float64(1.0 / hypot(F, sqrt(fma(2.0, x, 2.0)))) / sin(B))) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F * N[(N[(1.0 / N[Sqrt[F ^ 2 + N[Sqrt[N[(2.0 * x + 2.0), $MachinePrecision]], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{\frac{1}{\mathsf{hypot}\left(F, \sqrt{\mathsf{fma}\left(2, x, 2\right)}\right)}}{\sin B} - t_0\\
\end{array}
\end{array}
if x < -1Initial program 56.3%
+-commutative56.3%
unsub-neg56.3%
associate-*l/96.3%
associate-*r/96.3%
*-commutative96.3%
Simplified96.4%
clear-num96.4%
inv-pow96.4%
fma-def96.4%
fma-udef96.4%
*-commutative96.4%
fma-def96.4%
fma-def96.4%
Applied egg-rr96.4%
unpow-196.4%
fma-udef96.4%
fma-udef96.4%
unpow296.4%
+-commutative96.4%
associate-+r+96.4%
+-commutative96.4%
+-commutative96.4%
unpow296.4%
fma-def96.4%
+-commutative96.4%
fma-def96.4%
Simplified96.4%
Taylor expanded in F around -inf 99.8%
if -1 < x Initial program 75.3%
+-commutative75.3%
unsub-neg75.3%
associate-*l/81.9%
associate-*r/81.8%
*-commutative81.8%
Simplified81.9%
clear-num81.9%
inv-pow81.9%
fma-def81.9%
fma-udef81.9%
*-commutative81.9%
fma-def81.9%
fma-def81.9%
Applied egg-rr81.9%
unpow-181.9%
fma-udef81.9%
fma-udef81.9%
unpow281.9%
+-commutative81.9%
associate-+r+81.9%
+-commutative81.9%
+-commutative81.9%
unpow281.9%
fma-def81.9%
+-commutative81.9%
fma-def81.9%
Simplified81.9%
inv-pow81.9%
div-inv81.9%
unpow-prod-down81.9%
inv-pow81.9%
pow-flip81.9%
metadata-eval81.9%
pow1/281.9%
fma-udef81.9%
add-sqr-sqrt81.9%
hypot-def99.6%
Applied egg-rr99.6%
associate-*l/99.6%
*-lft-identity99.6%
unpow-199.6%
Simplified99.6%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ -1.0 (tan B)))))
(if (<= F -5.8e+16)
(+ (/ -1.0 (sin B)) t_0)
(if (<= F 140000.0)
(+ t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double t_0 = x * (-1.0 / tan(B));
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / sin(B)) + t_0;
} else if (F <= 140000.0) {
tmp = t_0 + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * ((-1.0d0) / tan(b))
if (f <= (-5.8d+16)) then
tmp = ((-1.0d0) / sin(b)) + t_0
else if (f <= 140000.0d0) then
tmp = t_0 + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-1.0 / Math.tan(B));
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / Math.sin(B)) + t_0;
} else if (F <= 140000.0) {
tmp = t_0 + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = x * (-1.0 / math.tan(B)) tmp = 0 if F <= -5.8e+16: tmp = (-1.0 / math.sin(B)) + t_0 elif F <= 140000.0: tmp = t_0 + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(x * Float64(-1.0 / tan(B))) tmp = 0.0 if (F <= -5.8e+16) tmp = Float64(Float64(-1.0 / sin(B)) + t_0); elseif (F <= 140000.0) tmp = Float64(t_0 + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-1.0 / tan(B)); tmp = 0.0; if (F <= -5.8e+16) tmp = (-1.0 / sin(B)) + t_0; elseif (F <= 140000.0) tmp = t_0 + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[F, 140000.0], N[(t$95$0 + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + t_0\\
\mathbf{elif}\;F \leq 140000:\\
\;\;\;\;t_0 + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.8e16Initial program 55.6%
Taylor expanded in F around -inf 99.7%
if -5.8e16 < F < 1.4e5Initial program 99.4%
if 1.4e5 < F Initial program 56.4%
+-commutative56.4%
unsub-neg56.4%
associate-*l/78.7%
associate-*r/78.6%
*-commutative78.6%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
+-commutative78.7%
associate-+r+78.7%
+-commutative78.7%
+-commutative78.7%
unpow278.7%
fma-def78.7%
+-commutative78.7%
fma-def78.7%
Simplified78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.4e+17)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 140000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e+17) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 140000.0) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.4d+17)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 140000.0d0) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e+17) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 140000.0) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e+17: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 140000.0: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e+17) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 140000.0) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.4e+17) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 140000.0) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 140000.0], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 140000:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.4e17Initial program 55.6%
Taylor expanded in F around -inf 99.7%
if -1.4e17 < F < 1.4e5Initial program 99.4%
div-inv77.0%
clear-num76.9%
Applied egg-rr99.5%
if 1.4e5 < F Initial program 56.4%
+-commutative56.4%
unsub-neg56.4%
associate-*l/78.7%
associate-*r/78.6%
*-commutative78.6%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
+-commutative78.7%
associate-+r+78.7%
+-commutative78.7%
+-commutative78.7%
unpow278.7%
fma-def78.7%
+-commutative78.7%
fma-def78.7%
Simplified78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -1.45)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 1.42)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 1.42) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-1.45d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 1.42d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.45) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 1.42) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.45: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 1.42: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.45) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 1.42) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \left(t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 - t_1\\
\end{array}
\end{array}
if F < -1.44999999999999996Initial program 58.0%
Taylor expanded in F around -inf 99.0%
if -1.44999999999999996 < F < 1.4199999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
Taylor expanded in F around 0 99.0%
if 1.4199999999999999 < F Initial program 56.4%
+-commutative56.4%
unsub-neg56.4%
associate-*l/78.7%
associate-*r/78.6%
*-commutative78.6%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
+-commutative78.7%
associate-+r+78.7%
+-commutative78.7%
+-commutative78.7%
unpow278.7%
fma-def78.7%
+-commutative78.7%
fma-def78.7%
Simplified78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 1.42)
(- (* F (/ 1.0 (* (sin B) (sqrt 2.0)))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 1.42) {
tmp = (F * (1.0 / (sin(B) * sqrt(2.0)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 1.42d0) then
tmp = (f * (1.0d0 / (sin(b) * sqrt(2.0d0)))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 1.42) {
tmp = (F * (1.0 / (Math.sin(B) * Math.sqrt(2.0)))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 1.42: tmp = (F * (1.0 / (math.sin(B) * math.sqrt(2.0)))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) * sqrt(2.0)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 1.42) tmp = (F * (1.0 / (sin(B) * sqrt(2.0)))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{1}{\sin B \cdot \sqrt{2}} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 58.0%
Taylor expanded in F around -inf 99.0%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.0%
if 1.4199999999999999 < F Initial program 56.4%
+-commutative56.4%
unsub-neg56.4%
associate-*l/78.7%
associate-*r/78.6%
*-commutative78.6%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
+-commutative78.7%
associate-+r+78.7%
+-commutative78.7%
+-commutative78.7%
unpow278.7%
fma-def78.7%
+-commutative78.7%
fma-def78.7%
Simplified78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 1.42)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 1.42) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 1.42d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 1.42: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 1.42) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 58.0%
Taylor expanded in F around -inf 99.0%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.4%
*-commutative99.4%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.0%
if 1.4199999999999999 < F Initial program 56.4%
+-commutative56.4%
unsub-neg56.4%
associate-*l/78.7%
associate-*r/78.6%
*-commutative78.6%
Simplified78.7%
clear-num78.7%
inv-pow78.7%
fma-def78.7%
fma-udef78.7%
*-commutative78.7%
fma-def78.7%
fma-def78.7%
Applied egg-rr78.7%
unpow-178.7%
fma-udef78.7%
fma-udef78.7%
unpow278.7%
+-commutative78.7%
associate-+r+78.7%
+-commutative78.7%
+-commutative78.7%
unpow278.7%
fma-def78.7%
+-commutative78.7%
fma-def78.7%
Simplified78.7%
Taylor expanded in F around inf 99.8%
Final simplification99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -5.8e+16)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F -1.25e-42)
t_0
(if (<= F -6.4e-74)
(- (/ -1.0 B) t_1)
(if (<= F -2.9e-174)
t_0
(if (<= F 6.6e-140)
(/ (- (cos B)) (/ (sin B) x))
(if (<= F 4.7e-20) t_0 (- (/ 1.0 (sin B)) t_1)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= -1.25e-42) {
tmp = t_0;
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.9e-174) {
tmp = t_0;
} else if (F <= 6.6e-140) {
tmp = -cos(B) / (sin(B) / x);
} else if (F <= 4.7e-20) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-5.8d+16)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= (-1.25d-42)) then
tmp = t_0
else if (f <= (-6.4d-74)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-2.9d-174)) then
tmp = t_0
else if (f <= 6.6d-140) then
tmp = -cos(b) / (sin(b) / x)
else if (f <= 4.7d-20) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= -1.25e-42) {
tmp = t_0;
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -2.9e-174) {
tmp = t_0;
} else if (F <= 6.6e-140) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else if (F <= 4.7e-20) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -5.8e+16: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= -1.25e-42: tmp = t_0 elif F <= -6.4e-74: tmp = (-1.0 / B) - t_1 elif F <= -2.9e-174: tmp = t_0 elif F <= 6.6e-140: tmp = -math.cos(B) / (math.sin(B) / x) elif F <= 4.7e-20: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.8e+16) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= -1.25e-42) tmp = t_0; elseif (F <= -6.4e-74) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -2.9e-174) tmp = t_0; elseif (F <= 6.6e-140) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); elseif (F <= 4.7e-20) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -5.8e+16) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= -1.25e-42) tmp = t_0; elseif (F <= -6.4e-74) tmp = (-1.0 / B) - t_1; elseif (F <= -2.9e-174) tmp = t_0; elseif (F <= 6.6e-140) tmp = -cos(B) / (sin(B) / x); elseif (F <= 4.7e-20) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-42], t$95$0, If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.9e-174], t$95$0, If[LessEqual[F, 6.6e-140], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-42}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6.6 \cdot 10^{-140}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -5.8e16Initial program 55.6%
Taylor expanded in F around -inf 99.7%
if -5.8e16 < F < -1.25000000000000001e-42 or -6.3999999999999997e-74 < F < -2.9000000000000001e-174 or 6.59999999999999975e-140 < F < 4.70000000000000015e-20Initial program 99.2%
Taylor expanded in B around 0 83.3%
if -1.25000000000000001e-42 < F < -6.3999999999999997e-74Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.8%
Taylor expanded in F around -inf 86.6%
Taylor expanded in B around 0 97.2%
if -2.9000000000000001e-174 < F < 6.59999999999999975e-140Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.8%
clear-num99.7%
inv-pow99.7%
fma-def99.7%
fma-udef99.7%
*-commutative99.7%
fma-def99.7%
fma-def99.7%
Applied egg-rr99.7%
unpow-199.7%
fma-udef99.7%
fma-udef99.7%
unpow299.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
+-commutative99.7%
unpow299.7%
fma-def99.7%
+-commutative99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in F around 0 99.8%
Taylor expanded in F around 0 88.8%
mul-1-neg88.8%
associate-/l*88.8%
distribute-neg-frac88.8%
Simplified88.8%
if 4.70000000000000015e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
clear-num80.0%
inv-pow80.0%
fma-def80.0%
fma-udef80.0%
*-commutative80.0%
fma-def80.0%
fma-def80.0%
Applied egg-rr80.0%
unpow-180.0%
fma-udef80.0%
fma-udef80.0%
unpow280.0%
+-commutative80.0%
associate-+r+80.0%
+-commutative80.0%
+-commutative80.0%
unpow280.0%
fma-def80.0%
+-commutative80.0%
fma-def80.0%
Simplified80.0%
Taylor expanded in F around inf 97.8%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (* x (/ -1.0 (tan B))))
(t_2 (- (* (/ F (sin B)) t_0) (/ x B)))
(t_3 (/ x (tan B))))
(if (<= F -5.8e+16)
(+ (/ -1.0 (sin B)) t_1)
(if (<= F -7.5e-45)
t_2
(if (<= F -6.4e-74)
(- (/ -1.0 B) t_3)
(if (<= F -1.7e-174)
t_2
(if (<= F 1.2e-141)
(+ t_1 (* t_0 (/ F B)))
(if (<= F 4.7e-20) t_2 (- (/ 1.0 (sin B)) t_3)))))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x * (-1.0 / tan(B));
double t_2 = ((F / sin(B)) * t_0) - (x / B);
double t_3 = x / tan(B);
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / sin(B)) + t_1;
} else if (F <= -7.5e-45) {
tmp = t_2;
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_3;
} else if (F <= -1.7e-174) {
tmp = t_2;
} else if (F <= 1.2e-141) {
tmp = t_1 + (t_0 * (F / B));
} else if (F <= 4.7e-20) {
tmp = t_2;
} else {
tmp = (1.0 / sin(B)) - t_3;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x * ((-1.0d0) / tan(b))
t_2 = ((f / sin(b)) * t_0) - (x / b)
t_3 = x / tan(b)
if (f <= (-5.8d+16)) then
tmp = ((-1.0d0) / sin(b)) + t_1
else if (f <= (-7.5d-45)) then
tmp = t_2
else if (f <= (-6.4d-74)) then
tmp = ((-1.0d0) / b) - t_3
else if (f <= (-1.7d-174)) then
tmp = t_2
else if (f <= 1.2d-141) then
tmp = t_1 + (t_0 * (f / b))
else if (f <= 4.7d-20) then
tmp = t_2
else
tmp = (1.0d0 / sin(b)) - t_3
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);
double t_1 = x * (-1.0 / Math.tan(B));
double t_2 = ((F / Math.sin(B)) * t_0) - (x / B);
double t_3 = x / Math.tan(B);
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / Math.sin(B)) + t_1;
} else if (F <= -7.5e-45) {
tmp = t_2;
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_3;
} else if (F <= -1.7e-174) {
tmp = t_2;
} else if (F <= 1.2e-141) {
tmp = t_1 + (t_0 * (F / B));
} else if (F <= 4.7e-20) {
tmp = t_2;
} else {
tmp = (1.0 / Math.sin(B)) - t_3;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x * (-1.0 / math.tan(B)) t_2 = ((F / math.sin(B)) * t_0) - (x / B) t_3 = x / math.tan(B) tmp = 0 if F <= -5.8e+16: tmp = (-1.0 / math.sin(B)) + t_1 elif F <= -7.5e-45: tmp = t_2 elif F <= -6.4e-74: tmp = (-1.0 / B) - t_3 elif F <= -1.7e-174: tmp = t_2 elif F <= 1.2e-141: tmp = t_1 + (t_0 * (F / B)) elif F <= 4.7e-20: tmp = t_2 else: tmp = (1.0 / math.sin(B)) - t_3 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x * Float64(-1.0 / tan(B))) t_2 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)) t_3 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.8e+16) tmp = Float64(Float64(-1.0 / sin(B)) + t_1); elseif (F <= -7.5e-45) tmp = t_2; elseif (F <= -6.4e-74) tmp = Float64(Float64(-1.0 / B) - t_3); elseif (F <= -1.7e-174) tmp = t_2; elseif (F <= 1.2e-141) tmp = Float64(t_1 + Float64(t_0 * Float64(F / B))); elseif (F <= 4.7e-20) tmp = t_2; else tmp = Float64(Float64(1.0 / sin(B)) - t_3); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x * (-1.0 / tan(B)); t_2 = ((F / sin(B)) * t_0) - (x / B); t_3 = x / tan(B); tmp = 0.0; if (F <= -5.8e+16) tmp = (-1.0 / sin(B)) + t_1; elseif (F <= -7.5e-45) tmp = t_2; elseif (F <= -6.4e-74) tmp = (-1.0 / B) - t_3; elseif (F <= -1.7e-174) tmp = t_2; elseif (F <= 1.2e-141) tmp = t_1 + (t_0 * (F / B)); elseif (F <= 4.7e-20) tmp = t_2; else tmp = (1.0 / sin(B)) - t_3; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[F, -7.5e-45], t$95$2, If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[F, -1.7e-174], t$95$2, If[LessEqual[F, 1.2e-141], N[(t$95$1 + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], t$95$2, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := x \cdot \frac{-1}{\tan B}\\
t_2 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
t_3 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + t_1\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_3\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-174}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-141}:\\
\;\;\;\;t_1 + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_3\\
\end{array}
\end{array}
if F < -5.8e16Initial program 55.6%
Taylor expanded in F around -inf 99.7%
if -5.8e16 < F < -7.5000000000000006e-45 or -6.3999999999999997e-74 < F < -1.7000000000000001e-174 or 1.2e-141 < F < 4.70000000000000015e-20Initial program 99.2%
Taylor expanded in B around 0 83.3%
if -7.5000000000000006e-45 < F < -6.3999999999999997e-74Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.8%
Taylor expanded in F around -inf 86.6%
Taylor expanded in B around 0 97.2%
if -1.7000000000000001e-174 < F < 1.2e-141Initial program 99.5%
Taylor expanded in B around 0 93.3%
if 4.70000000000000015e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
clear-num80.0%
inv-pow80.0%
fma-def80.0%
fma-udef80.0%
*-commutative80.0%
fma-def80.0%
fma-def80.0%
Applied egg-rr80.0%
unpow-180.0%
fma-udef80.0%
fma-udef80.0%
unpow280.0%
+-commutative80.0%
associate-+r+80.0%
+-commutative80.0%
+-commutative80.0%
unpow280.0%
fma-def80.0%
+-commutative80.0%
fma-def80.0%
Simplified80.0%
Taylor expanded in F around inf 97.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -5.8e+16)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F -7.5e-45)
t_1
(if (<= F -6.4e-74)
(- (/ -1.0 B) t_2)
(if (<= F -2.8e-174)
t_1
(if (<= F 3e-137)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 3.3e-20) t_1 (- (/ 1.0 (sin B)) t_2)))))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = ((F / sin(B)) * t_0) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= -7.5e-45) {
tmp = t_1;
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -2.8e-174) {
tmp = t_1;
} else if (F <= 3e-137) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 3.3e-20) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = ((f / sin(b)) * t_0) - (x / b)
t_2 = x / tan(b)
if (f <= (-5.8d+16)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= (-7.5d-45)) then
tmp = t_1
else if (f <= (-6.4d-74)) then
tmp = ((-1.0d0) / b) - t_2
else if (f <= (-2.8d-174)) then
tmp = t_1
else if (f <= 3d-137) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 3.3d-20) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
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);
double t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -5.8e+16) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= -7.5e-45) {
tmp = t_1;
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -2.8e-174) {
tmp = t_1;
} else if (F <= 3e-137) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 3.3e-20) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = ((F / math.sin(B)) * t_0) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -5.8e+16: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= -7.5e-45: tmp = t_1 elif F <= -6.4e-74: tmp = (-1.0 / B) - t_2 elif F <= -2.8e-174: tmp = t_1 elif F <= 3e-137: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 3.3e-20: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.8e+16) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= -7.5e-45) tmp = t_1; elseif (F <= -6.4e-74) tmp = Float64(Float64(-1.0 / B) - t_2); elseif (F <= -2.8e-174) tmp = t_1; elseif (F <= 3e-137) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 3.3e-20) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = ((F / sin(B)) * t_0) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -5.8e+16) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= -7.5e-45) tmp = t_1; elseif (F <= -6.4e-74) tmp = (-1.0 / B) - t_2; elseif (F <= -2.8e-174) tmp = t_1; elseif (F <= 3e-137) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 3.3e-20) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+16], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-45], t$95$1, If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -2.8e-174], t$95$1, If[LessEqual[F, 3e-137], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-20], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_2\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-137}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\
\end{array}
\end{array}
if F < -5.8e16Initial program 55.6%
Taylor expanded in F around -inf 99.7%
if -5.8e16 < F < -7.5000000000000006e-45 or -6.3999999999999997e-74 < F < -2.79999999999999999e-174 or 2.9999999999999998e-137 < F < 3.3e-20Initial program 99.2%
Taylor expanded in B around 0 83.3%
if -7.5000000000000006e-45 < F < -6.3999999999999997e-74Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.8%
Taylor expanded in F around -inf 86.6%
Taylor expanded in B around 0 97.2%
if -2.79999999999999999e-174 < F < 2.9999999999999998e-137Initial program 99.5%
Taylor expanded in B around 0 93.3%
div-inv93.5%
clear-num93.3%
Applied egg-rr93.3%
if 3.3e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
clear-num80.0%
inv-pow80.0%
fma-def80.0%
fma-udef80.0%
*-commutative80.0%
fma-def80.0%
fma-def80.0%
Applied egg-rr80.0%
unpow-180.0%
fma-udef80.0%
fma-udef80.0%
unpow280.0%
+-commutative80.0%
associate-+r+80.0%
+-commutative80.0%
+-commutative80.0%
unpow280.0%
fma-def80.0%
+-commutative80.0%
fma-def80.0%
Simplified80.0%
Taylor expanded in F around inf 97.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (- (* (/ F (sin B)) t_0) (/ x B)))
(t_2 (/ x (tan B))))
(if (<= F -850000.0)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F -7.5e-45)
(- (* t_0 (/ 1.0 (/ (sin B) F))) (/ x B))
(if (<= F -6.4e-74)
(- (/ -1.0 B) t_2)
(if (<= F -2.9e-174)
t_1
(if (<= F 1.7e-138)
(+ (/ -1.0 (/ (tan B) x)) (* t_0 (/ F B)))
(if (<= F 4.7e-20) t_1 (- (/ 1.0 (sin B)) t_2)))))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = ((F / sin(B)) * t_0) - (x / B);
double t_2 = x / tan(B);
double tmp;
if (F <= -850000.0) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= -7.5e-45) {
tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B);
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -2.9e-174) {
tmp = t_1;
} else if (F <= 1.7e-138) {
tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 4.7e-20) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = ((f / sin(b)) * t_0) - (x / b)
t_2 = x / tan(b)
if (f <= (-850000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= (-7.5d-45)) then
tmp = (t_0 * (1.0d0 / (sin(b) / f))) - (x / b)
else if (f <= (-6.4d-74)) then
tmp = ((-1.0d0) / b) - t_2
else if (f <= (-2.9d-174)) then
tmp = t_1
else if (f <= 1.7d-138) then
tmp = ((-1.0d0) / (tan(b) / x)) + (t_0 * (f / b))
else if (f <= 4.7d-20) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - t_2
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);
double t_1 = ((F / Math.sin(B)) * t_0) - (x / B);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -850000.0) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= -7.5e-45) {
tmp = (t_0 * (1.0 / (Math.sin(B) / F))) - (x / B);
} else if (F <= -6.4e-74) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -2.9e-174) {
tmp = t_1;
} else if (F <= 1.7e-138) {
tmp = (-1.0 / (Math.tan(B) / x)) + (t_0 * (F / B));
} else if (F <= 4.7e-20) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = ((F / math.sin(B)) * t_0) - (x / B) t_2 = x / math.tan(B) tmp = 0 if F <= -850000.0: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= -7.5e-45: tmp = (t_0 * (1.0 / (math.sin(B) / F))) - (x / B) elif F <= -6.4e-74: tmp = (-1.0 / B) - t_2 elif F <= -2.9e-174: tmp = t_1 elif F <= 1.7e-138: tmp = (-1.0 / (math.tan(B) / x)) + (t_0 * (F / B)) elif F <= 4.7e-20: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(Float64(F / sin(B)) * t_0) - Float64(x / B)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -850000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= -7.5e-45) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(sin(B) / F))) - Float64(x / B)); elseif (F <= -6.4e-74) tmp = Float64(Float64(-1.0 / B) - t_2); elseif (F <= -2.9e-174) tmp = t_1; elseif (F <= 1.7e-138) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + Float64(t_0 * Float64(F / B))); elseif (F <= 4.7e-20) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = ((F / sin(B)) * t_0) - (x / B); t_2 = x / tan(B); tmp = 0.0; if (F <= -850000.0) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= -7.5e-45) tmp = (t_0 * (1.0 / (sin(B) / F))) - (x / B); elseif (F <= -6.4e-74) tmp = (-1.0 / B) - t_2; elseif (F <= -2.9e-174) tmp = t_1; elseif (F <= 1.7e-138) tmp = (-1.0 / (tan(B) / x)) + (t_0 * (F / B)); elseif (F <= 4.7e-20) tmp = t_1; else tmp = (1.0 / sin(B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -850000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -7.5e-45], N[(N[(t$95$0 * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.4e-74], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -2.9e-174], t$95$1, If[LessEqual[F, 1.7e-138], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{F}{\sin B} \cdot t_0 - \frac{x}{B}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -850000:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq -7.5 \cdot 10^{-45}:\\
\;\;\;\;t_0 \cdot \frac{1}{\frac{\sin B}{F}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-74}:\\
\;\;\;\;\frac{-1}{B} - t_2\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-138}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + t_0 \cdot \frac{F}{B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_2\\
\end{array}
\end{array}
if F < -8.5e5Initial program 56.9%
Taylor expanded in F around -inf 99.7%
if -8.5e5 < F < -7.5000000000000006e-45Initial program 99.1%
clear-num99.3%
inv-pow99.3%
Applied egg-rr99.3%
unpow-199.3%
Simplified99.3%
Taylor expanded in B around 0 90.0%
if -7.5000000000000006e-45 < F < -6.3999999999999997e-74Initial program 99.3%
+-commutative99.3%
unsub-neg99.3%
associate-*l/99.3%
associate-*r/99.3%
*-commutative99.3%
Simplified99.8%
Taylor expanded in F around -inf 86.6%
Taylor expanded in B around 0 97.2%
if -6.3999999999999997e-74 < F < -2.9000000000000001e-174 or 1.7000000000000001e-138 < F < 4.70000000000000015e-20Initial program 99.2%
Taylor expanded in B around 0 80.5%
if -2.9000000000000001e-174 < F < 1.7000000000000001e-138Initial program 99.5%
Taylor expanded in B around 0 93.3%
div-inv93.5%
clear-num93.3%
Applied egg-rr93.3%
if 4.70000000000000015e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
clear-num80.0%
inv-pow80.0%
fma-def80.0%
fma-udef80.0%
*-commutative80.0%
fma-def80.0%
fma-def80.0%
Applied egg-rr80.0%
unpow-180.0%
fma-udef80.0%
fma-udef80.0%
unpow280.0%
+-commutative80.0%
associate-+r+80.0%
+-commutative80.0%
+-commutative80.0%
unpow280.0%
fma-def80.0%
+-commutative80.0%
fma-def80.0%
Simplified80.0%
Taylor expanded in F around inf 97.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.2e-39)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.6e-133)
(/ (- (* x (cos B))) (sin B))
(if (<= F 2.66e-20)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.2e-39) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.6e-133) {
tmp = -(x * cos(B)) / sin(B);
} else if (F <= 2.66e-20) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.2d-39)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.6d-133) then
tmp = -(x * cos(b)) / sin(b)
else if (f <= 2.66d-20) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.2e-39) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.6e-133) {
tmp = -(x * Math.cos(B)) / Math.sin(B);
} else if (F <= 2.66e-20) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.2e-39: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.6e-133: tmp = -(x * math.cos(B)) / math.sin(B) elif F <= 2.66e-20: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.2e-39) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.6e-133) tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B)); elseif (F <= 2.66e-20) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.2e-39) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.6e-133) tmp = -(x * cos(B)) / sin(B); elseif (F <= 2.66e-20) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.2e-39], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.6e-133], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.66e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.2 \cdot 10^{-39}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-133}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 2.66 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.1999999999999994e-39Initial program 61.2%
+-commutative61.2%
unsub-neg61.2%
associate-*l/67.6%
associate-*r/67.6%
*-commutative67.6%
Simplified67.6%
clear-num67.6%
inv-pow67.6%
fma-def67.6%
fma-udef67.6%
*-commutative67.6%
fma-def67.6%
fma-def67.6%
Applied egg-rr67.6%
unpow-167.6%
fma-udef67.6%
fma-udef67.6%
unpow267.6%
+-commutative67.6%
associate-+r+67.6%
+-commutative67.6%
+-commutative67.6%
unpow267.6%
fma-def67.6%
+-commutative67.6%
fma-def67.6%
Simplified67.6%
Taylor expanded in F around -inf 94.5%
if -6.1999999999999994e-39 < F < 3.6000000000000004e-133Initial program 99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 80.7%
associate-*r/80.7%
*-commutative80.7%
associate-*r*80.7%
mul-1-neg80.7%
Simplified80.7%
if 3.6000000000000004e-133 < F < 2.66000000000000013e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 65.0%
if 2.66000000000000013e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
clear-num80.0%
inv-pow80.0%
fma-def80.0%
fma-udef80.0%
*-commutative80.0%
fma-def80.0%
fma-def80.0%
Applied egg-rr80.0%
unpow-180.0%
fma-udef80.0%
fma-udef80.0%
unpow280.0%
+-commutative80.0%
associate-+r+80.0%
+-commutative80.0%
+-commutative80.0%
unpow280.0%
fma-def80.0%
+-commutative80.0%
fma-def80.0%
Simplified80.0%
Taylor expanded in F around inf 97.8%
Final simplification89.5%
(FPCore (F B x)
:precision binary64
(if (<= F -1.9e-37)
(+ (/ -1.0 (sin B)) (* x (/ -1.0 (tan B))))
(if (<= F 3.7e-134)
(/ (- (* x (cos B))) (sin B))
(if (<= F 4.7e-20)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-37) {
tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B)));
} else if (F <= 3.7e-134) {
tmp = -(x * cos(B)) / sin(B);
} else if (F <= 4.7e-20) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.9d-37)) then
tmp = ((-1.0d0) / sin(b)) + (x * ((-1.0d0) / tan(b)))
else if (f <= 3.7d-134) then
tmp = -(x * cos(b)) / sin(b)
else if (f <= 4.7d-20) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-37) {
tmp = (-1.0 / Math.sin(B)) + (x * (-1.0 / Math.tan(B)));
} else if (F <= 3.7e-134) {
tmp = -(x * Math.cos(B)) / Math.sin(B);
} else if (F <= 4.7e-20) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e-37: tmp = (-1.0 / math.sin(B)) + (x * (-1.0 / math.tan(B))) elif F <= 3.7e-134: tmp = -(x * math.cos(B)) / math.sin(B) elif F <= 4.7e-20: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e-37) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(x * Float64(-1.0 / tan(B)))); elseif (F <= 3.7e-134) tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B)); elseif (F <= 4.7e-20) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e-37) tmp = (-1.0 / sin(B)) + (x * (-1.0 / tan(B))); elseif (F <= 3.7e-134) tmp = -(x * cos(B)) / sin(B); elseif (F <= 4.7e-20) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.7e-134], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.7e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-37}:\\
\;\;\;\;\frac{-1}{\sin B} + x \cdot \frac{-1}{\tan B}\\
\mathbf{elif}\;F \leq 3.7 \cdot 10^{-134}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -1.9000000000000002e-37Initial program 61.2%
Taylor expanded in F around -inf 94.5%
if -1.9000000000000002e-37 < F < 3.7e-134Initial program 99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 80.7%
associate-*r/80.7%
*-commutative80.7%
associate-*r*80.7%
mul-1-neg80.7%
Simplified80.7%
if 3.7e-134 < F < 4.70000000000000015e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 65.0%
if 4.70000000000000015e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
clear-num80.0%
inv-pow80.0%
fma-def80.0%
fma-udef80.0%
*-commutative80.0%
fma-def80.0%
fma-def80.0%
Applied egg-rr80.0%
unpow-180.0%
fma-udef80.0%
fma-udef80.0%
unpow280.0%
+-commutative80.0%
associate-+r+80.0%
+-commutative80.0%
+-commutative80.0%
unpow280.0%
fma-def80.0%
+-commutative80.0%
fma-def80.0%
Simplified80.0%
Taylor expanded in F around inf 97.8%
Final simplification89.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.6e-273)
(- (/ -1.0 B) t_0)
(if (<= F 4e-147)
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(+ (/ x B) (* -0.3333333333333333 (* x B))))
(if (<= F 4.4e-20) (/ (sqrt 0.5) (/ (sin B) F)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.6e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 4e-147) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
} else if (F <= 4.4e-20) {
tmp = sqrt(0.5) / (sin(B) / F);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.6d-273)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 4d-147) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - ((x / b) + ((-0.3333333333333333d0) * (x * b)))
else if (f <= 4.4d-20) then
tmp = sqrt(0.5d0) / (sin(b) / f)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.6e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 4e-147) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
} else if (F <= 4.4e-20) {
tmp = Math.sqrt(0.5) / (Math.sin(B) / F);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.6e-273: tmp = (-1.0 / B) - t_0 elif F <= 4e-147: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B))) elif F <= 4.4e-20: tmp = math.sqrt(0.5) / (math.sin(B) / F) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.6e-273) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 4e-147) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(x * B)))); elseif (F <= 4.4e-20) tmp = Float64(sqrt(0.5) / Float64(sin(B) / F)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.6e-273) tmp = (-1.0 / B) - t_0; elseif (F <= 4e-147) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B))); elseif (F <= 4.4e-20) tmp = sqrt(0.5) / (sin(B) / F); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.6e-273], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4e-147], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e-20], N[(N[Sqrt[0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.6 \cdot 10^{-273}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-147}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{\sin B}{F}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -5.59999999999999971e-273Initial program 75.0%
+-commutative75.0%
unsub-neg75.0%
associate-*l/79.2%
associate-*r/79.1%
*-commutative79.1%
Simplified79.2%
Taylor expanded in F around -inf 74.4%
Taylor expanded in B around 0 61.3%
if -5.59999999999999971e-273 < F < 3.9999999999999999e-147Initial program 99.6%
Taylor expanded in B around 0 99.6%
Taylor expanded in B around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 3.9999999999999999e-147 < F < 4.39999999999999982e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 62.4%
associate-/l*62.3%
Simplified62.3%
if 4.39999999999999982e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
Taylor expanded in F around inf 97.6%
Taylor expanded in B around 0 75.9%
Final simplification66.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.3e-273)
(- (/ -1.0 B) t_0)
(if (<= F 9.5e-144)
(-
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B))
(+ (/ x B) (* -0.3333333333333333 (* x B))))
(if (<= F 2.32e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.3e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 9.5e-144) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
} else if (F <= 2.32e-20) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.3d-273)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 9.5d-144) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - ((x / b) + ((-0.3333333333333333d0) * (x * b)))
else if (f <= 2.32d-20) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.3e-273) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 9.5e-144) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B)));
} else if (F <= 2.32e-20) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.3e-273: tmp = (-1.0 / B) - t_0 elif F <= 9.5e-144: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B))) elif F <= 2.32e-20: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.3e-273) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 9.5e-144) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(Float64(x / B) + Float64(-0.3333333333333333 * Float64(x * B)))); elseif (F <= 2.32e-20) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.3e-273) tmp = (-1.0 / B) - t_0; elseif (F <= 9.5e-144) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - ((x / B) + (-0.3333333333333333 * (x * B))); elseif (F <= 2.32e-20) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.3e-273], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9.5e-144], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(N[(x / B), $MachinePrecision] + N[(-0.3333333333333333 * N[(x * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.32e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.3 \cdot 10^{-273}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-144}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \left(\frac{x}{B} + -0.3333333333333333 \cdot \left(x \cdot B\right)\right)\\
\mathbf{elif}\;F \leq 2.32 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -6.29999999999999977e-273Initial program 75.0%
+-commutative75.0%
unsub-neg75.0%
associate-*l/79.2%
associate-*r/79.1%
*-commutative79.1%
Simplified79.2%
Taylor expanded in F around -inf 74.4%
Taylor expanded in B around 0 61.3%
if -6.29999999999999977e-273 < F < 9.49999999999999953e-144Initial program 99.6%
Taylor expanded in B around 0 99.6%
Taylor expanded in B around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 9.49999999999999953e-144 < F < 2.32e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 62.4%
if 2.32e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
Taylor expanded in F around inf 97.6%
Taylor expanded in B around 0 75.9%
Final simplification66.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.2e-33)
(- (/ -1.0 B) t_0)
(if (<= F 8e-133)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 3.3e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.2e-33) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 8e-133) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 3.3e-20) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.2d-33)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 8d-133) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 3.3d-20) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.2e-33) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 8e-133) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 3.3e-20) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.2e-33: tmp = (-1.0 / B) - t_0 elif F <= 8e-133: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 3.3e-20: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.2e-33) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 8e-133) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 3.3e-20) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.2e-33) tmp = (-1.0 / B) - t_0; elseif (F <= 8e-133) tmp = cos(B) * (-x / sin(B)); elseif (F <= 3.3e-20) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.2e-33], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-133], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{-33}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -4.2e-33Initial program 60.7%
+-commutative60.7%
unsub-neg60.7%
associate-*l/67.2%
associate-*r/67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in F around -inf 95.4%
Taylor expanded in B around 0 62.4%
if -4.2e-33 < F < 8.0000000000000005e-133Initial program 99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 79.7%
mul-1-neg79.7%
*-commutative79.7%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
if 8.0000000000000005e-133 < F < 3.3e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 65.0%
if 3.3e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
Taylor expanded in F around inf 97.6%
Taylor expanded in B around 0 75.9%
Final simplification71.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.7e-31)
(- (/ -1.0 B) t_0)
(if (<= F 8e-133)
(/ (- (cos B)) (/ (sin B) x))
(if (<= F 1.12e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.7e-31) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 8e-133) {
tmp = -cos(B) / (sin(B) / x);
} else if (F <= 1.12e-20) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.7d-31)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 8d-133) then
tmp = -cos(b) / (sin(b) / x)
else if (f <= 1.12d-20) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.7e-31) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 8e-133) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else if (F <= 1.12e-20) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.7e-31: tmp = (-1.0 / B) - t_0 elif F <= 8e-133: tmp = -math.cos(B) / (math.sin(B) / x) elif F <= 1.12e-20: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.7e-31) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 8e-133) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); elseif (F <= 1.12e-20) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.7e-31) tmp = (-1.0 / B) - t_0; elseif (F <= 8e-133) tmp = -cos(B) / (sin(B) / x); elseif (F <= 1.12e-20) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.7e-31], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-133], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.12e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.7 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.70000000000000014e-31Initial program 60.7%
+-commutative60.7%
unsub-neg60.7%
associate-*l/67.2%
associate-*r/67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in F around -inf 95.4%
Taylor expanded in B around 0 62.4%
if -2.70000000000000014e-31 < F < 8.0000000000000005e-133Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
fma-def99.6%
fma-udef99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
Applied egg-rr99.6%
unpow-199.6%
fma-udef99.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
unpow299.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in F around 0 99.8%
Taylor expanded in F around 0 79.7%
mul-1-neg79.7%
associate-/l*79.6%
distribute-neg-frac79.6%
Simplified79.6%
if 8.0000000000000005e-133 < F < 1.12000000000000002e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 65.0%
if 1.12000000000000002e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
Taylor expanded in F around inf 97.6%
Taylor expanded in B around 0 75.9%
Final simplification71.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.8e-32)
(- (/ -1.0 B) t_0)
(if (<= F 1.15e-133)
(/ (- (* x (cos B))) (sin B))
(if (<= F 4.55e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.8e-32) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.15e-133) {
tmp = -(x * cos(B)) / sin(B);
} else if (F <= 4.55e-20) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-6.8d-32)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.15d-133) then
tmp = -(x * cos(b)) / sin(b)
else if (f <= 4.55d-20) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -6.8e-32) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.15e-133) {
tmp = -(x * Math.cos(B)) / Math.sin(B);
} else if (F <= 4.55e-20) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -6.8e-32: tmp = (-1.0 / B) - t_0 elif F <= 1.15e-133: tmp = -(x * math.cos(B)) / math.sin(B) elif F <= 4.55e-20: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.8e-32) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.15e-133) tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B)); elseif (F <= 4.55e-20) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -6.8e-32) tmp = (-1.0 / B) - t_0; elseif (F <= 1.15e-133) tmp = -(x * cos(B)) / sin(B); elseif (F <= 4.55e-20) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-32], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.15e-133], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.55e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-32}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-133}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 4.55 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -6.79999999999999956e-32Initial program 60.7%
+-commutative60.7%
unsub-neg60.7%
associate-*l/67.2%
associate-*r/67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in F around -inf 95.4%
Taylor expanded in B around 0 62.4%
if -6.79999999999999956e-32 < F < 1.15e-133Initial program 99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 79.7%
associate-*r/79.7%
*-commutative79.7%
associate-*r*79.7%
mul-1-neg79.7%
Simplified79.7%
if 1.15e-133 < F < 4.54999999999999998e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 65.0%
if 4.54999999999999998e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
Taylor expanded in F around inf 97.6%
Taylor expanded in B around 0 75.9%
Final simplification71.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.05e-38)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8e-133)
(/ (- (* x (cos B))) (sin B))
(if (<= F 3e-20) (/ (* F (sqrt 0.5)) (sin B)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.05e-38) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8e-133) {
tmp = -(x * cos(B)) / sin(B);
} else if (F <= 3e-20) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.05d-38)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8d-133) then
tmp = -(x * cos(b)) / sin(b)
else if (f <= 3d-20) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.05e-38) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8e-133) {
tmp = -(x * Math.cos(B)) / Math.sin(B);
} else if (F <= 3e-20) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.05e-38: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8e-133: tmp = -(x * math.cos(B)) / math.sin(B) elif F <= 3e-20: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.05e-38) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8e-133) tmp = Float64(Float64(-Float64(x * cos(B))) / sin(B)); elseif (F <= 3e-20) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.05e-38) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8e-133) tmp = -(x * cos(B)) / sin(B); elseif (F <= 3e-20) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.05e-38], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8e-133], N[((-N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-20], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.05 \cdot 10^{-38}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-133}:\\
\;\;\;\;\frac{-x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-20}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -2.0499999999999999e-38Initial program 61.2%
+-commutative61.2%
unsub-neg61.2%
associate-*l/67.6%
associate-*r/67.6%
*-commutative67.6%
Simplified67.6%
clear-num67.6%
inv-pow67.6%
fma-def67.6%
fma-udef67.6%
*-commutative67.6%
fma-def67.6%
fma-def67.6%
Applied egg-rr67.6%
unpow-167.6%
fma-udef67.6%
fma-udef67.6%
unpow267.6%
+-commutative67.6%
associate-+r+67.6%
+-commutative67.6%
+-commutative67.6%
unpow267.6%
fma-def67.6%
+-commutative67.6%
fma-def67.6%
Simplified67.6%
Taylor expanded in F around -inf 94.5%
if -2.0499999999999999e-38 < F < 8.0000000000000005e-133Initial program 99.5%
+-commutative99.5%
fma-def99.5%
+-commutative99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
metadata-eval99.5%
metadata-eval99.5%
distribute-lft-neg-in99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in F around 0 80.7%
associate-*r/80.7%
*-commutative80.7%
associate-*r*80.7%
mul-1-neg80.7%
Simplified80.7%
if 8.0000000000000005e-133 < F < 3.00000000000000029e-20Initial program 99.1%
+-commutative99.1%
unsub-neg99.1%
associate-*l/99.4%
associate-*r/99.3%
*-commutative99.3%
Simplified99.6%
clear-num99.5%
inv-pow99.5%
fma-def99.5%
fma-udef99.5%
*-commutative99.5%
fma-def99.5%
fma-def99.5%
Applied egg-rr99.5%
unpow-199.5%
fma-udef99.5%
fma-udef99.5%
unpow299.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
+-commutative99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in F around 0 99.4%
Taylor expanded in x around 0 65.0%
if 3.00000000000000029e-20 < F Initial program 58.9%
+-commutative58.9%
unsub-neg58.9%
associate-*l/79.9%
associate-*r/79.8%
*-commutative79.8%
Simplified79.9%
Taylor expanded in F around inf 97.6%
Taylor expanded in B around 0 75.9%
Final simplification82.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.9e-237)
(- (/ -1.0 B) t_0)
(if (<= F 2.5e-158)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.9e-237) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-158) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.9d-237)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 2.5d-158) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.9e-237) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-158) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.9e-237: tmp = (-1.0 / B) - t_0 elif F <= 2.5e-158: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.9e-237) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 2.5e-158) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.9e-237) tmp = (-1.0 / B) - t_0; elseif (F <= 2.5e-158) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.9e-237], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.5e-158], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-158}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.8999999999999998e-237Initial program 72.9%
+-commutative72.9%
unsub-neg72.9%
associate-*l/77.4%
associate-*r/77.3%
*-commutative77.3%
Simplified77.4%
Taylor expanded in F around -inf 78.9%
Taylor expanded in B around 0 62.1%
if -3.8999999999999998e-237 < F < 2.49999999999999986e-158Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.8%
clear-num99.8%
inv-pow99.8%
fma-def99.8%
fma-udef99.8%
*-commutative99.8%
fma-def99.8%
fma-def99.8%
Applied egg-rr99.8%
unpow-199.8%
fma-udef99.8%
fma-udef99.8%
unpow299.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
unpow299.8%
fma-def99.8%
+-commutative99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in F around 0 99.9%
Taylor expanded in B around 0 63.4%
if 2.49999999999999986e-158 < F Initial program 67.6%
+-commutative67.6%
unsub-neg67.6%
associate-*l/84.1%
associate-*r/84.1%
*-commutative84.1%
Simplified84.2%
Taylor expanded in F around inf 82.0%
Taylor expanded in B around 0 67.9%
Final simplification64.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.9e-237)
(- (/ -1.0 B) t_0)
(if (<= F 1.4e-159) (- (/ x B)) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.9e-237) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.4e-159) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.9d-237)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.4d-159) then
tmp = -(x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.9e-237) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.4e-159) {
tmp = -(x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.9e-237: tmp = (-1.0 / B) - t_0 elif F <= 1.4e-159: tmp = -(x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.9e-237) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.4e-159) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.9e-237) tmp = (-1.0 / B) - t_0; elseif (F <= 1.4e-159) tmp = -(x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.9e-237], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-159], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{-237}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-159}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\end{array}
\end{array}
if F < -3.8999999999999998e-237Initial program 72.9%
+-commutative72.9%
unsub-neg72.9%
associate-*l/77.4%
associate-*r/77.3%
*-commutative77.3%
Simplified77.4%
Taylor expanded in F around -inf 78.9%
Taylor expanded in B around 0 62.1%
if -3.8999999999999998e-237 < F < 1.4000000000000001e-159Initial program 99.6%
+-commutative99.6%
fma-def99.6%
+-commutative99.6%
*-commutative99.6%
fma-def99.6%
fma-def99.6%
metadata-eval99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in F around 0 90.0%
mul-1-neg90.0%
*-commutative90.0%
associate-*l/90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in B around 0 57.2%
if 1.4000000000000001e-159 < F Initial program 67.6%
+-commutative67.6%
unsub-neg67.6%
associate-*l/84.1%
associate-*r/84.1%
*-commutative84.1%
Simplified84.2%
Taylor expanded in F around inf 82.0%
Taylor expanded in B around 0 67.9%
Final simplification64.0%
(FPCore (F B x) :precision binary64 (- (/ -1.0 B) (/ x (tan B))))
double code(double F, double B, double x) {
return (-1.0 / B) - (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 = ((-1.0d0) / b) - (x / tan(b))
end function
public static double code(double F, double B, double x) {
return (-1.0 / B) - (x / Math.tan(B));
}
def code(F, B, x): return (-1.0 / B) - (x / math.tan(B))
function code(F, B, x) return Float64(Float64(-1.0 / B) - Float64(x / tan(B))) end
function tmp = code(F, B, x) tmp = (-1.0 / B) - (x / tan(B)); end
code[F_, B_, x_] := N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B} - \frac{x}{\tan B}
\end{array}
Initial program 73.8%
+-commutative73.8%
unsub-neg73.8%
associate-*l/83.0%
associate-*r/82.9%
*-commutative82.9%
Simplified83.1%
Taylor expanded in F around -inf 58.2%
Taylor expanded in B around 0 54.9%
Final simplification54.9%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e-9) (+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B)) (if (<= F 1.05e-64) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-9) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 1.05e-64) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.2d-9)) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if (f <= 1.05d-64) then
tmp = -(x / b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-9) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else if (F <= 1.05e-64) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-9: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) elif F <= 1.05e-64: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-9) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 1.05e-64) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-9) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); elseif (F <= 1.05e-64) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-9], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-64], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-9}:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-64}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.2e-9Initial program 58.6%
+-commutative58.6%
unsub-neg58.6%
associate-*l/65.5%
associate-*r/65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in F around -inf 97.6%
Taylor expanded in B around 0 49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in B around 0 43.8%
if -7.2e-9 < F < 1.05000000000000006e-64Initial program 99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 72.5%
mul-1-neg72.5%
*-commutative72.5%
associate-*l/72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in B around 0 39.3%
if 1.05000000000000006e-64 < F Initial program 63.0%
Taylor expanded in B around 0 46.4%
Taylor expanded in B around 0 26.5%
Taylor expanded in F around inf 51.7%
Taylor expanded in B around 0 51.7%
Final simplification45.3%
(FPCore (F B x) :precision binary64 (if (<= F -6e-31) (/ (- -1.0 x) B) (if (<= F 4.6e-69) (- (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.6e-69) {
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 <= (-6d-31)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.6d-69) 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 <= -6e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.6e-69) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-31: tmp = (-1.0 - x) / B elif F <= 4.6e-69: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-31) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.6e-69) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6e-31) tmp = (-1.0 - x) / B; elseif (F <= 4.6e-69) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-31], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.6e-69], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.6 \cdot 10^{-69}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -5.99999999999999962e-31Initial program 60.7%
+-commutative60.7%
unsub-neg60.7%
associate-*l/67.2%
associate-*r/67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in F around -inf 95.4%
Taylor expanded in B around 0 48.9%
*-commutative48.9%
Simplified48.9%
Taylor expanded in B around 0 42.8%
associate-*r/42.8%
distribute-lft-in42.8%
metadata-eval42.8%
neg-mul-142.8%
Simplified42.8%
if -5.99999999999999962e-31 < F < 4.6000000000000001e-69Initial program 99.4%
+-commutative99.4%
fma-def99.4%
+-commutative99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in F around 0 73.6%
mul-1-neg73.6%
*-commutative73.6%
associate-*l/73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in B around 0 39.9%
if 4.6000000000000001e-69 < F Initial program 63.0%
Taylor expanded in B around 0 46.4%
Taylor expanded in B around 0 26.5%
Taylor expanded in F around inf 51.7%
Taylor expanded in B around 0 51.7%
Final simplification45.3%
(FPCore (F B x) :precision binary64 (if (<= F 5.5e-61) (- (/ x B)) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 5.5e-61) {
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 <= 5.5d-61) 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 <= 5.5e-61) {
tmp = -(x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 5.5e-61: tmp = -(x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 5.5e-61) tmp = Float64(-Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 5.5e-61) tmp = -(x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 5.5e-61], (-N[(x / B), $MachinePrecision]), N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 5.5 \cdot 10^{-61}:\\
\;\;\;\;-\frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 5.4999999999999997e-61Initial program 80.4%
+-commutative80.4%
fma-def80.4%
+-commutative80.4%
*-commutative80.4%
fma-def80.4%
fma-def80.4%
metadata-eval80.4%
metadata-eval80.4%
distribute-lft-neg-in80.4%
associate-*r/80.5%
*-rgt-identity80.5%
Simplified80.5%
Taylor expanded in F around 0 53.6%
mul-1-neg53.6%
*-commutative53.6%
associate-*l/53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in B around 0 26.8%
if 5.4999999999999997e-61 < F Initial program 63.0%
Taylor expanded in B around 0 46.4%
Taylor expanded in B around 0 26.5%
Taylor expanded in F around inf 51.7%
Taylor expanded in B around 0 51.7%
Final simplification36.2%
(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 73.8%
+-commutative73.8%
fma-def73.8%
+-commutative73.8%
*-commutative73.8%
fma-def73.8%
fma-def73.8%
metadata-eval73.8%
metadata-eval73.8%
distribute-lft-neg-in73.8%
associate-*r/73.9%
*-rgt-identity73.9%
Simplified73.9%
Taylor expanded in F around 0 53.6%
mul-1-neg53.6%
*-commutative53.6%
associate-*l/53.6%
*-commutative53.6%
Simplified53.6%
Taylor expanded in B around 0 29.4%
Final simplification29.4%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 73.8%
Taylor expanded in B around 0 56.4%
Taylor expanded in B around 0 32.2%
Taylor expanded in F around inf 30.3%
Taylor expanded in x around 0 9.2%
Final simplification9.2%
herbie shell --seed 2023228
(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))))))