
(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 -1250000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 680.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 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 <= -1250000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 680.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (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 <= (-1250000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 680.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (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 <= -1250000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 680.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (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 <= -1250000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 680.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (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 <= -1250000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 680.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + 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 <= -1250000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 680.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (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, -1250000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 680.0], 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[(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 -1250000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 680:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.25e9Initial program 59.7%
Simplified76.3%
Taylor expanded in x around 0 76.2%
associate-*l/76.3%
*-lft-identity76.3%
+-commutative76.3%
unpow276.3%
fma-undefine76.3%
Simplified76.3%
Taylor expanded in F around -inf 99.8%
if -1.25e9 < F < 680Initial program 99.6%
if 680 < F Initial program 49.3%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
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 -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 60.9%
Simplified77.0%
Taylor expanded in x around 0 76.9%
associate-*l/77.0%
*-lft-identity77.0%
+-commutative77.0%
unpow277.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in F around -inf 99.8%
if -1.4199999999999999 < F < 1.4199999999999999Initial program 99.5%
Taylor expanded in F around 0 99.2%
div-inv99.3%
add-sqr-sqrt55.9%
sqrt-unprod59.5%
sqr-neg59.5%
div-inv59.5%
div-inv59.4%
sqrt-unprod15.4%
add-sqr-sqrt33.9%
div-inv33.9%
neg-sub033.9%
sub-neg33.9%
div-inv33.9%
add-sqr-sqrt15.4%
sqrt-unprod59.4%
div-inv59.5%
div-inv59.5%
sqr-neg59.5%
Applied egg-rr99.3%
+-lft-identity99.3%
Simplified99.3%
if 1.4199999999999999 < F Initial program 49.3%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (/ (* F (sqrt 0.5)) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F * sqrt(0.5)) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = ((f * sqrt(0.5d0)) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = ((F * Math.sqrt(0.5)) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = ((F * math.sqrt(0.5)) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = ((F * sqrt(0.5)) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[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 -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 60.9%
Simplified77.0%
Taylor expanded in x around 0 76.9%
associate-*l/77.0%
*-lft-identity77.0%
+-commutative77.0%
unpow277.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in F around -inf 99.8%
if -1.4199999999999999 < F < 1.4199999999999999Initial program 99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
if 1.4199999999999999 < F Initial program 49.3%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.42)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.42d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.42) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.42: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.42) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.42) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.42], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.42:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.4199999999999999Initial program 60.9%
Simplified77.0%
Taylor expanded in x around 0 76.9%
associate-*l/77.0%
*-lft-identity77.0%
+-commutative77.0%
unpow277.0%
fma-undefine77.0%
Simplified77.0%
Taylor expanded in F around -inf 99.8%
if -1.4199999999999999 < F < 1.4199999999999999Initial program 99.5%
Simplified99.5%
Taylor expanded in x around 0 99.6%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-undefine99.5%
Simplified99.5%
Taylor expanded in F around 0 99.2%
if 1.4199999999999999 < F Initial program 49.3%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(+
(* x (/ -1.0 (tan B)))
(* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B))))
(t_1 (/ x (tan B))))
(if (<= F -6e-22)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.22e-140)
t_0
(if (<= F 8.5e-66)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 0.0235) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
double t_1 = x / tan(B);
double tmp;
if (F <= -6e-22) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.22e-140) {
tmp = t_0;
} else if (F <= 8.5e-66) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.0235) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b))
t_1 = x / tan(b)
if (f <= (-6d-22)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.22d-140) then
tmp = t_0
else if (f <= 8.5d-66) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 0.0235d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -6e-22) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.22e-140) {
tmp = t_0;
} else if (F <= 8.5e-66) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 0.0235) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) t_1 = x / math.tan(B) tmp = 0 if F <= -6e-22: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.22e-140: tmp = t_0 elif F <= 8.5e-66: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) elif F <= 0.0235: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6e-22) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.22e-140) tmp = t_0; elseif (F <= 8.5e-66) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 0.0235) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -6e-22) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.22e-140) tmp = t_0; elseif (F <= 8.5e-66) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 0.0235) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.22e-140], t$95$0, If[LessEqual[F, 8.5e-66], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0235], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-66}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.0235:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -5.9999999999999998e-22Initial program 64.1%
Simplified78.8%
Taylor expanded in x around 0 78.8%
associate-*l/78.8%
*-lft-identity78.8%
+-commutative78.8%
unpow278.8%
fma-undefine78.8%
Simplified78.8%
Taylor expanded in F around -inf 97.3%
if -5.9999999999999998e-22 < F < 1.22e-140 or 8.49999999999999966e-66 < F < 0.0235Initial program 99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 79.5%
if 1.22e-140 < F < 8.49999999999999966e-66Initial program 99.7%
Taylor expanded in B around 0 94.3%
associate-*r/94.3%
neg-mul-194.3%
Simplified94.3%
if 0.0235 < F Initial program 49.3%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around inf 99.8%
Final simplification91.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -0.031)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.25e-146)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F -2.1e-258)
(/ x (- (sin B)))
(if (<= F 2.15e-249)
t_0
(if (<= F 2.95e-111)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(if (<= F 3.2e-24)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= F 7600.0) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.031) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.25e-146) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= -2.1e-258) {
tmp = x / -sin(B);
} else if (F <= 2.15e-249) {
tmp = t_0;
} else if (F <= 2.95e-111) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 3.2e-24) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (F <= 7600.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-0.031d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.25d-146)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= (-2.1d-258)) then
tmp = x / -sin(b)
else if (f <= 2.15d-249) then
tmp = t_0
else if (f <= 2.95d-111) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else if (f <= 3.2d-24) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (f <= 7600.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.031) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.25e-146) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= -2.1e-258) {
tmp = x / -Math.sin(B);
} else if (F <= 2.15e-249) {
tmp = t_0;
} else if (F <= 2.95e-111) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 3.2e-24) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (F <= 7600.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -0.031: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.25e-146: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= -2.1e-258: tmp = x / -math.sin(B) elif F <= 2.15e-249: tmp = t_0 elif F <= 2.95e-111: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) elif F <= 3.2e-24: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif F <= 7600.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -0.031) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.25e-146) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= -2.1e-258) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 2.15e-249) tmp = t_0; elseif (F <= 2.95e-111) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); elseif (F <= 3.2e-24) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (F <= 7600.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -0.031) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.25e-146) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= -2.1e-258) tmp = x / -sin(B); elseif (F <= 2.15e-249) tmp = t_0; elseif (F <= 2.95e-111) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); elseif (F <= 3.2e-24) tmp = (F / sin(B)) * sqrt(0.5); elseif (F <= 7600.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.031], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.25e-146], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-258], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 2.15e-249], t$95$0, If[LessEqual[F, 2.95e-111], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-24], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7600.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -0.031:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-146}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-258}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{-249}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-111}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;F \leq 7600:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.031Initial program 60.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.3%
associate-*r/46.4%
neg-mul-146.4%
Simplified85.3%
if -0.031 < F < -1.24999999999999989e-146Initial program 99.4%
Taylor expanded in F around 0 98.0%
Taylor expanded in F around inf 50.2%
associate-*l/50.5%
inv-pow50.5%
sqrt-pow150.5%
+-commutative50.5%
fma-define50.5%
metadata-eval50.5%
Applied egg-rr50.5%
associate-/l*50.2%
Simplified50.2%
Taylor expanded in x around 0 50.6%
if -1.24999999999999989e-146 < F < -2.0999999999999999e-258Initial program 99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in x around inf 73.9%
Taylor expanded in B around 0 53.1%
if -2.0999999999999999e-258 < F < 2.1500000000000001e-249 or 3.20000000000000012e-24 < F < 7600Initial program 99.6%
Taylor expanded in F around -inf 56.2%
Taylor expanded in B around 0 74.1%
if 2.1500000000000001e-249 < F < 2.95e-111Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 64.6%
Taylor expanded in F around 0 64.6%
if 2.95e-111 < F < 3.20000000000000012e-24Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 67.3%
Taylor expanded in x around 0 67.2%
if 7600 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification73.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5)))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -0.112)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -6.8e-159)
t_0
(if (<= F -2.05e-261)
(/ x (- (sin B)))
(if (<= F 1.45e-249)
t_1
(if (<= F 1.3e-112)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(if (<= F 3.2e-24)
t_0
(if (<= F 8000.0) t_1 (- (/ 1.0 (sin B)) (/ x B)))))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.112) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -6.8e-159) {
tmp = t_0;
} else if (F <= -2.05e-261) {
tmp = x / -sin(B);
} else if (F <= 1.45e-249) {
tmp = t_1;
} else if (F <= 1.3e-112) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 3.2e-24) {
tmp = t_0;
} else if (F <= 8000.0) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt(0.5d0)
t_1 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-0.112d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-6.8d-159)) then
tmp = t_0
else if (f <= (-2.05d-261)) then
tmp = x / -sin(b)
else if (f <= 1.45d-249) then
tmp = t_1
else if (f <= 1.3d-112) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else if (f <= 3.2d-24) then
tmp = t_0
else if (f <= 8000.0d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt(0.5);
double t_1 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.112) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -6.8e-159) {
tmp = t_0;
} else if (F <= -2.05e-261) {
tmp = x / -Math.sin(B);
} else if (F <= 1.45e-249) {
tmp = t_1;
} else if (F <= 1.3e-112) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 3.2e-24) {
tmp = t_0;
} else if (F <= 8000.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) t_1 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -0.112: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -6.8e-159: tmp = t_0 elif F <= -2.05e-261: tmp = x / -math.sin(B) elif F <= 1.45e-249: tmp = t_1 elif F <= 1.3e-112: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) elif F <= 3.2e-24: tmp = t_0 elif F <= 8000.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -0.112) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -6.8e-159) tmp = t_0; elseif (F <= -2.05e-261) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 1.45e-249) tmp = t_1; elseif (F <= 1.3e-112) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); elseif (F <= 3.2e-24) tmp = t_0; elseif (F <= 8000.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -0.112) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -6.8e-159) tmp = t_0; elseif (F <= -2.05e-261) tmp = x / -sin(B); elseif (F <= 1.45e-249) tmp = t_1; elseif (F <= 1.3e-112) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); elseif (F <= 3.2e-24) tmp = t_0; elseif (F <= 8000.0) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.112], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -6.8e-159], t$95$0, If[LessEqual[F, -2.05e-261], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1.45e-249], t$95$1, If[LessEqual[F, 1.3e-112], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-24], t$95$0, If[LessEqual[F, 8000.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -0.112:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -6.8 \cdot 10^{-159}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{-261}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-249}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-112}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.112000000000000002Initial program 60.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.3%
associate-*r/46.4%
neg-mul-146.4%
Simplified85.3%
if -0.112000000000000002 < F < -6.79999999999999967e-159 or 1.29999999999999996e-112 < F < 3.20000000000000012e-24Initial program 99.4%
Taylor expanded in F around 0 98.7%
Taylor expanded in F around inf 58.6%
Taylor expanded in x around 0 58.6%
if -6.79999999999999967e-159 < F < -2.05000000000000007e-261Initial program 99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in x around inf 73.9%
Taylor expanded in B around 0 53.1%
if -2.05000000000000007e-261 < F < 1.45000000000000011e-249 or 3.20000000000000012e-24 < F < 8e3Initial program 99.6%
Taylor expanded in F around -inf 56.2%
Taylor expanded in B around 0 74.1%
if 1.45000000000000011e-249 < F < 1.29999999999999996e-112Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 64.6%
Taylor expanded in F around 0 64.6%
if 8e3 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification73.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B))))
(t_1 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -0.085)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.1e-145)
t_0
(if (<= F -3e-264)
(/ x (- (sin B)))
(if (<= F 1e-250)
t_1
(if (<= F 1.75e-110)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(if (<= F 2.5e-24)
t_0
(if (<= F 7400.0) t_1 (- (/ 1.0 (sin B)) (/ x B)))))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.085) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.1e-145) {
tmp = t_0;
} else if (F <= -3e-264) {
tmp = x / -sin(B);
} else if (F <= 1e-250) {
tmp = t_1;
} else if (F <= 1.75e-110) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 2.5e-24) {
tmp = t_0;
} else if (F <= 7400.0) {
tmp = t_1;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
t_1 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-0.085d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.1d-145)) then
tmp = t_0
else if (f <= (-3d-264)) then
tmp = x / -sin(b)
else if (f <= 1d-250) then
tmp = t_1
else if (f <= 1.75d-110) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else if (f <= 2.5d-24) then
tmp = t_0
else if (f <= 7400.0d0) then
tmp = t_1
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double t_1 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -0.085) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.1e-145) {
tmp = t_0;
} else if (F <= -3e-264) {
tmp = x / -Math.sin(B);
} else if (F <= 1e-250) {
tmp = t_1;
} else if (F <= 1.75e-110) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 2.5e-24) {
tmp = t_0;
} else if (F <= 7400.0) {
tmp = t_1;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) t_1 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -0.085: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.1e-145: tmp = t_0 elif F <= -3e-264: tmp = x / -math.sin(B) elif F <= 1e-250: tmp = t_1 elif F <= 1.75e-110: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) elif F <= 2.5e-24: tmp = t_0 elif F <= 7400.0: tmp = t_1 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) t_1 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -0.085) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.1e-145) tmp = t_0; elseif (F <= -3e-264) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 1e-250) tmp = t_1; elseif (F <= 1.75e-110) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.5e-24) tmp = t_0; elseif (F <= 7400.0) tmp = t_1; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); t_1 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -0.085) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.1e-145) tmp = t_0; elseif (F <= -3e-264) tmp = x / -sin(B); elseif (F <= 1e-250) tmp = t_1; elseif (F <= 1.75e-110) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); elseif (F <= 2.5e-24) tmp = t_0; elseif (F <= 7400.0) tmp = t_1; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.085], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.1e-145], t$95$0, If[LessEqual[F, -3e-264], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1e-250], t$95$1, If[LessEqual[F, 1.75e-110], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-24], t$95$0, If[LessEqual[F, 7400.0], t$95$1, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -0.085:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-145}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-264}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 10^{-250}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-110}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7400:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0850000000000000061Initial program 60.9%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 85.3%
associate-*r/46.4%
neg-mul-146.4%
Simplified85.3%
if -0.0850000000000000061 < F < -2.09999999999999991e-145 or 1.74999999999999987e-110 < F < 2.4999999999999999e-24Initial program 99.4%
Taylor expanded in F around 0 98.7%
Taylor expanded in F around inf 58.6%
associate-*l/58.6%
inv-pow58.6%
sqrt-pow158.6%
+-commutative58.6%
fma-define58.6%
metadata-eval58.6%
Applied egg-rr58.6%
associate-/l*58.5%
Simplified58.5%
Taylor expanded in x around 0 58.6%
if -2.09999999999999991e-145 < F < -3e-264Initial program 99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in x around inf 73.9%
Taylor expanded in B around 0 53.1%
if -3e-264 < F < 1.0000000000000001e-250 or 2.4999999999999999e-24 < F < 7400Initial program 99.6%
Taylor expanded in F around -inf 56.2%
Taylor expanded in B around 0 74.1%
if 1.0000000000000001e-250 < F < 1.74999999999999987e-110Initial program 99.5%
Simplified99.7%
Taylor expanded in B around 0 64.6%
Taylor expanded in F around 0 64.6%
if 7400 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification73.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.22e-15)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -3.5e-101)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 4.5e-95)
(/ (* x (- (cos B))) (sin B))
(if (<= F 2.5e-24)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 7400.0)
(* (cos B) (/ x (- (sin B))))
(- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.22e-15) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -3.5e-101) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 4.5e-95) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 2.5e-24) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 7400.0) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.22d-15)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-3.5d-101)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 4.5d-95) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 2.5d-24) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 7400.0d0) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.22e-15) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -3.5e-101) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 4.5e-95) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 2.5e-24) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 7400.0) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.22e-15: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -3.5e-101: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 4.5e-95: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 2.5e-24: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 7400.0: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.22e-15) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -3.5e-101) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 4.5e-95) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 2.5e-24) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 7400.0) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.22e-15) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -3.5e-101) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 4.5e-95) tmp = (x * -cos(B)) / sin(B); elseif (F <= 2.5e-24) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 7400.0) tmp = cos(B) * (x / -sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.22e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.5e-101], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-95], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-24], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7400.0], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.22 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-24}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 7400:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.21999999999999991e-15Initial program 63.6%
Simplified78.6%
Taylor expanded in x around 0 78.5%
associate-*l/78.6%
*-lft-identity78.6%
+-commutative78.6%
unpow278.6%
fma-undefine78.6%
Simplified78.6%
Taylor expanded in F around -inf 98.6%
if -1.21999999999999991e-15 < F < -3.49999999999999994e-101Initial program 99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in F around inf 66.9%
associate-*l/67.3%
inv-pow67.3%
sqrt-pow167.3%
+-commutative67.3%
fma-define67.3%
metadata-eval67.3%
Applied egg-rr67.3%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in x around 0 67.5%
if -3.49999999999999994e-101 < F < 4.5e-95Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around inf 78.3%
associate-*r/78.3%
neg-mul-178.3%
distribute-rgt-neg-in78.3%
Applied egg-rr78.3%
if 4.5e-95 < F < 2.4999999999999999e-24Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 70.6%
associate-*l/70.4%
inv-pow70.4%
sqrt-pow170.4%
+-commutative70.4%
fma-define70.4%
metadata-eval70.4%
Applied egg-rr70.4%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 70.6%
if 2.4999999999999999e-24 < F < 7400Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 83.2%
associate-*l/83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in x around inf 85.9%
mul-1-neg85.9%
*-commutative85.9%
associate-*r/85.9%
distribute-rgt-neg-in85.9%
distribute-neg-frac85.9%
Simplified85.9%
if 7400 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification83.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.36e-15)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -4.6e-103)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 1.7e-96)
(/ (* x (- (cos B))) (sin B))
(if (<= F 3e-24)
(* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))
(- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.36e-15) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -4.6e-103) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 1.7e-96) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 3e-24) {
tmp = (F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.36d-15)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-4.6d-103)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 1.7d-96) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 3d-24) then
tmp = (f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
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.36e-15) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -4.6e-103) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 1.7e-96) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 3e-24) {
tmp = (F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.36e-15: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -4.6e-103: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 1.7e-96: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 3e-24: tmp = (F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0)))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.36e-15) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -4.6e-103) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 1.7e-96) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 3e-24) tmp = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.36e-15) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -4.6e-103) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 1.7e-96) tmp = (x * -cos(B)) / sin(B); elseif (F <= 3e-24) tmp = (F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0)))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.36e-15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4.6e-103], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-96], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3e-24], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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.36 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-103}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-96}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-24}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.36e-15Initial program 63.6%
Simplified78.6%
Taylor expanded in x around 0 78.5%
associate-*l/78.6%
*-lft-identity78.6%
+-commutative78.6%
unpow278.6%
fma-undefine78.6%
Simplified78.6%
Taylor expanded in F around -inf 98.6%
if -1.36e-15 < F < -4.6000000000000001e-103Initial program 99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in F around inf 66.9%
associate-*l/67.3%
inv-pow67.3%
sqrt-pow167.3%
+-commutative67.3%
fma-define67.3%
metadata-eval67.3%
Applied egg-rr67.3%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in x around 0 67.5%
if -4.6000000000000001e-103 < F < 1.7e-96Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around inf 78.3%
associate-*r/78.3%
neg-mul-178.3%
distribute-rgt-neg-in78.3%
Applied egg-rr78.3%
if 1.7e-96 < F < 2.99999999999999995e-24Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 70.6%
if 2.99999999999999995e-24 < F Initial program 51.8%
Simplified73.3%
Taylor expanded in x around 0 73.3%
associate-*l/73.3%
*-lft-identity73.3%
+-commutative73.3%
unpow273.3%
fma-undefine73.3%
Simplified73.3%
Taylor expanded in F around inf 98.6%
Final simplification89.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.5e-19)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -9.2e-101)
(/ (* F (sqrt 0.5)) (sin B))
(if (<= F 5.7e-95)
(/ (* x (- (cos B))) (sin B))
(if (<= F 1.85e-24)
(* F (/ (sqrt 0.5) (sin B)))
(- (/ 1.0 (sin B)) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.5e-19) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -9.2e-101) {
tmp = (F * sqrt(0.5)) / sin(B);
} else if (F <= 5.7e-95) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 1.85e-24) {
tmp = F * (sqrt(0.5) / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.5d-19)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-9.2d-101)) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else if (f <= 5.7d-95) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 1.85d-24) then
tmp = f * (sqrt(0.5d0) / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.5e-19) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -9.2e-101) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else if (F <= 5.7e-95) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 1.85e-24) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.5e-19: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -9.2e-101: tmp = (F * math.sqrt(0.5)) / math.sin(B) elif F <= 5.7e-95: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 1.85e-24: tmp = F * (math.sqrt(0.5) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.5e-19) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -9.2e-101) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); elseif (F <= 5.7e-95) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 1.85e-24) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.5e-19) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -9.2e-101) tmp = (F * sqrt(0.5)) / sin(B); elseif (F <= 5.7e-95) tmp = (x * -cos(B)) / sin(B); elseif (F <= 1.85e-24) tmp = F * (sqrt(0.5) / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.5e-19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -9.2e-101], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.7e-95], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.85e-24], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $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 -5.5 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -9.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 5.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-24}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.4999999999999996e-19Initial program 63.6%
Simplified78.6%
Taylor expanded in x around 0 78.5%
associate-*l/78.6%
*-lft-identity78.6%
+-commutative78.6%
unpow278.6%
fma-undefine78.6%
Simplified78.6%
Taylor expanded in F around -inf 98.6%
if -5.4999999999999996e-19 < F < -9.1999999999999998e-101Initial program 99.3%
Taylor expanded in F around 0 99.3%
Taylor expanded in F around inf 66.9%
associate-*l/67.3%
inv-pow67.3%
sqrt-pow167.3%
+-commutative67.3%
fma-define67.3%
metadata-eval67.3%
Applied egg-rr67.3%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in x around 0 67.5%
if -9.1999999999999998e-101 < F < 5.7e-95Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around inf 78.3%
associate-*r/78.3%
neg-mul-178.3%
distribute-rgt-neg-in78.3%
Applied egg-rr78.3%
if 5.7e-95 < F < 1.8499999999999999e-24Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 70.6%
associate-*l/70.4%
inv-pow70.4%
sqrt-pow170.4%
+-commutative70.4%
fma-define70.4%
metadata-eval70.4%
Applied egg-rr70.4%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 70.6%
if 1.8499999999999999e-24 < F Initial program 51.8%
Simplified73.3%
Taylor expanded in x around 0 73.3%
associate-*l/73.3%
*-lft-identity73.3%
+-commutative73.3%
unpow273.3%
fma-undefine73.3%
Simplified73.3%
Taylor expanded in F around inf 98.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-22)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.225)
(+ (* x (/ -1.0 (tan B))) (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F 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 <= -6e-22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.225) {
tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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 <= (-6d-22)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.225d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / 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 <= -6e-22) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.225) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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 <= -6e-22: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.225: tmp = (x * (-1.0 / math.tan(B))) + (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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 <= -6e-22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.225) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / 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 <= -6e-22) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.225) tmp = (x * (-1.0 / tan(B))) + (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / 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, -6e-22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.225], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $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 -6 \cdot 10^{-22}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.225:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.9999999999999998e-22Initial program 64.1%
Simplified78.8%
Taylor expanded in x around 0 78.8%
associate-*l/78.8%
*-lft-identity78.8%
+-commutative78.8%
unpow278.8%
fma-undefine78.8%
Simplified78.8%
Taylor expanded in F around -inf 97.3%
if -5.9999999999999998e-22 < F < 0.225000000000000006Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in B around 0 76.7%
if 0.225000000000000006 < F Initial program 49.3%
Simplified71.9%
Taylor expanded in x around 0 72.0%
associate-*l/71.9%
*-lft-identity71.9%
+-commutative71.9%
unpow271.9%
fma-undefine71.9%
Simplified71.9%
Taylor expanded in F around inf 99.8%
Final simplification89.4%
(FPCore (F B x)
:precision binary64
(if (<= F -4.9e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4e-95)
(/ (* x (- (cos B))) (sin B))
(if (<= F 8.5e-25)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 215000.0)
(* (cos B) (/ x (- (sin B))))
(- (/ 1.0 (sin B)) (/ x B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.9e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4e-95) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 8.5e-25) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 215000.0) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.9d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4d-95) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 8.5d-25) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 215000.0d0) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.9e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4e-95) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 8.5e-25) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 215000.0) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.9e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4e-95: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 8.5e-25: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 215000.0: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.9e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4e-95) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 8.5e-25) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 215000.0) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.9e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4e-95) tmp = (x * -cos(B)) / sin(B); elseif (F <= 8.5e-25) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 215000.0) tmp = cos(B) * (x / -sin(B)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.9e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-95], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-25], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 215000.0], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-95}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-25}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 215000:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.9e-5Initial program 61.5%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 84.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified84.2%
if -4.9e-5 < F < 3.99999999999999996e-95Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around inf 72.4%
associate-*r/72.4%
neg-mul-172.4%
distribute-rgt-neg-in72.4%
Applied egg-rr72.4%
if 3.99999999999999996e-95 < F < 8.49999999999999981e-25Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 70.6%
associate-*l/70.4%
inv-pow70.4%
sqrt-pow170.4%
+-commutative70.4%
fma-define70.4%
metadata-eval70.4%
Applied egg-rr70.4%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 70.6%
if 8.49999999999999981e-25 < F < 215000Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 83.2%
associate-*l/83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in x around inf 85.9%
mul-1-neg85.9%
*-commutative85.9%
associate-*r/85.9%
distribute-rgt-neg-in85.9%
distribute-neg-frac85.9%
Simplified85.9%
if 215000 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification78.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (cos B) (/ x (- (sin B))))))
(if (<= F -1.6e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 5.5e-95)
t_0
(if (<= F 2.95e-24)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 7800.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = cos(B) * (x / -sin(B));
double tmp;
if (F <= -1.6e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 5.5e-95) {
tmp = t_0;
} else if (F <= 2.95e-24) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 7800.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = cos(b) * (x / -sin(b))
if (f <= (-1.6d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 5.5d-95) then
tmp = t_0
else if (f <= 2.95d-24) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 7800.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.cos(B) * (x / -Math.sin(B));
double tmp;
if (F <= -1.6e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 5.5e-95) {
tmp = t_0;
} else if (F <= 2.95e-24) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 7800.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.cos(B) * (x / -math.sin(B)) tmp = 0 if F <= -1.6e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 5.5e-95: tmp = t_0 elif F <= 2.95e-24: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 7800.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(cos(B) * Float64(x / Float64(-sin(B)))) tmp = 0.0 if (F <= -1.6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 5.5e-95) tmp = t_0; elseif (F <= 2.95e-24) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 7800.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = cos(B) * (x / -sin(B)); tmp = 0.0; if (F <= -1.6e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 5.5e-95) tmp = t_0; elseif (F <= 2.95e-24) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 7800.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); 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, -1.6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-95], t$95$0, If[LessEqual[F, 2.95e-24], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7800.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos B \cdot \frac{x}{-\sin B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-95}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-24}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 7800:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.59999999999999993e-5Initial program 61.5%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 84.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified84.2%
if -1.59999999999999993e-5 < F < 5.50000000000000003e-95 or 2.9500000000000001e-24 < F < 7800Initial program 99.6%
Simplified99.6%
Taylor expanded in F around inf 39.0%
associate-*l/38.9%
*-commutative38.9%
Simplified38.9%
Taylor expanded in x around inf 73.2%
mul-1-neg73.2%
*-commutative73.2%
associate-*r/73.2%
distribute-rgt-neg-in73.2%
distribute-neg-frac73.2%
Simplified73.2%
if 5.50000000000000003e-95 < F < 2.9500000000000001e-24Initial program 99.4%
Taylor expanded in F around 0 99.4%
Taylor expanded in F around inf 70.6%
associate-*l/70.4%
inv-pow70.4%
sqrt-pow170.4%
+-commutative70.4%
fma-define70.4%
metadata-eval70.4%
Applied egg-rr70.4%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 70.6%
if 7800 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification78.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))
(t_1 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))))
(if (<= F -4.1e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.15e-79)
t_0
(if (<= F -9e-260)
(/ (- (* F t_1) x) B)
(if (<= F 3.1e-249)
t_0
(if (<= F 3.2e-24)
(- (* t_1 (/ F B)) (/ x B))
(if (<= F 16500.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double t_1 = sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -4.1e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.15e-79) {
tmp = t_0;
} else if (F <= -9e-260) {
tmp = ((F * t_1) - x) / B;
} else if (F <= 3.1e-249) {
tmp = t_0;
} else if (F <= 3.2e-24) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 16500.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
t_1 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
if (f <= (-4.1d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.15d-79)) then
tmp = t_0
else if (f <= (-9d-260)) then
tmp = ((f * t_1) - x) / b
else if (f <= 3.1d-249) then
tmp = t_0
else if (f <= 3.2d-24) then
tmp = (t_1 * (f / b)) - (x / b)
else if (f <= 16500.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double t_1 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double tmp;
if (F <= -4.1e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.15e-79) {
tmp = t_0;
} else if (F <= -9e-260) {
tmp = ((F * t_1) - x) / B;
} else if (F <= 3.1e-249) {
tmp = t_0;
} else if (F <= 3.2e-24) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 16500.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) t_1 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) tmp = 0 if F <= -4.1e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.15e-79: tmp = t_0 elif F <= -9e-260: tmp = ((F * t_1) - x) / B elif F <= 3.1e-249: tmp = t_0 elif F <= 3.2e-24: tmp = (t_1 * (F / B)) - (x / B) elif F <= 16500.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) t_1 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) tmp = 0.0 if (F <= -4.1e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.15e-79) tmp = t_0; elseif (F <= -9e-260) tmp = Float64(Float64(Float64(F * t_1) - x) / B); elseif (F <= 3.1e-249) tmp = t_0; elseif (F <= 3.2e-24) tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / B)); elseif (F <= 16500.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); t_1 = sqrt((1.0 / (2.0 + (x * 2.0)))); tmp = 0.0; if (F <= -4.1e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.15e-79) tmp = t_0; elseif (F <= -9e-260) tmp = ((F * t_1) - x) / B; elseif (F <= 3.1e-249) tmp = t_0; elseif (F <= 3.2e-24) tmp = (t_1 * (F / B)) - (x / B); elseif (F <= 16500.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[F, -4.1e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-79], t$95$0, If[LessEqual[F, -9e-260], N[(N[(N[(F * t$95$1), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.1e-249], t$95$0, If[LessEqual[F, 3.2e-24], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 16500.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
t_1 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
\mathbf{if}\;F \leq -4.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-79}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -9 \cdot 10^{-260}:\\
\;\;\;\;\frac{F \cdot t\_1 - x}{B}\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-249}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 16500:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.10000000000000005e-5Initial program 61.5%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 84.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified84.2%
if -4.10000000000000005e-5 < F < -1.15000000000000006e-79 or -8.9999999999999995e-260 < F < 3.09999999999999986e-249 or 3.20000000000000012e-24 < F < 16500Initial program 99.5%
Taylor expanded in F around -inf 55.1%
Taylor expanded in B around 0 68.5%
if -1.15000000000000006e-79 < F < -8.9999999999999995e-260Initial program 99.7%
Simplified99.6%
Taylor expanded in B around 0 49.0%
Taylor expanded in F around 0 49.0%
if 3.09999999999999986e-249 < F < 3.20000000000000012e-24Initial program 99.5%
Simplified99.6%
Taylor expanded in B around 0 53.9%
Taylor expanded in F around 0 53.9%
if 16500 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification71.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B)))
(t_1 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)))
(if (<= F -4.9e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.05e-78)
t_0
(if (<= F -3.2e-264)
t_1
(if (<= F 1.85e-249)
t_0
(if (<= F 3.2e-24)
t_1
(if (<= F 29000.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double t_1 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -4.9e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.05e-78) {
tmp = t_0;
} else if (F <= -3.2e-264) {
tmp = t_1;
} else if (F <= 1.85e-249) {
tmp = t_0;
} else if (F <= 3.2e-24) {
tmp = t_1;
} else if (F <= 29000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
t_1 = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
if (f <= (-4.9d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.05d-78)) then
tmp = t_0
else if (f <= (-3.2d-264)) then
tmp = t_1
else if (f <= 1.85d-249) then
tmp = t_0
else if (f <= 3.2d-24) then
tmp = t_1
else if (f <= 29000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double t_1 = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double tmp;
if (F <= -4.9e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.05e-78) {
tmp = t_0;
} else if (F <= -3.2e-264) {
tmp = t_1;
} else if (F <= 1.85e-249) {
tmp = t_0;
} else if (F <= 3.2e-24) {
tmp = t_1;
} else if (F <= 29000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) t_1 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B tmp = 0 if F <= -4.9e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.05e-78: tmp = t_0 elif F <= -3.2e-264: tmp = t_1 elif F <= 1.85e-249: tmp = t_0 elif F <= 3.2e-24: tmp = t_1 elif F <= 29000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) t_1 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) tmp = 0.0 if (F <= -4.9e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.05e-78) tmp = t_0; elseif (F <= -3.2e-264) tmp = t_1; elseif (F <= 1.85e-249) tmp = t_0; elseif (F <= 3.2e-24) tmp = t_1; elseif (F <= 29000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); t_1 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; tmp = 0.0; if (F <= -4.9e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.05e-78) tmp = t_0; elseif (F <= -3.2e-264) tmp = t_1; elseif (F <= 1.85e-249) tmp = t_0; elseif (F <= 3.2e-24) tmp = t_1; elseif (F <= 29000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -4.9e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.05e-78], t$95$0, If[LessEqual[F, -3.2e-264], t$95$1, If[LessEqual[F, 1.85e-249], t$95$0, If[LessEqual[F, 3.2e-24], t$95$1, If[LessEqual[F, 29000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
t_1 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -4.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.05 \cdot 10^{-78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 1.85 \cdot 10^{-249}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 29000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.9e-5Initial program 61.5%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 84.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified84.2%
if -4.9e-5 < F < -2.0499999999999999e-78 or -3.19999999999999995e-264 < F < 1.84999999999999988e-249 or 3.20000000000000012e-24 < F < 29000Initial program 99.5%
Taylor expanded in F around -inf 55.1%
Taylor expanded in B around 0 68.5%
if -2.0499999999999999e-78 < F < -3.19999999999999995e-264 or 1.84999999999999988e-249 < F < 3.20000000000000012e-24Initial program 99.6%
Simplified99.6%
Taylor expanded in B around 0 51.9%
Taylor expanded in F around 0 51.9%
if 29000 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification71.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* x (/ -1.0 (tan B))) (/ -1.0 B))))
(if (<= F -4.9e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.45e-111)
t_0
(if (<= F -1.85e-257)
(/ x (- (sin B)))
(if (<= F 7400.0) t_0 (- (/ 1.0 (sin B)) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B);
double tmp;
if (F <= -4.9e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.45e-111) {
tmp = t_0;
} else if (F <= -1.85e-257) {
tmp = x / -sin(B);
} else if (F <= 7400.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((-1.0d0) / tan(b))) + ((-1.0d0) / b)
if (f <= (-4.9d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.45d-111)) then
tmp = t_0
else if (f <= (-1.85d-257)) then
tmp = x / -sin(b)
else if (f <= 7400.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (x * (-1.0 / Math.tan(B))) + (-1.0 / B);
double tmp;
if (F <= -4.9e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.45e-111) {
tmp = t_0;
} else if (F <= -1.85e-257) {
tmp = x / -Math.sin(B);
} else if (F <= 7400.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = (x * (-1.0 / math.tan(B))) + (-1.0 / B) tmp = 0 if F <= -4.9e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.45e-111: tmp = t_0 elif F <= -1.85e-257: tmp = x / -math.sin(B) elif F <= 7400.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(-1.0 / B)) tmp = 0.0 if (F <= -4.9e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.45e-111) tmp = t_0; elseif (F <= -1.85e-257) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 7400.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (x * (-1.0 / tan(B))) + (-1.0 / B); tmp = 0.0; if (F <= -4.9e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.45e-111) tmp = t_0; elseif (F <= -1.85e-257) tmp = x / -sin(B); elseif (F <= 7400.0) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.9e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.45e-111], t$95$0, If[LessEqual[F, -1.85e-257], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 7400.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{-1}{\tan B} + \frac{-1}{B}\\
\mathbf{if}\;F \leq -4.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.45 \cdot 10^{-111}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -1.85 \cdot 10^{-257}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 7400:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -4.9e-5Initial program 61.5%
Taylor expanded in F around -inf 98.3%
Taylor expanded in B around 0 84.2%
associate-*r/47.2%
neg-mul-147.2%
Simplified84.2%
if -4.9e-5 < F < -2.4500000000000001e-111 or -1.84999999999999992e-257 < F < 7400Initial program 99.5%
Taylor expanded in F around -inf 38.9%
Taylor expanded in B around 0 48.4%
if -2.4500000000000001e-111 < F < -1.84999999999999992e-257Initial program 99.8%
Taylor expanded in F around 0 99.8%
Taylor expanded in x around inf 66.5%
Taylor expanded in B around 0 49.2%
if 7400 < F Initial program 47.9%
Simplified71.2%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 80.8%
Final simplification67.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.75e-31) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 700.0) (/ x (- (sin B))) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-31) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 700.0) {
tmp = x / -sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.75d-31)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 700.0d0) then
tmp = x / -sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-31) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 700.0) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.75e-31: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 700.0: tmp = x / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-31) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 700.0) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.75e-31) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 700.0) tmp = x / -sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-31], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 700.0], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 700:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.74999999999999993e-31Initial program 64.5%
Taylor expanded in F around -inf 95.9%
Taylor expanded in B around 0 77.7%
associate-*r/46.3%
neg-mul-146.3%
Simplified77.7%
if -1.74999999999999993e-31 < F < 700Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around inf 65.8%
Taylor expanded in B around 0 36.2%
if 700 < F Initial program 48.6%
Simplified71.6%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 79.7%
Final simplification61.0%
(FPCore (F B x) :precision binary64 (if (<= F -5e-31) (/ (- -1.0 x) B) (if (<= F 700.0) (/ x (- (sin B))) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 700.0) {
tmp = x / -sin(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5d-31)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 700.0d0) then
tmp = x / -sin(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 700.0) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e-31: tmp = (-1.0 - x) / B elif F <= 700.0: tmp = x / -math.sin(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e-31) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 700.0) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e-31) tmp = (-1.0 - x) / B; elseif (F <= 700.0) tmp = x / -sin(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e-31], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 700.0], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 700:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -5e-31Initial program 64.5%
Simplified79.1%
Taylor expanded in B around 0 46.3%
Taylor expanded in F around -inf 53.7%
if -5e-31 < F < 700Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around inf 65.8%
Taylor expanded in B around 0 36.2%
if 700 < F Initial program 48.6%
Simplified71.6%
Taylor expanded in F around inf 99.8%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in B around 0 79.7%
Final simplification54.1%
(FPCore (F B x) :precision binary64 (if (<= F -2.1e-31) (/ (- -1.0 x) B) (if (<= F 700.0) (/ x (- (sin B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.1e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 700.0) {
tmp = x / -sin(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 <= (-2.1d-31)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 700.0d0) then
tmp = x / -sin(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 <= -2.1e-31) {
tmp = (-1.0 - x) / B;
} else if (F <= 700.0) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.1e-31: tmp = (-1.0 - x) / B elif F <= 700.0: tmp = x / -math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.1e-31) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 700.0) tmp = Float64(x / Float64(-sin(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 <= -2.1e-31) tmp = (-1.0 - x) / B; elseif (F <= 700.0) tmp = x / -sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.1e-31], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 700.0], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.1 \cdot 10^{-31}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 700:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.09999999999999991e-31Initial program 64.5%
Simplified79.1%
Taylor expanded in B around 0 46.3%
Taylor expanded in F around -inf 53.7%
if -2.09999999999999991e-31 < F < 700Initial program 99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around inf 65.8%
Taylor expanded in B around 0 36.2%
if 700 < F Initial program 48.6%
Simplified71.6%
Taylor expanded in B around 0 42.6%
Taylor expanded in F around inf 55.9%
Final simplification47.1%
(FPCore (F B x) :precision binary64 (if (<= F -8.6e-66) (/ (- -1.0 x) B) (if (<= F 1.55e-68) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.6e-66) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.55e-68) {
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.6d-66)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.55d-68) 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.6e-66) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.55e-68) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.6e-66: tmp = (-1.0 - x) / B elif F <= 1.55e-68: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.6e-66) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.55e-68) 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.6e-66) tmp = (-1.0 - x) / B; elseif (F <= 1.55e-68) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.6e-66], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.55e-68], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.6 \cdot 10^{-66}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.60000000000000027e-66Initial program 66.4%
Simplified80.1%
Taylor expanded in B around 0 45.3%
Taylor expanded in F around -inf 51.1%
if -8.60000000000000027e-66 < F < 1.55e-68Initial program 99.6%
Simplified99.6%
Taylor expanded in B around 0 46.5%
Taylor expanded in F around 0 39.5%
associate-*r/39.5%
neg-mul-139.5%
Simplified39.5%
if 1.55e-68 < F Initial program 57.9%
Simplified76.7%
Taylor expanded in B around 0 41.6%
Taylor expanded in F around inf 47.6%
Final simplification45.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.55e-59) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-59) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.55d-59)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.55e-59) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.55e-59: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.55e-59) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.55e-59) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.55e-59], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.55 \cdot 10^{-59}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.55e-59Initial program 66.4%
Simplified80.1%
Taylor expanded in B around 0 45.3%
Taylor expanded in F around -inf 51.1%
if -1.55e-59 < F Initial program 77.9%
Simplified87.7%
Taylor expanded in B around 0 43.9%
Taylor expanded in F around 0 32.8%
associate-*r/32.8%
neg-mul-132.8%
Simplified32.8%
Final simplification38.3%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 74.5%
Simplified85.4%
Taylor expanded in B around 0 44.3%
Taylor expanded in F around 0 31.7%
associate-*r/31.7%
neg-mul-131.7%
Simplified31.7%
Final simplification31.7%
(FPCore (F B x) :precision binary64 (/ x B))
double code(double F, double B, double x) {
return x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / b
end function
public static double code(double F, double B, double x) {
return x / B;
}
def code(F, B, x): return x / B
function code(F, B, x) return Float64(x / B) end
function tmp = code(F, B, x) tmp = x / B; end
code[F_, B_, x_] := N[(x / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{B}
\end{array}
Initial program 74.5%
Simplified85.4%
Taylor expanded in B around 0 44.3%
Taylor expanded in F around 0 31.7%
associate-*r/31.7%
neg-mul-131.7%
Simplified31.7%
add-sqr-sqrt10.4%
sqrt-unprod11.5%
sqr-neg11.5%
sqrt-unprod1.5%
add-sqr-sqrt2.8%
*-un-lft-identity2.8%
Applied egg-rr2.8%
*-lft-identity2.8%
Simplified2.8%
herbie shell --seed 2024110
(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))))))