
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -940000.0)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 50000000.0)
(- (/ 1.0 (* (sin B) (/ (sqrt (fma F F 2.0)) F))) 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 <= -940000.0) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 50000000.0) {
tmp = (1.0 / (sin(B) * (sqrt(fma(F, F, 2.0)) / F))) - 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 <= -940000.0) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 50000000.0) tmp = Float64(Float64(1.0 / Float64(sin(B) * Float64(sqrt(fma(F, F, 2.0)) / F))) - 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, -940000.0], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50000000.0], N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] * N[(N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision] / F), $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 -940000:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;\frac{1}{\sin B \cdot \frac{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}{F}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.4e5Initial program 58.2%
distribute-lft-neg-in58.2%
+-commutative58.2%
associate-*l/71.6%
associate-/l*71.5%
fma-define71.5%
/-rgt-identity71.5%
remove-double-neg71.5%
fma-neg71.5%
Simplified71.6%
Taylor expanded in x around 0 71.7%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
associate-*r/71.7%
sqrt-div71.7%
metadata-eval71.7%
un-div-inv71.8%
Applied egg-rr71.8%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -9.4e5 < F < 5e7Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.5%
Applied egg-rr99.5%
clear-num99.5%
inv-pow99.5%
div-inv99.5%
clear-num99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
if 5e7 < F Initial program 57.1%
distribute-lft-neg-in57.1%
+-commutative57.1%
associate-*l/81.0%
associate-/l*80.9%
fma-define80.9%
/-rgt-identity80.9%
remove-double-neg80.9%
fma-neg80.9%
Simplified81.0%
Taylor expanded in x around 0 81.0%
associate-*l/81.0%
*-lft-identity81.0%
+-commutative81.0%
unpow281.0%
fma-undefine81.0%
Simplified81.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9500.0)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 120000000.0)
(- (/ (/ F (sin B)) (sqrt (fma F F 2.0))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -9500.0) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = ((F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -9500.0) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 120000000.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(fma(F, F, 2.0))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -9500.0], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -9500:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9500Initial program 58.7%
distribute-lft-neg-in58.7%
+-commutative58.7%
associate-*l/71.9%
associate-/l*71.9%
fma-define71.9%
/-rgt-identity71.9%
remove-double-neg71.9%
fma-neg71.9%
Simplified72.0%
Taylor expanded in x around 0 72.0%
associate-*l/72.0%
*-lft-identity72.0%
+-commutative72.0%
unpow272.0%
fma-undefine72.0%
Simplified72.0%
associate-*r/72.1%
sqrt-div72.1%
metadata-eval72.1%
un-div-inv72.1%
Applied egg-rr72.1%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -9500 < F < 1.2e8Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.5%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/l/99.5%
div-inv99.5%
Applied egg-rr99.5%
associate-*r/99.5%
*-rgt-identity99.5%
associate-/r*99.6%
Simplified99.6%
if 1.2e8 < F Initial program 57.1%
distribute-lft-neg-in57.1%
+-commutative57.1%
associate-*l/81.0%
associate-/l*80.9%
fma-define80.9%
/-rgt-identity80.9%
remove-double-neg80.9%
fma-neg80.9%
Simplified81.0%
Taylor expanded in x around 0 81.0%
associate-*l/81.0%
*-lft-identity81.0%
+-commutative81.0%
unpow281.0%
fma-undefine81.0%
Simplified81.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -960000.0)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 125000000.0)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -960000.0) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 125000000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-960000.0d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 125000000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -960000.0) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 125000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -960000.0: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 125000000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -960000.0) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 125000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -960000.0) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 125000000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -960000.0], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 125000000.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 * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $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 -960000:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 125000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.6e5Initial program 58.2%
distribute-lft-neg-in58.2%
+-commutative58.2%
associate-*l/71.6%
associate-/l*71.5%
fma-define71.5%
/-rgt-identity71.5%
remove-double-neg71.5%
fma-neg71.5%
Simplified71.6%
Taylor expanded in x around 0 71.7%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
associate-*r/71.7%
sqrt-div71.7%
metadata-eval71.7%
un-div-inv71.8%
Applied egg-rr71.8%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -9.6e5 < F < 1.25e8Initial program 99.4%
if 1.25e8 < F Initial program 57.1%
distribute-lft-neg-in57.1%
+-commutative57.1%
associate-*l/81.0%
associate-/l*80.9%
fma-define80.9%
/-rgt-identity80.9%
remove-double-neg80.9%
fma-neg80.9%
Simplified81.0%
Taylor expanded in x around 0 81.0%
associate-*l/81.0%
*-lft-identity81.0%
+-commutative81.0%
unpow281.0%
fma-undefine81.0%
Simplified81.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -760000.0)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 50000000.0)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -760000.0) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 50000000.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)) - 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 <= (-760000.0d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 50000000.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)) - 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 <= -760000.0) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 50000000.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)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -760000.0: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 50000000.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)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -760000.0) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 50000000.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)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -760000.0) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 50000000.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)) - 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, -760000.0], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 50000000.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] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -760000:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 50000000:\\
\;\;\;\;\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} - t\_0\\
\end{array}
\end{array}
if F < -7.6e5Initial program 58.2%
distribute-lft-neg-in58.2%
+-commutative58.2%
associate-*l/71.6%
associate-/l*71.5%
fma-define71.5%
/-rgt-identity71.5%
remove-double-neg71.5%
fma-neg71.5%
Simplified71.6%
Taylor expanded in x around 0 71.7%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
associate-*r/71.7%
sqrt-div71.7%
metadata-eval71.7%
un-div-inv71.8%
Applied egg-rr71.8%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -7.6e5 < F < 5e7Initial program 99.4%
div-inv99.6%
clear-num99.5%
Applied egg-rr99.5%
if 5e7 < F Initial program 57.1%
distribute-lft-neg-in57.1%
+-commutative57.1%
associate-*l/81.0%
associate-/l*80.9%
fma-define80.9%
/-rgt-identity80.9%
remove-double-neg80.9%
fma-neg80.9%
Simplified81.0%
Taylor expanded in x around 0 81.0%
associate-*l/81.0%
*-lft-identity81.0%
+-commutative81.0%
unpow281.0%
fma-undefine81.0%
Simplified81.0%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.85)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.85) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.85d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.85) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.85: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.85) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.85) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.85], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -0.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.85:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 58.7%
distribute-lft-neg-in58.7%
+-commutative58.7%
associate-*l/71.9%
associate-/l*71.9%
fma-define71.9%
/-rgt-identity71.9%
remove-double-neg71.9%
fma-neg71.9%
Simplified72.0%
Taylor expanded in x around 0 72.0%
associate-*l/72.0%
*-lft-identity72.0%
+-commutative72.0%
unpow272.0%
fma-undefine72.0%
Simplified72.0%
associate-*r/72.1%
sqrt-div72.1%
metadata-eval72.1%
un-div-inv72.1%
Applied egg-rr72.1%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -0.900000000000000022 < F < 0.849999999999999978Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.3%
associate-/l*99.3%
fma-define99.3%
/-rgt-identity99.3%
remove-double-neg99.3%
fma-neg99.3%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.1%
if 0.849999999999999978 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
associate-*r/81.3%
sqrt-div81.4%
metadata-eval81.4%
un-div-inv81.4%
Applied egg-rr81.4%
Taylor expanded in F around inf 99.4%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.9)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.9d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.9: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.9) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.9) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.9], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -0.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 58.7%
distribute-lft-neg-in58.7%
+-commutative58.7%
associate-*l/71.9%
associate-/l*71.9%
fma-define71.9%
/-rgt-identity71.9%
remove-double-neg71.9%
fma-neg71.9%
Simplified72.0%
Taylor expanded in x around 0 72.0%
associate-*l/72.0%
*-lft-identity72.0%
+-commutative72.0%
unpow272.0%
fma-undefine72.0%
Simplified72.0%
associate-*r/72.1%
sqrt-div72.1%
metadata-eval72.1%
un-div-inv72.1%
Applied egg-rr72.1%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -0.900000000000000022 < F < 0.900000000000000022Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.3%
associate-/l*99.3%
fma-define99.3%
/-rgt-identity99.3%
remove-double-neg99.3%
fma-neg99.3%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
if 0.900000000000000022 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
associate-*r/81.3%
sqrt-div81.4%
metadata-eval81.4%
un-div-inv81.4%
Applied egg-rr81.4%
Taylor expanded in F around inf 99.4%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.9)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.9d0) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.9) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.9: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.9) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.9) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.9], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -0.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.9:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 58.7%
distribute-lft-neg-in58.7%
+-commutative58.7%
associate-*l/71.9%
associate-/l*71.9%
fma-define71.9%
/-rgt-identity71.9%
remove-double-neg71.9%
fma-neg71.9%
Simplified72.0%
Taylor expanded in x around 0 72.0%
associate-*l/72.0%
*-lft-identity72.0%
+-commutative72.0%
unpow272.0%
fma-undefine72.0%
Simplified72.0%
associate-*r/72.1%
sqrt-div72.1%
metadata-eval72.1%
un-div-inv72.1%
Applied egg-rr72.1%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -0.900000000000000022 < F < 0.900000000000000022Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.3%
associate-/l*99.3%
fma-define99.3%
/-rgt-identity99.3%
remove-double-neg99.3%
fma-neg99.3%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
associate-*r/99.5%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.2%
if 0.900000000000000022 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
associate-*r/81.3%
sqrt-div81.4%
metadata-eval81.4%
un-div-inv81.4%
Applied egg-rr81.4%
Taylor expanded in F around inf 99.4%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -490000.0)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F -1.95e-135)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.21)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -490000.0) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= -1.95e-135) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.21) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-490000.0d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= (-1.95d-135)) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.21d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -490000.0) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= -1.95e-135) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.21) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -490000.0: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= -1.95e-135: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.21: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -490000.0) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= -1.95e-135) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.21) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -490000.0) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= -1.95e-135) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.21) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -490000.0], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.95e-135], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.21], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -490000:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-135}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.21:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.9e5Initial program 58.2%
distribute-lft-neg-in58.2%
+-commutative58.2%
associate-*l/71.6%
associate-/l*71.5%
fma-define71.5%
/-rgt-identity71.5%
remove-double-neg71.5%
fma-neg71.5%
Simplified71.6%
Taylor expanded in x around 0 71.7%
associate-*l/71.6%
*-lft-identity71.6%
+-commutative71.6%
unpow271.6%
fma-undefine71.6%
Simplified71.6%
associate-*r/71.7%
sqrt-div71.7%
metadata-eval71.7%
un-div-inv71.8%
Applied egg-rr71.8%
Taylor expanded in F around -inf 99.9%
neg-mul-199.9%
Simplified99.9%
if -4.9e5 < F < -1.95000000000000011e-135Initial program 99.3%
Taylor expanded in B around 0 81.3%
if -1.95000000000000011e-135 < F < 0.209999999999999992Initial program 99.5%
distribute-lft-neg-in99.5%
+-commutative99.5%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 88.1%
associate-/l*88.1%
Simplified88.1%
if 0.209999999999999992 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
associate-*r/81.3%
sqrt-div81.4%
metadata-eval81.4%
un-div-inv81.4%
Applied egg-rr81.4%
Taylor expanded in F around inf 99.4%
Final simplification94.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* x (/ (- (cos B)) (sin B)))))
(if (<= F -7.8e-31)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.9e-62)
t_0
(if (<= F 30.0)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 2.4e+52) (/ (+ 1.0 x) B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x * (-cos(B) / sin(B));
double tmp;
if (F <= -7.8e-31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.9e-62) {
tmp = t_0;
} else if (F <= 30.0) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 2.4e+52) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x * (-cos(b) / sin(b))
if (f <= (-7.8d-31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.9d-62) then
tmp = t_0
else if (f <= 30.0d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 2.4d+52) then
tmp = (1.0d0 + x) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x * (-Math.cos(B) / Math.sin(B));
double tmp;
if (F <= -7.8e-31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.9e-62) {
tmp = t_0;
} else if (F <= 30.0) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 2.4e+52) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x * (-math.cos(B) / math.sin(B)) tmp = 0 if F <= -7.8e-31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.9e-62: tmp = t_0 elif F <= 30.0: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 2.4e+52: tmp = (1.0 + x) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(x * Float64(Float64(-cos(B)) / sin(B))) tmp = 0.0 if (F <= -7.8e-31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.9e-62) tmp = t_0; elseif (F <= 30.0) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 2.4e+52) tmp = Float64(Float64(1.0 + x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x * (-cos(B) / sin(B)); tmp = 0.0; if (F <= -7.8e-31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.9e-62) tmp = t_0; elseif (F <= 30.0) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 2.4e+52) tmp = (1.0 + x) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x * N[((-N[Cos[B], $MachinePrecision]) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -7.8e-31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.9e-62], t$95$0, If[LessEqual[F, 30.0], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.4e+52], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-\cos B}{\sin B}\\
\mathbf{if}\;F \leq -7.8 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.9 \cdot 10^{-62}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 30:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{+52}:\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -7.8000000000000003e-31Initial program 63.0%
Taylor expanded in F around -inf 89.7%
Taylor expanded in B around 0 73.5%
if -7.8000000000000003e-31 < F < 1.90000000000000003e-62 or 2.4e52 < F Initial program 81.0%
Taylor expanded in F around -inf 43.7%
Taylor expanded in x around inf 61.9%
mul-1-neg61.9%
associate-/l*61.9%
Simplified61.9%
if 1.90000000000000003e-62 < F < 30Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
associate-*l/99.0%
associate-/l*99.1%
fma-define99.1%
/-rgt-identity99.1%
remove-double-neg99.1%
fma-neg99.1%
Simplified99.2%
Taylor expanded in x around 0 99.0%
associate-*l/99.2%
*-lft-identity99.2%
+-commutative99.2%
unpow299.2%
fma-undefine99.2%
Simplified99.2%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in B around 0 73.8%
if 30 < F < 2.4e52Initial program 79.0%
Taylor expanded in F around -inf 3.6%
Taylor expanded in B around 0 1.8%
associate-*r/1.8%
mul-1-neg1.8%
Simplified1.8%
add-sqr-sqrt0.0%
sqrt-unprod68.2%
sqr-neg68.2%
sqrt-unprod68.2%
add-sqr-sqrt68.2%
*-un-lft-identity68.2%
Applied egg-rr68.2%
*-lft-identity68.2%
Simplified68.2%
Final simplification66.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (cos B) (/ (- x) (sin B)))))
(if (<= F -2.5e-30)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.3e-69)
t_0
(if (<= F 55.0)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 2.2e+51) (/ (+ 1.0 x) B) t_0))))))
double code(double F, double B, double x) {
double t_0 = cos(B) * (-x / sin(B));
double tmp;
if (F <= -2.5e-30) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.3e-69) {
tmp = t_0;
} else if (F <= 55.0) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 2.2e+51) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = cos(b) * (-x / sin(b))
if (f <= (-2.5d-30)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.3d-69) then
tmp = t_0
else if (f <= 55.0d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 2.2d+51) then
tmp = (1.0d0 + x) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.cos(B) * (-x / Math.sin(B));
double tmp;
if (F <= -2.5e-30) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.3e-69) {
tmp = t_0;
} else if (F <= 55.0) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 2.2e+51) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = math.cos(B) * (-x / math.sin(B)) tmp = 0 if F <= -2.5e-30: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.3e-69: tmp = t_0 elif F <= 55.0: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 2.2e+51: tmp = (1.0 + x) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(cos(B) * Float64(Float64(-x) / sin(B))) tmp = 0.0 if (F <= -2.5e-30) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.3e-69) tmp = t_0; elseif (F <= 55.0) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 2.2e+51) tmp = Float64(Float64(1.0 + x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = cos(B) * (-x / sin(B)); tmp = 0.0; if (F <= -2.5e-30) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.3e-69) tmp = t_0; elseif (F <= 55.0) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 2.2e+51) tmp = (1.0 + x) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e-30], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e-69], t$95$0, If[LessEqual[F, 55.0], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.2e+51], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos B \cdot \frac{-x}{\sin B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-69}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 55:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+51}:\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -2.49999999999999986e-30Initial program 63.0%
Taylor expanded in F around -inf 89.7%
Taylor expanded in B around 0 73.5%
if -2.49999999999999986e-30 < F < 1.3000000000000001e-69 or 2.19999999999999992e51 < F Initial program 81.0%
Taylor expanded in F around -inf 43.7%
Taylor expanded in x around inf 61.9%
mul-1-neg61.9%
associate-*l/62.0%
*-commutative62.0%
distribute-rgt-neg-in62.0%
Simplified62.0%
if 1.3000000000000001e-69 < F < 55Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
associate-*l/99.0%
associate-/l*99.1%
fma-define99.1%
/-rgt-identity99.1%
remove-double-neg99.1%
fma-neg99.1%
Simplified99.2%
Taylor expanded in x around 0 99.0%
associate-*l/99.2%
*-lft-identity99.2%
+-commutative99.2%
unpow299.2%
fma-undefine99.2%
Simplified99.2%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in B around 0 73.8%
if 55 < F < 2.19999999999999992e51Initial program 79.0%
Taylor expanded in F around -inf 3.6%
Taylor expanded in B around 0 1.8%
associate-*r/1.8%
mul-1-neg1.8%
Simplified1.8%
add-sqr-sqrt0.0%
sqrt-unprod68.2%
sqr-neg68.2%
sqrt-unprod68.2%
add-sqr-sqrt68.2%
*-un-lft-identity68.2%
Applied egg-rr68.2%
*-lft-identity68.2%
Simplified68.2%
Final simplification66.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (cos B) (/ (- x) (sin B)))))
(if (<= F -2.9e-34)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 5e-67)
t_0
(if (<= F 126.0)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 8e+51) (/ (+ 1.0 x) B) t_0))))))
double code(double F, double B, double x) {
double t_0 = cos(B) * (-x / sin(B));
double tmp;
if (F <= -2.9e-34) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 5e-67) {
tmp = t_0;
} else if (F <= 126.0) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 8e+51) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = cos(b) * (-x / sin(b))
if (f <= (-2.9d-34)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 5d-67) then
tmp = t_0
else if (f <= 126.0d0) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 8d+51) then
tmp = (1.0d0 + x) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.cos(B) * (-x / Math.sin(B));
double tmp;
if (F <= -2.9e-34) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 5e-67) {
tmp = t_0;
} else if (F <= 126.0) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 8e+51) {
tmp = (1.0 + x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = math.cos(B) * (-x / math.sin(B)) tmp = 0 if F <= -2.9e-34: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 5e-67: tmp = t_0 elif F <= 126.0: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 8e+51: tmp = (1.0 + x) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(cos(B) * Float64(Float64(-x) / sin(B))) tmp = 0.0 if (F <= -2.9e-34) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 5e-67) tmp = t_0; elseif (F <= 126.0) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 8e+51) tmp = Float64(Float64(1.0 + x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = cos(B) * (-x / sin(B)); tmp = 0.0; if (F <= -2.9e-34) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 5e-67) tmp = t_0; elseif (F <= 126.0) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 8e+51) tmp = (1.0 + x) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.9e-34], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-67], t$95$0, If[LessEqual[F, 126.0], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8e+51], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos B \cdot \frac{-x}{\sin B}\\
\mathbf{if}\;F \leq -2.9 \cdot 10^{-34}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-67}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 126:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{+51}:\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -2.9000000000000002e-34Initial program 63.0%
distribute-lft-neg-in63.0%
+-commutative63.0%
associate-*l/74.8%
associate-/l*74.7%
fma-define74.7%
/-rgt-identity74.7%
remove-double-neg74.7%
fma-neg74.7%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
+-commutative74.8%
unpow274.8%
fma-undefine74.8%
Simplified74.8%
Taylor expanded in F around -inf 89.8%
if -2.9000000000000002e-34 < F < 4.9999999999999999e-67 or 8e51 < F Initial program 81.0%
Taylor expanded in F around -inf 43.7%
Taylor expanded in x around inf 61.9%
mul-1-neg61.9%
associate-*l/62.0%
*-commutative62.0%
distribute-rgt-neg-in62.0%
Simplified62.0%
if 4.9999999999999999e-67 < F < 126Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
associate-*l/99.0%
associate-/l*99.1%
fma-define99.1%
/-rgt-identity99.1%
remove-double-neg99.1%
fma-neg99.1%
Simplified99.2%
Taylor expanded in x around 0 99.0%
associate-*l/99.2%
*-lft-identity99.2%
+-commutative99.2%
unpow299.2%
fma-undefine99.2%
Simplified99.2%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in B around 0 73.8%
if 126 < F < 8e51Initial program 79.0%
Taylor expanded in F around -inf 3.6%
Taylor expanded in B around 0 1.8%
associate-*r/1.8%
mul-1-neg1.8%
Simplified1.8%
add-sqr-sqrt0.0%
sqrt-unprod68.2%
sqr-neg68.2%
sqrt-unprod68.2%
add-sqr-sqrt68.2%
*-un-lft-identity68.2%
Applied egg-rr68.2%
*-lft-identity68.2%
Simplified68.2%
Final simplification72.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.1e-15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.11)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.1e-15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.11) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.1d-15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.11d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.1e-15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.11) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.1e-15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.11: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e-15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.11) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.1e-15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.11) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.11], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.11:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.0999999999999999e-15Initial program 60.3%
distribute-lft-neg-in60.3%
+-commutative60.3%
associate-*l/73.0%
associate-/l*72.9%
fma-define72.9%
/-rgt-identity72.9%
remove-double-neg72.9%
fma-neg72.9%
Simplified73.0%
Taylor expanded in x around 0 73.0%
associate-*l/73.0%
*-lft-identity73.0%
+-commutative73.0%
unpow273.0%
fma-undefine73.0%
Simplified73.0%
Taylor expanded in F around -inf 95.9%
if -3.0999999999999999e-15 < F < 0.110000000000000001Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in B around 0 83.1%
associate-/l*83.1%
Simplified83.1%
if 0.110000000000000001 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
associate-*r/81.3%
sqrt-div81.4%
metadata-eval81.4%
un-div-inv81.4%
Applied egg-rr81.4%
Taylor expanded in F around inf 99.4%
Final simplification91.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.1e-15)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.35)
(- (* F (/ (sqrt 0.5) B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.1e-15) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.35) {
tmp = (F * (sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.1d-15)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.35d0) then
tmp = (f * (sqrt(0.5d0) / b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.1e-15) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.35) {
tmp = (F * (Math.sqrt(0.5) / B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.1e-15: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.35: tmp = (F * (math.sqrt(0.5) / B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.1e-15) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.35) tmp = Float64(Float64(F * Float64(sqrt(0.5) / B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.1e-15) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.35) tmp = (F * (sqrt(0.5) / B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.1e-15], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.35], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.35:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.0999999999999999e-15Initial program 60.3%
distribute-lft-neg-in60.3%
+-commutative60.3%
associate-*l/73.0%
associate-/l*72.9%
fma-define72.9%
/-rgt-identity72.9%
remove-double-neg72.9%
fma-neg72.9%
Simplified73.0%
Taylor expanded in x around 0 73.0%
associate-*l/73.0%
*-lft-identity73.0%
+-commutative73.0%
unpow273.0%
fma-undefine73.0%
Simplified73.0%
associate-*r/73.1%
sqrt-div73.1%
metadata-eval73.1%
un-div-inv73.1%
Applied egg-rr73.1%
Taylor expanded in F around -inf 96.6%
neg-mul-196.6%
Simplified96.6%
if -3.0999999999999999e-15 < F < 0.34999999999999998Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in B around 0 83.1%
associate-/l*83.1%
Simplified83.1%
if 0.34999999999999998 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
associate-*r/81.3%
sqrt-div81.4%
metadata-eval81.4%
un-div-inv81.4%
Applied egg-rr81.4%
Taylor expanded in F around inf 99.4%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.8e-37)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.7e-67)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 0.00058)
(/ (- (* F (sqrt 0.5)) x) 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 <= -1.8e-37) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.7e-67) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 0.00058) {
tmp = ((F * sqrt(0.5)) - x) / 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 <= (-1.8d-37)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.7d-67) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 0.00058d0) then
tmp = ((f * sqrt(0.5d0)) - x) / 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 <= -1.8e-37) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.7e-67) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 0.00058) {
tmp = ((F * Math.sqrt(0.5)) - x) / 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 <= -1.8e-37: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.7e-67: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 0.00058: tmp = ((F * math.sqrt(0.5)) - x) / 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 <= -1.8e-37) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.7e-67) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 0.00058) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / 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 <= -1.8e-37) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.7e-67) tmp = cos(B) * (-x / sin(B)); elseif (F <= 0.00058) tmp = ((F * sqrt(0.5)) - x) / 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, -1.8e-37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.7e-67], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00058], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $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.8 \cdot 10^{-37}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.7 \cdot 10^{-67}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 0.00058:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.80000000000000004e-37Initial program 63.0%
distribute-lft-neg-in63.0%
+-commutative63.0%
associate-*l/74.8%
associate-/l*74.7%
fma-define74.7%
/-rgt-identity74.7%
remove-double-neg74.7%
fma-neg74.7%
Simplified74.8%
Taylor expanded in x around 0 74.8%
associate-*l/74.8%
*-lft-identity74.8%
+-commutative74.8%
unpow274.8%
fma-undefine74.8%
Simplified74.8%
Taylor expanded in F around -inf 89.8%
if -1.80000000000000004e-37 < F < 2.70000000000000016e-67Initial program 99.5%
Taylor expanded in F around -inf 38.0%
Taylor expanded in x around inf 68.2%
mul-1-neg68.2%
associate-*l/68.2%
*-commutative68.2%
distribute-rgt-neg-in68.2%
Simplified68.2%
if 2.70000000000000016e-67 < F < 5.8e-4Initial program 99.1%
distribute-lft-neg-in99.1%
+-commutative99.1%
associate-*l/99.0%
associate-/l*99.1%
fma-define99.1%
/-rgt-identity99.1%
remove-double-neg99.1%
fma-neg99.1%
Simplified99.2%
Taylor expanded in x around 0 99.0%
associate-*l/99.2%
*-lft-identity99.2%
+-commutative99.2%
unpow299.2%
fma-undefine99.2%
Simplified99.2%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in B around 0 73.8%
if 5.8e-4 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
Taylor expanded in F around inf 99.0%
Final simplification84.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.1e-15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.35) (- (* F (/ (sqrt 0.5) 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 <= -3.1e-15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.35) {
tmp = (F * (sqrt(0.5) / 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 <= (-3.1d-15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.35d0) then
tmp = (f * (sqrt(0.5d0) / 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 <= -3.1e-15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.35) {
tmp = (F * (Math.sqrt(0.5) / 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 <= -3.1e-15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.35: tmp = (F * (math.sqrt(0.5) / 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 <= -3.1e-15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.35) tmp = Float64(Float64(F * Float64(sqrt(0.5) / 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 <= -3.1e-15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.35) tmp = (F * (sqrt(0.5) / 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, -3.1e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.35], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.35:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -3.0999999999999999e-15Initial program 60.3%
distribute-lft-neg-in60.3%
+-commutative60.3%
associate-*l/73.0%
associate-/l*72.9%
fma-define72.9%
/-rgt-identity72.9%
remove-double-neg72.9%
fma-neg72.9%
Simplified73.0%
Taylor expanded in x around 0 73.0%
associate-*l/73.0%
*-lft-identity73.0%
+-commutative73.0%
unpow273.0%
fma-undefine73.0%
Simplified73.0%
Taylor expanded in F around -inf 95.9%
if -3.0999999999999999e-15 < F < 0.34999999999999998Initial program 99.4%
distribute-lft-neg-in99.4%
+-commutative99.4%
associate-*l/99.4%
associate-/l*99.4%
fma-define99.4%
/-rgt-identity99.4%
remove-double-neg99.4%
fma-neg99.4%
Simplified99.5%
Taylor expanded in x around 0 99.4%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in B around 0 83.1%
associate-/l*83.1%
Simplified83.1%
if 0.34999999999999998 < F Initial program 57.7%
distribute-lft-neg-in57.7%
+-commutative57.7%
associate-*l/81.3%
associate-/l*81.2%
fma-define81.2%
/-rgt-identity81.2%
remove-double-neg81.2%
fma-neg81.2%
Simplified81.3%
Taylor expanded in x around 0 81.3%
associate-*l/81.2%
*-lft-identity81.2%
+-commutative81.2%
unpow281.2%
fma-undefine81.2%
Simplified81.2%
Taylor expanded in F around inf 99.0%
Final simplification91.5%
(FPCore (F B x) :precision binary64 (if (or (<= x -2.4e-134) (not (<= x 5.8e-26))) (- (/ -1.0 B) (/ x (tan B))) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -2.4e-134) || !(x <= 5.8e-26)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-2.4d-134)) .or. (.not. (x <= 5.8d-26))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -2.4e-134) || !(x <= 5.8e-26)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -2.4e-134) or not (x <= 5.8e-26): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -2.4e-134) || !(x <= 5.8e-26)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -2.4e-134) || ~((x <= 5.8e-26))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -2.4e-134], N[Not[LessEqual[x, 5.8e-26]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-134} \lor \neg \left(x \leq 5.8 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if x < -2.4000000000000001e-134 or 5.7999999999999996e-26 < x Initial program 77.5%
distribute-lft-neg-in77.5%
+-commutative77.5%
associate-*l/93.4%
associate-/l*93.4%
fma-define93.4%
/-rgt-identity93.4%
remove-double-neg93.4%
fma-neg93.4%
Simplified93.6%
Taylor expanded in x around 0 93.5%
associate-*l/93.5%
*-lft-identity93.5%
+-commutative93.5%
unpow293.5%
fma-undefine93.5%
Simplified93.5%
Taylor expanded in F around -inf 79.6%
Taylor expanded in B around 0 81.1%
if -2.4000000000000001e-134 < x < 5.7999999999999996e-26Initial program 73.5%
Taylor expanded in F around -inf 29.7%
Taylor expanded in B around 0 29.7%
Taylor expanded in x around 0 29.7%
Final simplification57.2%
(FPCore (F B x) :precision binary64 (if (or (<= x -7.5e-150) (not (<= x 1.2e-75))) (- (/ -1.0 B) (/ x (tan B))) (/ (- (* F (sqrt 0.5)) x) B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -7.5e-150) || !(x <= 1.2e-75)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = ((F * sqrt(0.5)) - 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 ((x <= (-7.5d-150)) .or. (.not. (x <= 1.2d-75))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = ((f * sqrt(0.5d0)) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -7.5e-150) || !(x <= 1.2e-75)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -7.5e-150) or not (x <= 1.2e-75): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = ((F * math.sqrt(0.5)) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -7.5e-150) || !(x <= 1.2e-75)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -7.5e-150) || ~((x <= 1.2e-75))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = ((F * sqrt(0.5)) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -7.5e-150], N[Not[LessEqual[x, 1.2e-75]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-150} \lor \neg \left(x \leq 1.2 \cdot 10^{-75}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\end{array}
\end{array}
if x < -7.5000000000000004e-150 or 1.2000000000000001e-75 < x Initial program 76.5%
distribute-lft-neg-in76.5%
+-commutative76.5%
associate-*l/90.5%
associate-/l*90.5%
fma-define90.5%
/-rgt-identity90.5%
remove-double-neg90.5%
fma-neg90.5%
Simplified90.6%
Taylor expanded in x around 0 90.6%
associate-*l/90.6%
*-lft-identity90.6%
+-commutative90.6%
unpow290.6%
fma-undefine90.6%
Simplified90.6%
Taylor expanded in F around -inf 76.4%
Taylor expanded in B around 0 76.6%
if -7.5000000000000004e-150 < x < 1.2000000000000001e-75Initial program 74.3%
distribute-lft-neg-in74.3%
+-commutative74.3%
associate-*l/79.2%
associate-/l*79.1%
fma-define79.1%
/-rgt-identity79.1%
remove-double-neg79.1%
fma-neg79.1%
Simplified79.2%
Taylor expanded in x around 0 79.1%
associate-*l/79.1%
*-lft-identity79.1%
+-commutative79.1%
unpow279.1%
fma-undefine79.1%
Simplified79.1%
Taylor expanded in F around 0 52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in B around 0 32.8%
Final simplification59.4%
(FPCore (F B x) :precision binary64 (if (<= B 850000000.0) (+ (* B (- (* x 0.3333333333333333) 0.16666666666666666)) (/ (- -1.0 x) B)) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 850000000.0) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else {
tmp = -1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 850000000.0d0) then
tmp = (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 850000000.0) {
tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B);
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 850000000.0: tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B) else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 850000000.0) tmp = Float64(Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666)) + Float64(Float64(-1.0 - x) / B)); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 850000000.0) tmp = (B * ((x * 0.3333333333333333) - 0.16666666666666666)) + ((-1.0 - x) / B); else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 850000000.0], N[(N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 850000000:\\
\;\;\;\;B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right) + \frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if B < 8.5e8Initial program 72.9%
Taylor expanded in F around -inf 57.4%
Taylor expanded in B around 0 37.5%
if 8.5e8 < B Initial program 87.3%
Taylor expanded in F around -inf 51.7%
Taylor expanded in B around 0 16.4%
Taylor expanded in x around 0 16.6%
Final simplification33.5%
(FPCore (F B x)
:precision binary64
(if (<= F -8.5e-125)
(/ (- -1.0 x) B)
(if (or (<= F 3e-18) (not (<= F 7.6e+173)))
(- (/ x (- B)) (* B (* x -0.3333333333333333)))
(/ (+ 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-125) {
tmp = (-1.0 - x) / B;
} else if ((F <= 3e-18) || !(F <= 7.6e+173)) {
tmp = (x / -B) - (B * (x * -0.3333333333333333));
} 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 <= (-8.5d-125)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 3d-18) .or. (.not. (f <= 7.6d+173))) then
tmp = (x / -b) - (b * (x * (-0.3333333333333333d0)))
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 <= -8.5e-125) {
tmp = (-1.0 - x) / B;
} else if ((F <= 3e-18) || !(F <= 7.6e+173)) {
tmp = (x / -B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 + x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-125: tmp = (-1.0 - x) / B elif (F <= 3e-18) or not (F <= 7.6e+173): tmp = (x / -B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 + x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-125) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 3e-18) || !(F <= 7.6e+173)) tmp = Float64(Float64(x / Float64(-B)) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 + x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e-125) tmp = (-1.0 - x) / B; elseif ((F <= 3e-18) || ~((F <= 7.6e+173))) tmp = (x / -B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 + x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-125], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 3e-18], N[Not[LessEqual[F, 7.6e+173]], $MachinePrecision]], N[(N[(x / (-B)), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-18} \lor \neg \left(F \leq 7.6 \cdot 10^{+173}\right):\\
\;\;\;\;\frac{x}{-B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x}{B}\\
\end{array}
\end{array}
if F < -8.5000000000000002e-125Initial program 68.4%
Taylor expanded in F around -inf 79.9%
Taylor expanded in B around 0 43.8%
associate-*r/43.8%
mul-1-neg43.8%
Simplified43.8%
if -8.5000000000000002e-125 < F < 2.99999999999999983e-18 or 7.60000000000000022e173 < F Initial program 81.9%
Taylor expanded in F around -inf 46.5%
Taylor expanded in x around inf 69.5%
mul-1-neg69.5%
associate-*l/69.5%
*-commutative69.5%
distribute-rgt-neg-in69.5%
Simplified69.5%
Taylor expanded in B around 0 37.5%
distribute-lft-out37.5%
distribute-rgt-out--37.5%
metadata-eval37.5%
Simplified37.5%
if 2.99999999999999983e-18 < F < 7.60000000000000022e173Initial program 76.0%
Taylor expanded in F around -inf 25.0%
Taylor expanded in B around 0 15.1%
associate-*r/15.1%
mul-1-neg15.1%
Simplified15.1%
add-sqr-sqrt10.9%
sqrt-unprod49.0%
sqr-neg49.0%
sqrt-unprod38.2%
add-sqr-sqrt38.5%
*-un-lft-identity38.5%
Applied egg-rr38.5%
*-lft-identity38.5%
Simplified38.5%
Final simplification40.2%
(FPCore (F B x)
:precision binary64
(if (<= F -4.1e-30)
(+ (* B -0.16666666666666666) (/ (- -1.0 x) B))
(if (or (<= F 5e-18) (not (<= F 1.7e+174)))
(- (/ x (- B)) (* B (* x -0.3333333333333333)))
(/ (+ 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.1e-30) {
tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B);
} else if ((F <= 5e-18) || !(F <= 1.7e+174)) {
tmp = (x / -B) - (B * (x * -0.3333333333333333));
} 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 <= (-4.1d-30)) then
tmp = (b * (-0.16666666666666666d0)) + (((-1.0d0) - x) / b)
else if ((f <= 5d-18) .or. (.not. (f <= 1.7d+174))) then
tmp = (x / -b) - (b * (x * (-0.3333333333333333d0)))
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 <= -4.1e-30) {
tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B);
} else if ((F <= 5e-18) || !(F <= 1.7e+174)) {
tmp = (x / -B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 + x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.1e-30: tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B) elif (F <= 5e-18) or not (F <= 1.7e+174): tmp = (x / -B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 + x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.1e-30) tmp = Float64(Float64(B * -0.16666666666666666) + Float64(Float64(-1.0 - x) / B)); elseif ((F <= 5e-18) || !(F <= 1.7e+174)) tmp = Float64(Float64(x / Float64(-B)) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 + x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.1e-30) tmp = (B * -0.16666666666666666) + ((-1.0 - x) / B); elseif ((F <= 5e-18) || ~((F <= 1.7e+174))) tmp = (x / -B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 + x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.1e-30], N[(N[(B * -0.16666666666666666), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 5e-18], N[Not[LessEqual[F, 1.7e+174]], $MachinePrecision]], N[(N[(x / (-B)), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.1 \cdot 10^{-30}:\\
\;\;\;\;B \cdot -0.16666666666666666 + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-18} \lor \neg \left(F \leq 1.7 \cdot 10^{+174}\right):\\
\;\;\;\;\frac{x}{-B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x}{B}\\
\end{array}
\end{array}
if F < -4.1000000000000003e-30Initial program 62.6%
Taylor expanded in F around -inf 90.7%
Taylor expanded in B around 0 74.3%
Taylor expanded in B around 0 50.4%
if -4.1000000000000003e-30 < F < 5.00000000000000036e-18 or 1.7000000000000001e174 < F Initial program 84.0%
Taylor expanded in F around -inf 43.6%
Taylor expanded in x around inf 65.6%
mul-1-neg65.6%
associate-*l/65.6%
*-commutative65.6%
distribute-rgt-neg-in65.6%
Simplified65.6%
Taylor expanded in B around 0 34.2%
distribute-lft-out34.2%
distribute-rgt-out--34.2%
metadata-eval34.2%
Simplified34.2%
if 5.00000000000000036e-18 < F < 1.7000000000000001e174Initial program 76.0%
Taylor expanded in F around -inf 25.0%
Taylor expanded in B around 0 15.1%
associate-*r/15.1%
mul-1-neg15.1%
Simplified15.1%
add-sqr-sqrt10.9%
sqrt-unprod49.0%
sqr-neg49.0%
sqrt-unprod38.2%
add-sqr-sqrt38.5%
*-un-lft-identity38.5%
Applied egg-rr38.5%
*-lft-identity38.5%
Simplified38.5%
Final simplification40.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- B))))
(if (<= x -7.2e-13)
t_0
(if (<= x -2.4e-154)
(/ -1.0 B)
(if (<= x 2.8e-301)
(/ (+ 1.0 x) B)
(if (<= x 1.76e-93) (/ -1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (x <= -7.2e-13) {
tmp = t_0;
} else if (x <= -2.4e-154) {
tmp = -1.0 / B;
} else if (x <= 2.8e-301) {
tmp = (1.0 + x) / B;
} else if (x <= 1.76e-93) {
tmp = -1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / -b
if (x <= (-7.2d-13)) then
tmp = t_0
else if (x <= (-2.4d-154)) then
tmp = (-1.0d0) / b
else if (x <= 2.8d-301) then
tmp = (1.0d0 + x) / b
else if (x <= 1.76d-93) then
tmp = (-1.0d0) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -B;
double tmp;
if (x <= -7.2e-13) {
tmp = t_0;
} else if (x <= -2.4e-154) {
tmp = -1.0 / B;
} else if (x <= 2.8e-301) {
tmp = (1.0 + x) / B;
} else if (x <= 1.76e-93) {
tmp = -1.0 / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / -B tmp = 0 if x <= -7.2e-13: tmp = t_0 elif x <= -2.4e-154: tmp = -1.0 / B elif x <= 2.8e-301: tmp = (1.0 + x) / B elif x <= 1.76e-93: tmp = -1.0 / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-B)) tmp = 0.0 if (x <= -7.2e-13) tmp = t_0; elseif (x <= -2.4e-154) tmp = Float64(-1.0 / B); elseif (x <= 2.8e-301) tmp = Float64(Float64(1.0 + x) / B); elseif (x <= 1.76e-93) tmp = Float64(-1.0 / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -B; tmp = 0.0; if (x <= -7.2e-13) tmp = t_0; elseif (x <= -2.4e-154) tmp = -1.0 / B; elseif (x <= 2.8e-301) tmp = (1.0 + x) / B; elseif (x <= 1.76e-93) tmp = -1.0 / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-B)), $MachinePrecision]}, If[LessEqual[x, -7.2e-13], t$95$0, If[LessEqual[x, -2.4e-154], N[(-1.0 / B), $MachinePrecision], If[LessEqual[x, 2.8e-301], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[x, 1.76e-93], N[(-1.0 / B), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-B}\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{-13}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-154}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-301}:\\
\;\;\;\;\frac{1 + x}{B}\\
\mathbf{elif}\;x \leq 1.76 \cdot 10^{-93}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -7.1999999999999996e-13 or 1.76000000000000001e-93 < x Initial program 80.2%
Taylor expanded in F around -inf 82.4%
Taylor expanded in B around 0 44.3%
associate-*r/44.3%
mul-1-neg44.3%
Simplified44.3%
Taylor expanded in x around inf 48.0%
associate-*r/48.0%
neg-mul-148.0%
Simplified48.0%
if -7.1999999999999996e-13 < x < -2.39999999999999987e-154 or 2.8000000000000001e-301 < x < 1.76000000000000001e-93Initial program 73.5%
Taylor expanded in F around -inf 35.2%
Taylor expanded in B around 0 23.0%
associate-*r/23.0%
mul-1-neg23.0%
Simplified23.0%
Taylor expanded in x around 0 22.8%
if -2.39999999999999987e-154 < x < 2.8000000000000001e-301Initial program 65.9%
Taylor expanded in F around -inf 21.7%
Taylor expanded in B around 0 7.3%
associate-*r/7.3%
mul-1-neg7.3%
Simplified7.3%
add-sqr-sqrt0.0%
sqrt-unprod23.1%
sqr-neg23.1%
sqrt-unprod23.1%
add-sqr-sqrt23.1%
*-un-lft-identity23.1%
Applied egg-rr23.1%
*-lft-identity23.1%
Simplified23.1%
Final simplification35.3%
(FPCore (F B x) :precision binary64 (if (<= F -8.5e-125) (/ (- -1.0 x) B) (if (or (<= F 4.8e-18) (not (<= F 6.5e+173))) (/ x (- B)) (/ (+ 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-125) {
tmp = (-1.0 - x) / B;
} else if ((F <= 4.8e-18) || !(F <= 6.5e+173)) {
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 <= (-8.5d-125)) then
tmp = ((-1.0d0) - x) / b
else if ((f <= 4.8d-18) .or. (.not. (f <= 6.5d+173))) 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 <= -8.5e-125) {
tmp = (-1.0 - x) / B;
} else if ((F <= 4.8e-18) || !(F <= 6.5e+173)) {
tmp = x / -B;
} else {
tmp = (1.0 + x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-125: tmp = (-1.0 - x) / B elif (F <= 4.8e-18) or not (F <= 6.5e+173): tmp = x / -B else: tmp = (1.0 + x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-125) tmp = Float64(Float64(-1.0 - x) / B); elseif ((F <= 4.8e-18) || !(F <= 6.5e+173)) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 + x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e-125) tmp = (-1.0 - x) / B; elseif ((F <= 4.8e-18) || ~((F <= 6.5e+173))) tmp = x / -B; else tmp = (1.0 + x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-125], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 4.8e-18], N[Not[LessEqual[F, 6.5e+173]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 + x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-18} \lor \neg \left(F \leq 6.5 \cdot 10^{+173}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x}{B}\\
\end{array}
\end{array}
if F < -8.5000000000000002e-125Initial program 68.4%
Taylor expanded in F around -inf 79.9%
Taylor expanded in B around 0 43.8%
associate-*r/43.8%
mul-1-neg43.8%
Simplified43.8%
if -8.5000000000000002e-125 < F < 4.79999999999999988e-18 or 6.4999999999999997e173 < F Initial program 81.9%
Taylor expanded in F around -inf 46.5%
Taylor expanded in B around 0 25.3%
associate-*r/25.3%
mul-1-neg25.3%
Simplified25.3%
Taylor expanded in x around inf 37.4%
associate-*r/37.4%
neg-mul-137.4%
Simplified37.4%
if 4.79999999999999988e-18 < F < 6.4999999999999997e173Initial program 76.0%
Taylor expanded in F around -inf 25.0%
Taylor expanded in B around 0 15.1%
associate-*r/15.1%
mul-1-neg15.1%
Simplified15.1%
add-sqr-sqrt10.9%
sqrt-unprod49.0%
sqr-neg49.0%
sqrt-unprod38.2%
add-sqr-sqrt38.5%
*-un-lft-identity38.5%
Applied egg-rr38.5%
*-lft-identity38.5%
Simplified38.5%
Final simplification40.1%
(FPCore (F B x) :precision binary64 (if (or (<= x -7.5e-13) (not (<= x 3e-95))) (/ x (- B)) (/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -7.5e-13) || !(x <= 3e-95)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-7.5d-13)) .or. (.not. (x <= 3d-95))) then
tmp = x / -b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -7.5e-13) || !(x <= 3e-95)) {
tmp = x / -B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -7.5e-13) or not (x <= 3e-95): tmp = x / -B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -7.5e-13) || !(x <= 3e-95)) tmp = Float64(x / Float64(-B)); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -7.5e-13) || ~((x <= 3e-95))) tmp = x / -B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -7.5e-13], N[Not[LessEqual[x, 3e-95]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{-13} \lor \neg \left(x \leq 3 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -7.5000000000000004e-13 or 3e-95 < x Initial program 80.2%
Taylor expanded in F around -inf 82.4%
Taylor expanded in B around 0 44.3%
associate-*r/44.3%
mul-1-neg44.3%
Simplified44.3%
Taylor expanded in x around inf 48.0%
associate-*r/48.0%
neg-mul-148.0%
Simplified48.0%
if -7.5000000000000004e-13 < x < 3e-95Initial program 71.2%
Taylor expanded in F around -inf 31.0%
Taylor expanded in B around 0 18.2%
associate-*r/18.2%
mul-1-neg18.2%
Simplified18.2%
Taylor expanded in x around 0 18.0%
Final simplification32.8%
(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 75.6%
Taylor expanded in F around -inf 56.3%
Taylor expanded in B around 0 31.0%
associate-*r/31.0%
mul-1-neg31.0%
Simplified31.0%
Taylor expanded in x around 0 12.1%
Final simplification12.1%
herbie shell --seed 2024044
(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))))))