
(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 19 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 -25500000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4e-18)
(- (/ (* 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 <= -25500000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4e-18) {
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 <= (-25500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d-18) 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 <= -25500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4e-18) {
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 <= -25500000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4e-18: 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 <= -25500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4e-18) 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 <= -25500000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4e-18) 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, -25500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4e-18], 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 -25500000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.55e7Initial program 54.8%
Simplified69.6%
Taylor expanded in x around 0 72.7%
associate-*l/72.7%
*-lft-identity72.7%
+-commutative72.7%
unpow272.7%
fma-undefine72.7%
Simplified72.7%
Taylor expanded in F around -inf 99.8%
if -2.55e7 < F < 1.40000000000000006e-18Initial program 76.6%
Simplified76.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.6%
*-commutative99.6%
Simplified99.6%
if 1.40000000000000006e-18 < F Initial program 52.4%
Simplified64.7%
Taylor expanded in x around 0 74.3%
associate-*l/74.3%
*-lft-identity74.3%
+-commutative74.3%
unpow274.3%
fma-undefine74.3%
Simplified74.3%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (sqrt 0.5) (/ F (sin B)))) (t_1 (/ x (tan B))))
(if (<= F -2.1e+245)
(- (/ -1.0 B) t_1)
(if (<= F -3.2e-23)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.8e-71)
t_0
(if (<= F 7.2e-90)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 4.2e-47)
t_0
(if (or (<= F 6.2e+183) (not (<= F 1.85e+292)))
(- (/ 1.0 B) t_1)
(- (/ F (* F (sin B))) (/ x B))))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) * (F / sin(B));
double t_1 = x / tan(B);
double tmp;
if (F <= -2.1e+245) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -3.2e-23) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.8e-71) {
tmp = t_0;
} else if (F <= 7.2e-90) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 4.2e-47) {
tmp = t_0;
} else if ((F <= 6.2e+183) || !(F <= 1.85e+292)) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt(0.5d0) * (f / sin(b))
t_1 = x / tan(b)
if (f <= (-2.1d+245)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-3.2d-23)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.8d-71)) then
tmp = t_0
else if (f <= 7.2d-90) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 4.2d-47) then
tmp = t_0
else if ((f <= 6.2d+183) .or. (.not. (f <= 1.85d+292))) then
tmp = (1.0d0 / b) - t_1
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) * (F / Math.sin(B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.1e+245) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -3.2e-23) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.8e-71) {
tmp = t_0;
} else if (F <= 7.2e-90) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 4.2e-47) {
tmp = t_0;
} else if ((F <= 6.2e+183) || !(F <= 1.85e+292)) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) * (F / math.sin(B)) t_1 = x / math.tan(B) tmp = 0 if F <= -2.1e+245: tmp = (-1.0 / B) - t_1 elif F <= -3.2e-23: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.8e-71: tmp = t_0 elif F <= 7.2e-90: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 4.2e-47: tmp = t_0 elif (F <= 6.2e+183) or not (F <= 1.85e+292): tmp = (1.0 / B) - t_1 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) * Float64(F / sin(B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.1e+245) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -3.2e-23) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.8e-71) tmp = t_0; elseif (F <= 7.2e-90) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 4.2e-47) tmp = t_0; elseif ((F <= 6.2e+183) || !(F <= 1.85e+292)) tmp = Float64(Float64(1.0 / B) - t_1); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) * (F / sin(B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -2.1e+245) tmp = (-1.0 / B) - t_1; elseif (F <= -3.2e-23) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.8e-71) tmp = t_0; elseif (F <= 7.2e-90) tmp = (x * cos(B)) / -sin(B); elseif (F <= 4.2e-47) tmp = t_0; elseif ((F <= 6.2e+183) || ~((F <= 1.85e+292))) tmp = (1.0 / B) - t_1; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.1e+245], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.2e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.8e-71], t$95$0, If[LessEqual[F, 7.2e-90], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 4.2e-47], t$95$0, If[Or[LessEqual[F, 6.2e+183], N[Not[LessEqual[F, 1.85e+292]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{0.5} \cdot \frac{F}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.1 \cdot 10^{+245}:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -3.2 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{-71}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{-90}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-47}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{+183} \lor \neg \left(F \leq 1.85 \cdot 10^{+292}\right):\\
\;\;\;\;\frac{1}{B} - t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.09999999999999996e245Initial program 33.5%
Simplified62.6%
Taylor expanded in x around 0 62.6%
associate-*l/62.6%
*-lft-identity62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in B around 0 62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in F around -inf 94.6%
if -2.09999999999999996e245 < F < -3.19999999999999976e-23Initial program 62.8%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 79.1%
if -3.19999999999999976e-23 < F < -5.7999999999999997e-71 or 7.19999999999999961e-90 < F < 4.2000000000000001e-47Initial program 89.6%
Taylor expanded in F around 0 89.6%
Taylor expanded in F around inf 84.7%
Taylor expanded in x around 0 84.9%
if -5.7999999999999997e-71 < F < 7.19999999999999961e-90Initial program 75.7%
associate-*l/75.7%
+-commutative75.7%
*-commutative75.7%
fma-undefine75.7%
fma-define75.7%
metadata-eval75.7%
metadata-eval75.7%
associate-*r/75.6%
clear-num75.6%
un-div-inv75.6%
fma-define75.6%
fma-undefine75.6%
*-commutative75.6%
fma-define75.6%
fma-define75.6%
Applied egg-rr75.6%
Taylor expanded in F around 0 75.6%
Taylor expanded in x around inf 84.3%
mul-1-neg84.3%
Simplified84.3%
if 4.2000000000000001e-47 < F < 6.1999999999999997e183 or 1.85000000000000005e292 < F Initial program 68.2%
Simplified77.3%
Taylor expanded in x around 0 95.2%
associate-*l/95.2%
*-lft-identity95.2%
+-commutative95.2%
unpow295.2%
fma-undefine95.2%
Simplified95.2%
Taylor expanded in B around 0 85.7%
+-commutative85.7%
unpow285.7%
fma-undefine85.7%
Simplified85.7%
Taylor expanded in F around inf 83.0%
if 6.1999999999999997e183 < F < 1.85000000000000005e292Initial program 20.7%
associate-*l/35.3%
+-commutative35.3%
*-commutative35.3%
fma-undefine35.3%
fma-define35.3%
metadata-eval35.3%
metadata-eval35.3%
associate-*r/35.3%
clear-num35.3%
un-div-inv35.3%
fma-define35.3%
fma-undefine35.3%
*-commutative35.3%
fma-define35.3%
fma-define35.3%
Applied egg-rr35.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 84.5%
Final simplification83.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.4e-23)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.3e-77)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1.4e-18)
(- (* F (* (sqrt 0.5) (/ 1.0 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 <= -6.4e-23) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.3e-77) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.4e-18) {
tmp = (F * (sqrt(0.5) * (1.0 / 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 <= (-6.4d-23)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.3d-77)) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1.4d-18) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / 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 <= -6.4e-23) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.3e-77) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.4e-18) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / 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 <= -6.4e-23: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.3e-77: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1.4e-18: tmp = (F * (math.sqrt(0.5) * (1.0 / 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 <= -6.4e-23) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.3e-77) 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 <= 1.4e-18) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / 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 <= -6.4e-23) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.3e-77) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1.4e-18) tmp = (F * (sqrt(0.5) * (1.0 / 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, -6.4e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.3e-77], 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, 1.4e-18], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / 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 -6.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -1.3 \cdot 10^{-77}:\\
\;\;\;\;\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 1.4 \cdot 10^{-18}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.39999999999999951e-23Initial program 55.2%
Simplified68.8%
Taylor expanded in x around 0 74.7%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-undefine74.6%
Simplified74.6%
Taylor expanded in F around -inf 98.5%
if -6.39999999999999951e-23 < F < -1.3000000000000001e-77Initial program 91.8%
Taylor expanded in B around 0 91.8%
if -1.3000000000000001e-77 < F < 1.40000000000000006e-18Initial program 75.5%
Simplified75.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 87.8%
+-commutative87.8%
unpow287.8%
fma-undefine87.8%
Simplified87.8%
Taylor expanded in F around 0 87.8%
if 1.40000000000000006e-18 < F Initial program 52.4%
Simplified64.7%
Taylor expanded in x around 0 74.3%
associate-*l/74.3%
*-lft-identity74.3%
+-commutative74.3%
unpow274.3%
fma-undefine74.3%
Simplified74.3%
Taylor expanded in F around inf 99.8%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (sqrt 0.5) (/ F (sin B)))) (t_1 (/ x (tan B))))
(if (<= F -1.8e-25)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -6.2e-71)
t_0
(if (<= F 1.25e-91)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 6.2e-44) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) * (F / sin(B));
double t_1 = x / tan(B);
double tmp;
if (F <= -1.8e-25) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -6.2e-71) {
tmp = t_0;
} else if (F <= 1.25e-91) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 6.2e-44) {
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 = sqrt(0.5d0) * (f / sin(b))
t_1 = x / tan(b)
if (f <= (-1.8d-25)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-6.2d-71)) then
tmp = t_0
else if (f <= 1.25d-91) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 6.2d-44) 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 = Math.sqrt(0.5) * (F / Math.sin(B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.8e-25) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -6.2e-71) {
tmp = t_0;
} else if (F <= 1.25e-91) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 6.2e-44) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) * (F / math.sin(B)) t_1 = x / math.tan(B) tmp = 0 if F <= -1.8e-25: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -6.2e-71: tmp = t_0 elif F <= 1.25e-91: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 6.2e-44: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) * Float64(F / sin(B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e-25) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -6.2e-71) tmp = t_0; elseif (F <= 1.25e-91) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 6.2e-44) 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 = sqrt(0.5) * (F / sin(B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.8e-25) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -6.2e-71) tmp = t_0; elseif (F <= 1.25e-91) tmp = (x * cos(B)) / -sin(B); elseif (F <= 6.2e-44) 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[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e-25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6.2e-71], t$95$0, If[LessEqual[F, 1.25e-91], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 6.2e-44], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{0.5} \cdot \frac{F}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-71}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-91}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-44}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.8e-25Initial program 55.2%
Simplified68.8%
Taylor expanded in x around 0 74.7%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-undefine74.6%
Simplified74.6%
Taylor expanded in F around -inf 98.5%
if -1.8e-25 < F < -6.20000000000000004e-71 or 1.24999999999999999e-91 < F < 6.19999999999999968e-44Initial program 89.6%
Taylor expanded in F around 0 89.6%
Taylor expanded in F around inf 84.7%
Taylor expanded in x around 0 84.9%
if -6.20000000000000004e-71 < F < 1.24999999999999999e-91Initial program 75.7%
associate-*l/75.7%
+-commutative75.7%
*-commutative75.7%
fma-undefine75.7%
fma-define75.7%
metadata-eval75.7%
metadata-eval75.7%
associate-*r/75.6%
clear-num75.6%
un-div-inv75.6%
fma-define75.6%
fma-undefine75.6%
*-commutative75.6%
fma-define75.6%
fma-define75.6%
Applied egg-rr75.6%
Taylor expanded in F around 0 75.6%
Taylor expanded in x around inf 84.3%
mul-1-neg84.3%
Simplified84.3%
if 6.19999999999999968e-44 < F Initial program 54.2%
Simplified64.9%
Taylor expanded in x around 0 77.4%
associate-*l/77.5%
*-lft-identity77.5%
+-commutative77.5%
unpow277.5%
fma-undefine77.5%
Simplified77.5%
Taylor expanded in F around inf 94.6%
Final simplification91.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.95e-25)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.15e-74)
(* (sqrt 0.5) (/ F (sin B)))
(if (<= F 1.4e-18)
(- (* F (* (sqrt 0.5) (/ 1.0 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 <= -2.95e-25) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.15e-74) {
tmp = sqrt(0.5) * (F / sin(B));
} else if (F <= 1.4e-18) {
tmp = (F * (sqrt(0.5) * (1.0 / 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 <= (-2.95d-25)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.15d-74)) then
tmp = sqrt(0.5d0) * (f / sin(b))
else if (f <= 1.4d-18) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / 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 <= -2.95e-25) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.15e-74) {
tmp = Math.sqrt(0.5) * (F / Math.sin(B));
} else if (F <= 1.4e-18) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / 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 <= -2.95e-25: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.15e-74: tmp = math.sqrt(0.5) * (F / math.sin(B)) elif F <= 1.4e-18: tmp = (F * (math.sqrt(0.5) * (1.0 / 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 <= -2.95e-25) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.15e-74) tmp = Float64(sqrt(0.5) * Float64(F / sin(B))); elseif (F <= 1.4e-18) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / 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 <= -2.95e-25) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.15e-74) tmp = sqrt(0.5) * (F / sin(B)); elseif (F <= 1.4e-18) tmp = (F * (sqrt(0.5) * (1.0 / 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, -2.95e-25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.15e-74], N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-18], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / 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 -2.95 \cdot 10^{-25}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -2.15 \cdot 10^{-74}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{\sin B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-18}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.9499999999999999e-25Initial program 55.2%
Simplified68.8%
Taylor expanded in x around 0 74.7%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-undefine74.6%
Simplified74.6%
Taylor expanded in F around -inf 98.5%
if -2.9499999999999999e-25 < F < -2.14999999999999986e-74Initial program 91.8%
Taylor expanded in F around 0 91.8%
Taylor expanded in F around inf 84.5%
Taylor expanded in x around 0 84.5%
if -2.14999999999999986e-74 < F < 1.40000000000000006e-18Initial program 75.5%
Simplified75.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 87.8%
+-commutative87.8%
unpow287.8%
fma-undefine87.8%
Simplified87.8%
Taylor expanded in F around 0 87.8%
if 1.40000000000000006e-18 < F Initial program 52.4%
Simplified64.7%
Taylor expanded in x around 0 74.3%
associate-*l/74.3%
*-lft-identity74.3%
+-commutative74.3%
unpow274.3%
fma-undefine74.3%
Simplified74.3%
Taylor expanded in F around inf 99.8%
Final simplification93.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.95e-24)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -8.6e-78)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) (/ x B))
(if (<= F 1.4e-18)
(- (* F (* (sqrt 0.5) (/ 1.0 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.95e-24) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -8.6e-78) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.4e-18) {
tmp = (F * (sqrt(0.5) * (1.0 / 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.95d-24)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-8.6d-78)) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - (x / b)
else if (f <= 1.4d-18) then
tmp = (f * (sqrt(0.5d0) * (1.0d0 / 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.95e-24) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -8.6e-78) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - (x / B);
} else if (F <= 1.4e-18) {
tmp = (F * (Math.sqrt(0.5) * (1.0 / 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.95e-24: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -8.6e-78: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - (x / B) elif F <= 1.4e-18: tmp = (F * (math.sqrt(0.5) * (1.0 / 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.95e-24) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -8.6e-78) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); elseif (F <= 1.4e-18) tmp = Float64(Float64(F * Float64(sqrt(0.5) * Float64(1.0 / 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.95e-24) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -8.6e-78) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - (x / B); elseif (F <= 1.4e-18) tmp = (F * (sqrt(0.5) * (1.0 / 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.95e-24], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -8.6e-78], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-18], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] * N[(1.0 / 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.95 \cdot 10^{-24}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -8.6 \cdot 10^{-78}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-18}:\\
\;\;\;\;F \cdot \left(\sqrt{0.5} \cdot \frac{1}{B}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.95e-24Initial program 55.2%
Simplified68.8%
Taylor expanded in x around 0 74.7%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-undefine74.6%
Simplified74.6%
Taylor expanded in F around -inf 98.5%
if -1.95e-24 < F < -8.59999999999999987e-78Initial program 91.8%
associate-*l/91.8%
+-commutative91.8%
*-commutative91.8%
fma-undefine91.8%
fma-define91.8%
metadata-eval91.8%
metadata-eval91.8%
associate-*r/91.3%
clear-num91.5%
un-div-inv91.9%
fma-define91.9%
fma-undefine91.9%
*-commutative91.9%
fma-define91.9%
fma-define91.9%
Applied egg-rr91.9%
Taylor expanded in F around 0 91.5%
Taylor expanded in B around 0 91.5%
if -8.59999999999999987e-78 < F < 1.40000000000000006e-18Initial program 75.5%
Simplified75.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in B around 0 87.8%
+-commutative87.8%
unpow287.8%
fma-undefine87.8%
Simplified87.8%
Taylor expanded in F around 0 87.8%
if 1.40000000000000006e-18 < F Initial program 52.4%
Simplified64.7%
Taylor expanded in x around 0 74.3%
associate-*l/74.3%
*-lft-identity74.3%
+-commutative74.3%
unpow274.3%
fma-undefine74.3%
Simplified74.3%
Taylor expanded in F around inf 99.8%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (sqrt 0.5) (/ F (sin B)))) (t_1 (/ x (tan B))))
(if (<= F -6.8e-25)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -6e-71)
t_0
(if (<= F 1.35e-89)
(/ (* x (cos B)) (- (sin B)))
(if (<= F 7e-44)
t_0
(if (or (<= F 8e+182) (not (<= F 1.02e+293)))
(- (/ 1.0 B) t_1)
(- (/ F (* F (sin B))) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = sqrt(0.5) * (F / sin(B));
double t_1 = x / tan(B);
double tmp;
if (F <= -6.8e-25) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -6e-71) {
tmp = t_0;
} else if (F <= 1.35e-89) {
tmp = (x * cos(B)) / -sin(B);
} else if (F <= 7e-44) {
tmp = t_0;
} else if ((F <= 8e+182) || !(F <= 1.02e+293)) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = sqrt(0.5d0) * (f / sin(b))
t_1 = x / tan(b)
if (f <= (-6.8d-25)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-6d-71)) then
tmp = t_0
else if (f <= 1.35d-89) then
tmp = (x * cos(b)) / -sin(b)
else if (f <= 7d-44) then
tmp = t_0
else if ((f <= 8d+182) .or. (.not. (f <= 1.02d+293))) then
tmp = (1.0d0 / b) - t_1
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt(0.5) * (F / Math.sin(B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -6.8e-25) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -6e-71) {
tmp = t_0;
} else if (F <= 1.35e-89) {
tmp = (x * Math.cos(B)) / -Math.sin(B);
} else if (F <= 7e-44) {
tmp = t_0;
} else if ((F <= 8e+182) || !(F <= 1.02e+293)) {
tmp = (1.0 / B) - t_1;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt(0.5) * (F / math.sin(B)) t_1 = x / math.tan(B) tmp = 0 if F <= -6.8e-25: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -6e-71: tmp = t_0 elif F <= 1.35e-89: tmp = (x * math.cos(B)) / -math.sin(B) elif F <= 7e-44: tmp = t_0 elif (F <= 8e+182) or not (F <= 1.02e+293): tmp = (1.0 / B) - t_1 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(sqrt(0.5) * Float64(F / sin(B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.8e-25) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -6e-71) tmp = t_0; elseif (F <= 1.35e-89) tmp = Float64(Float64(x * cos(B)) / Float64(-sin(B))); elseif (F <= 7e-44) tmp = t_0; elseif ((F <= 8e+182) || !(F <= 1.02e+293)) tmp = Float64(Float64(1.0 / B) - t_1); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt(0.5) * (F / sin(B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -6.8e-25) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -6e-71) tmp = t_0; elseif (F <= 1.35e-89) tmp = (x * cos(B)) / -sin(B); elseif (F <= 7e-44) tmp = t_0; elseif ((F <= 8e+182) || ~((F <= 1.02e+293))) tmp = (1.0 / B) - t_1; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.8e-25], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -6e-71], t$95$0, If[LessEqual[F, 1.35e-89], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 7e-44], t$95$0, If[Or[LessEqual[F, 8e+182], N[Not[LessEqual[F, 1.02e+293]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{0.5} \cdot \frac{F}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -6 \cdot 10^{-71}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-89}:\\
\;\;\;\;\frac{x \cdot \cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 7 \cdot 10^{-44}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8 \cdot 10^{+182} \lor \neg \left(F \leq 1.02 \cdot 10^{+293}\right):\\
\;\;\;\;\frac{1}{B} - t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.80000000000000003e-25Initial program 55.2%
Simplified68.8%
Taylor expanded in x around 0 74.7%
associate-*l/74.6%
*-lft-identity74.6%
+-commutative74.6%
unpow274.6%
fma-undefine74.6%
Simplified74.6%
Taylor expanded in F around -inf 98.5%
if -6.80000000000000003e-25 < F < -6.0000000000000003e-71 or 1.34999999999999994e-89 < F < 6.9999999999999995e-44Initial program 89.6%
Taylor expanded in F around 0 89.6%
Taylor expanded in F around inf 84.7%
Taylor expanded in x around 0 84.9%
if -6.0000000000000003e-71 < F < 1.34999999999999994e-89Initial program 75.7%
associate-*l/75.7%
+-commutative75.7%
*-commutative75.7%
fma-undefine75.7%
fma-define75.7%
metadata-eval75.7%
metadata-eval75.7%
associate-*r/75.6%
clear-num75.6%
un-div-inv75.6%
fma-define75.6%
fma-undefine75.6%
*-commutative75.6%
fma-define75.6%
fma-define75.6%
Applied egg-rr75.6%
Taylor expanded in F around 0 75.6%
Taylor expanded in x around inf 84.3%
mul-1-neg84.3%
Simplified84.3%
if 6.9999999999999995e-44 < F < 8.0000000000000005e182 or 1.02e293 < F Initial program 68.2%
Simplified77.3%
Taylor expanded in x around 0 95.2%
associate-*l/95.2%
*-lft-identity95.2%
+-commutative95.2%
unpow295.2%
fma-undefine95.2%
Simplified95.2%
Taylor expanded in B around 0 85.7%
+-commutative85.7%
unpow285.7%
fma-undefine85.7%
Simplified85.7%
Taylor expanded in F around inf 83.0%
if 8.0000000000000005e182 < F < 1.02e293Initial program 20.7%
associate-*l/35.3%
+-commutative35.3%
*-commutative35.3%
fma-undefine35.3%
fma-define35.3%
metadata-eval35.3%
metadata-eval35.3%
associate-*r/35.3%
clear-num35.3%
un-div-inv35.3%
fma-define35.3%
fma-undefine35.3%
*-commutative35.3%
fma-define35.3%
fma-define35.3%
Applied egg-rr35.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 84.5%
Final simplification87.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= x -1.5e-113)
(- (/ -1.0 B) t_0)
(if (<= x 1.2e-276)
(* (sqrt 0.5) (/ F (sin B)))
(if (<= x 2.9e-104)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= x 2.3e-58)
(- (/ -1.0 (sin B)) (/ x B))
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (x <= -1.5e-113) {
tmp = (-1.0 / B) - t_0;
} else if (x <= 1.2e-276) {
tmp = sqrt(0.5) * (F / sin(B));
} else if (x <= 2.9e-104) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (x <= 2.3e-58) {
tmp = (-1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (x <= (-1.5d-113)) then
tmp = ((-1.0d0) / b) - t_0
else if (x <= 1.2d-276) then
tmp = sqrt(0.5d0) * (f / sin(b))
else if (x <= 2.9d-104) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (x <= 2.3d-58) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (x <= -1.5e-113) {
tmp = (-1.0 / B) - t_0;
} else if (x <= 1.2e-276) {
tmp = Math.sqrt(0.5) * (F / Math.sin(B));
} else if (x <= 2.9e-104) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (x <= 2.3e-58) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if x <= -1.5e-113: tmp = (-1.0 / B) - t_0 elif x <= 1.2e-276: tmp = math.sqrt(0.5) * (F / math.sin(B)) elif x <= 2.9e-104: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif x <= 2.3e-58: tmp = (-1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (x <= -1.5e-113) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (x <= 1.2e-276) tmp = Float64(sqrt(0.5) * Float64(F / sin(B))); elseif (x <= 2.9e-104) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (x <= 2.3e-58) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (x <= -1.5e-113) tmp = (-1.0 / B) - t_0; elseif (x <= 1.2e-276) tmp = sqrt(0.5) * (F / sin(B)); elseif (x <= 2.9e-104) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (x <= 2.3e-58) tmp = (-1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e-113], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x, 1.2e-276], N[(N[Sqrt[0.5], $MachinePrecision] * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e-104], 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[x, 2.3e-58], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{-113}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-276}:\\
\;\;\;\;\sqrt{0.5} \cdot \frac{F}{\sin B}\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-104}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-58}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if x < -1.5e-113Initial program 40.0%
Simplified47.6%
Taylor expanded in x around 0 94.9%
associate-*l/94.9%
*-lft-identity94.9%
+-commutative94.9%
unpow294.9%
fma-undefine94.9%
Simplified94.9%
Taylor expanded in B around 0 91.5%
+-commutative91.5%
unpow291.5%
fma-undefine91.5%
Simplified91.5%
Taylor expanded in F around -inf 83.7%
if -1.5e-113 < x < 1.19999999999999991e-276Initial program 74.3%
Taylor expanded in F around 0 52.4%
Taylor expanded in F around inf 42.3%
Taylor expanded in x around 0 42.3%
if 1.19999999999999991e-276 < x < 2.9000000000000001e-104Initial program 77.0%
Taylor expanded in F around 0 63.7%
Taylor expanded in B around 0 44.3%
if 2.9000000000000001e-104 < x < 2.2999999999999999e-58Initial program 66.7%
Taylor expanded in F around -inf 47.7%
Taylor expanded in B around 0 47.7%
if 2.2999999999999999e-58 < x Initial program 79.7%
Simplified91.6%
Taylor expanded in x around 0 91.6%
associate-*l/91.6%
*-lft-identity91.6%
+-commutative91.6%
unpow291.6%
fma-undefine91.6%
Simplified91.6%
Taylor expanded in B around 0 91.6%
+-commutative91.6%
unpow291.6%
fma-undefine91.6%
Simplified91.6%
Taylor expanded in F around inf 91.8%
Final simplification70.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.05e+245)
(- (/ -1.0 B) t_0)
(if (<= F -6.4e-23)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.7e-158)
(/ (- (* F (sqrt 0.5)) x) B)
(if (or (<= F 5.8e+182) (not (<= F 1.25e+294)))
(- (/ 1.0 B) t_0)
(- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.05e+245) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -6.4e-23) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.7e-158) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if ((F <= 5.8e+182) || !(F <= 1.25e+294)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.05d+245)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-6.4d-23)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.7d-158)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if ((f <= 5.8d+182) .or. (.not. (f <= 1.25d+294))) then
tmp = (1.0d0 / b) - t_0
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.05e+245) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -6.4e-23) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.7e-158) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if ((F <= 5.8e+182) || !(F <= 1.25e+294)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.05e+245: tmp = (-1.0 / B) - t_0 elif F <= -6.4e-23: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.7e-158: tmp = ((F * math.sqrt(0.5)) - x) / B elif (F <= 5.8e+182) or not (F <= 1.25e+294): tmp = (1.0 / B) - t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.05e+245) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -6.4e-23) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.7e-158) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif ((F <= 5.8e+182) || !(F <= 1.25e+294)) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.05e+245) tmp = (-1.0 / B) - t_0; elseif (F <= -6.4e-23) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.7e-158) tmp = ((F * sqrt(0.5)) - x) / B; elseif ((F <= 5.8e+182) || ~((F <= 1.25e+294))) tmp = (1.0 / B) - t_0; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.05e+245], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -6.4e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.7e-158], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 5.8e+182], N[Not[LessEqual[F, 1.25e+294]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.05 \cdot 10^{+245}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.7 \cdot 10^{-158}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{+182} \lor \neg \left(F \leq 1.25 \cdot 10^{+294}\right):\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -2.05000000000000002e245Initial program 33.5%
Simplified62.6%
Taylor expanded in x around 0 62.6%
associate-*l/62.6%
*-lft-identity62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in B around 0 62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in F around -inf 94.6%
if -2.05000000000000002e245 < F < -6.39999999999999951e-23Initial program 62.8%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 79.1%
if -6.39999999999999951e-23 < F < -2.6999999999999998e-158Initial program 83.0%
Simplified82.7%
Taylor expanded in x around 0 99.5%
associate-*l/99.3%
*-lft-identity99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 55.2%
if -2.6999999999999998e-158 < F < 5.7999999999999997e182 or 1.25e294 < F Initial program 73.3%
Simplified76.8%
Taylor expanded in x around 0 98.0%
associate-*l/98.0%
*-lft-identity98.0%
+-commutative98.0%
unpow298.0%
fma-undefine98.0%
Simplified98.0%
Taylor expanded in B around 0 87.6%
+-commutative87.6%
unpow287.6%
fma-undefine87.6%
Simplified87.6%
Taylor expanded in F around inf 68.2%
if 5.7999999999999997e182 < F < 1.25e294Initial program 20.7%
associate-*l/35.3%
+-commutative35.3%
*-commutative35.3%
fma-undefine35.3%
fma-define35.3%
metadata-eval35.3%
metadata-eval35.3%
associate-*r/35.3%
clear-num35.3%
un-div-inv35.3%
fma-define35.3%
fma-undefine35.3%
*-commutative35.3%
fma-define35.3%
fma-define35.3%
Applied egg-rr35.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 84.5%
Final simplification72.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.8e+245)
(- (/ -1.0 B) t_0)
(if (<= F -3.8e+72)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.25e-157)
(- (* (/ F B) (/ -1.0 F)) t_0)
(if (or (<= F 2.3e+183) (not (<= F 1.9e+292)))
(- (/ 1.0 B) t_0)
(- (/ F (* F (sin B))) (/ x B))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.8e+245) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.8e+72) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.25e-157) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if ((F <= 2.3e+183) || !(F <= 1.9e+292)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (F / (F * sin(B))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.8d+245)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-3.8d+72)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.25d-157) then
tmp = ((f / b) * ((-1.0d0) / f)) - t_0
else if ((f <= 2.3d+183) .or. (.not. (f <= 1.9d+292))) then
tmp = (1.0d0 / b) - t_0
else
tmp = (f / (f * sin(b))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.8e+245) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -3.8e+72) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.25e-157) {
tmp = ((F / B) * (-1.0 / F)) - t_0;
} else if ((F <= 2.3e+183) || !(F <= 1.9e+292)) {
tmp = (1.0 / B) - t_0;
} else {
tmp = (F / (F * Math.sin(B))) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.8e+245: tmp = (-1.0 / B) - t_0 elif F <= -3.8e+72: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.25e-157: tmp = ((F / B) * (-1.0 / F)) - t_0 elif (F <= 2.3e+183) or not (F <= 1.9e+292): tmp = (1.0 / B) - t_0 else: tmp = (F / (F * math.sin(B))) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.8e+245) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -3.8e+72) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.25e-157) tmp = Float64(Float64(Float64(F / B) * Float64(-1.0 / F)) - t_0); elseif ((F <= 2.3e+183) || !(F <= 1.9e+292)) tmp = Float64(Float64(1.0 / B) - t_0); else tmp = Float64(Float64(F / Float64(F * sin(B))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.8e+245) tmp = (-1.0 / B) - t_0; elseif (F <= -3.8e+72) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.25e-157) tmp = ((F / B) * (-1.0 / F)) - t_0; elseif ((F <= 2.3e+183) || ~((F <= 1.9e+292))) tmp = (1.0 / B) - t_0; else tmp = (F / (F * sin(B))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.8e+245], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.8e+72], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.25e-157], N[(N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[Or[LessEqual[F, 2.3e+183], N[Not[LessEqual[F, 1.9e+292]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(F / N[(F * N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.8 \cdot 10^{+245}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -3.8 \cdot 10^{+72}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.25 \cdot 10^{-157}:\\
\;\;\;\;\frac{F}{B} \cdot \frac{-1}{F} - t\_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{+183} \lor \neg \left(F \leq 1.9 \cdot 10^{+292}\right):\\
\;\;\;\;\frac{1}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot \sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.8e245Initial program 33.5%
Simplified62.6%
Taylor expanded in x around 0 62.6%
associate-*l/62.6%
*-lft-identity62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in B around 0 62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in F around -inf 94.6%
if -3.8e245 < F < -3.80000000000000006e72Initial program 56.2%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 88.2%
if -3.80000000000000006e72 < F < 2.24999999999999999e-157Initial program 77.5%
Taylor expanded in F around -inf 53.1%
Taylor expanded in B around 0 59.2%
div-inv59.2%
Applied egg-rr59.2%
if 2.24999999999999999e-157 < F < 2.2999999999999998e183 or 1.8999999999999999e292 < F Initial program 71.4%
Simplified77.9%
Taylor expanded in x around 0 96.4%
associate-*l/96.4%
*-lft-identity96.4%
+-commutative96.4%
unpow296.4%
fma-undefine96.4%
Simplified96.4%
Taylor expanded in B around 0 84.3%
+-commutative84.3%
unpow284.3%
fma-undefine84.3%
Simplified84.3%
Taylor expanded in F around inf 77.0%
if 2.2999999999999998e183 < F < 1.8999999999999999e292Initial program 20.7%
associate-*l/35.3%
+-commutative35.3%
*-commutative35.3%
fma-undefine35.3%
fma-define35.3%
metadata-eval35.3%
metadata-eval35.3%
associate-*r/35.3%
clear-num35.3%
un-div-inv35.3%
fma-define35.3%
fma-undefine35.3%
*-commutative35.3%
fma-define35.3%
fma-define35.3%
Applied egg-rr35.3%
Taylor expanded in F around inf 99.7%
Taylor expanded in B around 0 84.5%
Final simplification72.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -2.6e-24)
t_1
(if (<= F -1.35e-157)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F -4.5e-283)
t_1
(if (<= F 6e-292) (/ x (- B)) (- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -2.6e-24) {
tmp = t_1;
} else if (F <= -1.35e-157) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= -4.5e-283) {
tmp = t_1;
} else if (F <= 6e-292) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-2.6d-24)) then
tmp = t_1
else if (f <= (-1.35d-157)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= (-4.5d-283)) then
tmp = t_1
else if (f <= 6d-292) then
tmp = x / -b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = (-1.0 / B) - t_0;
double tmp;
if (F <= -2.6e-24) {
tmp = t_1;
} else if (F <= -1.35e-157) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= -4.5e-283) {
tmp = t_1;
} else if (F <= 6e-292) {
tmp = x / -B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -2.6e-24: tmp = t_1 elif F <= -1.35e-157: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= -4.5e-283: tmp = t_1 elif F <= 6e-292: tmp = x / -B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -2.6e-24) tmp = t_1; elseif (F <= -1.35e-157) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= -4.5e-283) tmp = t_1; elseif (F <= 6e-292) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -2.6e-24) tmp = t_1; elseif (F <= -1.35e-157) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= -4.5e-283) tmp = t_1; elseif (F <= 6e-292) tmp = x / -B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -2.6e-24], t$95$1, If[LessEqual[F, -1.35e-157], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -4.5e-283], t$95$1, If[LessEqual[F, 6e-292], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t\_0\\
\mathbf{if}\;F \leq -2.6 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{-157}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-292}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -2.6e-24 or -1.35e-157 < F < -4.4999999999999997e-283Initial program 61.9%
Simplified71.6%
Taylor expanded in x around 0 81.9%
associate-*l/81.9%
*-lft-identity81.9%
+-commutative81.9%
unpow281.9%
fma-undefine81.9%
Simplified81.9%
Taylor expanded in B around 0 68.6%
+-commutative68.6%
unpow268.6%
fma-undefine68.6%
Simplified68.6%
Taylor expanded in F around -inf 72.7%
if -2.6e-24 < F < -1.35e-157Initial program 83.0%
Simplified82.7%
Taylor expanded in x around 0 99.5%
associate-*l/99.3%
*-lft-identity99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 55.2%
if -4.4999999999999997e-283 < F < 6.00000000000000031e-292Initial program 63.4%
Taylor expanded in F around -inf 47.2%
Taylor expanded in B around 0 38.3%
associate-*r/38.3%
neg-mul-138.3%
distribute-neg-in38.3%
metadata-eval38.3%
Simplified38.3%
Taylor expanded in x around inf 82.4%
mul-1-neg82.4%
distribute-neg-frac282.4%
Simplified82.4%
if 6.00000000000000031e-292 < F Initial program 63.7%
Simplified70.2%
Taylor expanded in x around 0 86.3%
associate-*l/86.3%
*-lft-identity86.3%
+-commutative86.3%
unpow286.3%
fma-undefine86.3%
Simplified86.3%
Taylor expanded in B around 0 77.1%
+-commutative77.1%
unpow277.1%
fma-undefine77.1%
Simplified77.1%
Taylor expanded in F around inf 70.5%
Final simplification70.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.8e+245)
(- (/ -1.0 B) t_0)
(if (<= F -6.4e-23)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.6e-160) (/ (- (* F (sqrt 0.5)) x) B) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.8e+245) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -6.4e-23) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.6e-160) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.8d+245)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-6.4d-23)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.6d-160)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.8e+245) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -6.4e-23) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.6e-160) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.8e+245: tmp = (-1.0 / B) - t_0 elif F <= -6.4e-23: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.6e-160: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.8e+245) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -6.4e-23) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.6e-160) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.8e+245) tmp = (-1.0 / B) - t_0; elseif (F <= -6.4e-23) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.6e-160) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.8e+245], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -6.4e-23], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e-160], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{+245}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -6.4 \cdot 10^{-23}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-160}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -5.8000000000000003e245Initial program 33.5%
Simplified62.6%
Taylor expanded in x around 0 62.6%
associate-*l/62.6%
*-lft-identity62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in B around 0 62.6%
+-commutative62.6%
unpow262.6%
fma-undefine62.6%
Simplified62.6%
Taylor expanded in F around -inf 94.6%
if -5.8000000000000003e245 < F < -6.39999999999999951e-23Initial program 62.8%
Taylor expanded in F around -inf 97.9%
Taylor expanded in B around 0 79.1%
if -6.39999999999999951e-23 < F < -3.5999999999999997e-160Initial program 83.0%
Simplified82.7%
Taylor expanded in x around 0 99.5%
associate-*l/99.3%
*-lft-identity99.3%
+-commutative99.3%
unpow299.3%
fma-undefine99.3%
Simplified99.3%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in B around 0 55.2%
if -3.5999999999999997e-160 < F Initial program 66.3%
Simplified71.2%
Taylor expanded in x around 0 89.6%
associate-*l/89.6%
*-lft-identity89.6%
+-commutative89.6%
unpow289.6%
fma-undefine89.6%
Simplified89.6%
Taylor expanded in B around 0 80.6%
+-commutative80.6%
unpow280.6%
fma-undefine80.6%
Simplified80.6%
Taylor expanded in F around inf 67.6%
Final simplification70.3%
(FPCore (F B x) :precision binary64 (let* ((t_0 (/ x (tan B)))) (if (<= F 1.4e-150) (- (/ -1.0 B) t_0) (- (/ 1.0 B) t_0))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= 1.4e-150) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= 1.4d-150) then
tmp = ((-1.0d0) / b) - t_0
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= 1.4e-150) {
tmp = (-1.0 / B) - t_0;
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= 1.4e-150: tmp = (-1.0 / B) - t_0 else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= 1.4e-150) tmp = Float64(Float64(-1.0 / B) - t_0); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= 1.4e-150) tmp = (-1.0 / B) - t_0; else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, 1.4e-150], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq 1.4 \cdot 10^{-150}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < 1.39999999999999998e-150Initial program 68.3%
Simplified74.0%
Taylor expanded in x around 0 89.2%
associate-*l/89.2%
*-lft-identity89.2%
+-commutative89.2%
unpow289.2%
fma-undefine89.2%
Simplified89.2%
Taylor expanded in B around 0 73.7%
+-commutative73.7%
unpow273.7%
fma-undefine73.7%
Simplified73.7%
Taylor expanded in F around -inf 61.5%
if 1.39999999999999998e-150 < F Initial program 59.7%
Simplified68.1%
Taylor expanded in x around 0 82.3%
associate-*l/82.3%
*-lft-identity82.3%
+-commutative82.3%
unpow282.3%
fma-undefine82.3%
Simplified82.3%
Taylor expanded in B around 0 73.0%
+-commutative73.0%
unpow273.0%
fma-undefine73.0%
Simplified73.0%
Taylor expanded in F around inf 73.9%
Final simplification65.9%
(FPCore (F B x) :precision binary64 (- (/ -1.0 B) (/ x (tan B))))
double code(double F, double B, double x) {
return (-1.0 / B) - (x / tan(B));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = ((-1.0d0) / b) - (x / tan(b))
end function
public static double code(double F, double B, double x) {
return (-1.0 / B) - (x / Math.tan(B));
}
def code(F, B, x): return (-1.0 / B) - (x / math.tan(B))
function code(F, B, x) return Float64(Float64(-1.0 / B) - Float64(x / tan(B))) end
function tmp = code(F, B, x) tmp = (-1.0 / B) - (x / tan(B)); end
code[F_, B_, x_] := N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B} - \frac{x}{\tan B}
\end{array}
Initial program 65.3%
Simplified71.9%
Taylor expanded in x around 0 86.7%
associate-*l/86.7%
*-lft-identity86.7%
+-commutative86.7%
unpow286.7%
fma-undefine86.7%
Simplified86.7%
Taylor expanded in B around 0 73.4%
+-commutative73.4%
unpow273.4%
fma-undefine73.4%
Simplified73.4%
Taylor expanded in F around -inf 59.7%
Final simplification59.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (+ -1.0 x) B)) (t_1 (/ (- 1.0 x) B)))
(if (<= F -1.45e+205)
t_0
(if (<= F -2e+65)
t_1
(if (<= F -12600000000.0)
t_0
(if (or (<= F -6.2e-66) (not (<= F 9.6e-117))) t_1 (/ x (- B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 + x) / B;
double t_1 = (1.0 - x) / B;
double tmp;
if (F <= -1.45e+205) {
tmp = t_0;
} else if (F <= -2e+65) {
tmp = t_1;
} else if (F <= -12600000000.0) {
tmp = t_0;
} else if ((F <= -6.2e-66) || !(F <= 9.6e-117)) {
tmp = t_1;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) + x) / b
t_1 = (1.0d0 - x) / b
if (f <= (-1.45d+205)) then
tmp = t_0
else if (f <= (-2d+65)) then
tmp = t_1
else if (f <= (-12600000000.0d0)) then
tmp = t_0
else if ((f <= (-6.2d-66)) .or. (.not. (f <= 9.6d-117))) then
tmp = t_1
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 + x) / B;
double t_1 = (1.0 - x) / B;
double tmp;
if (F <= -1.45e+205) {
tmp = t_0;
} else if (F <= -2e+65) {
tmp = t_1;
} else if (F <= -12600000000.0) {
tmp = t_0;
} else if ((F <= -6.2e-66) || !(F <= 9.6e-117)) {
tmp = t_1;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 + x) / B t_1 = (1.0 - x) / B tmp = 0 if F <= -1.45e+205: tmp = t_0 elif F <= -2e+65: tmp = t_1 elif F <= -12600000000.0: tmp = t_0 elif (F <= -6.2e-66) or not (F <= 9.6e-117): tmp = t_1 else: tmp = x / -B return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 + x) / B) t_1 = Float64(Float64(1.0 - x) / B) tmp = 0.0 if (F <= -1.45e+205) tmp = t_0; elseif (F <= -2e+65) tmp = t_1; elseif (F <= -12600000000.0) tmp = t_0; elseif ((F <= -6.2e-66) || !(F <= 9.6e-117)) tmp = t_1; else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 + x) / B; t_1 = (1.0 - x) / B; tmp = 0.0; if (F <= -1.45e+205) tmp = t_0; elseif (F <= -2e+65) tmp = t_1; elseif (F <= -12600000000.0) tmp = t_0; elseif ((F <= -6.2e-66) || ~((F <= 9.6e-117))) tmp = t_1; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -1.45e+205], t$95$0, If[LessEqual[F, -2e+65], t$95$1, If[LessEqual[F, -12600000000.0], t$95$0, If[Or[LessEqual[F, -6.2e-66], N[Not[LessEqual[F, 9.6e-117]], $MachinePrecision]], t$95$1, N[(x / (-B)), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 + x}{B}\\
t_1 := \frac{1 - x}{B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{+205}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -2 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq -12600000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6.2 \cdot 10^{-66} \lor \neg \left(F \leq 9.6 \cdot 10^{-117}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.4500000000000001e205 or -2e65 < F < -1.26e10Initial program 40.2%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 55.5%
associate-*r/55.5%
neg-mul-155.5%
distribute-neg-in55.5%
metadata-eval55.5%
Simplified55.5%
*-un-lft-identity55.5%
add-sqr-sqrt23.7%
sqrt-unprod47.1%
sqr-neg47.1%
sqrt-unprod23.3%
add-sqr-sqrt40.6%
Applied egg-rr40.6%
*-lft-identity40.6%
Simplified40.6%
if -1.4500000000000001e205 < F < -2e65 or -1.26e10 < F < -6.1999999999999995e-66 or 9.60000000000000057e-117 < F Initial program 63.6%
Simplified72.6%
Taylor expanded in x around 0 84.3%
associate-*l/84.2%
*-lft-identity84.2%
+-commutative84.2%
unpow284.2%
fma-undefine84.2%
Simplified84.2%
Taylor expanded in B around 0 68.0%
+-commutative68.0%
unpow268.0%
fma-undefine68.0%
Simplified68.0%
Taylor expanded in F around inf 64.9%
Taylor expanded in B around 0 40.6%
if -6.1999999999999995e-66 < F < 9.60000000000000057e-117Initial program 77.0%
Taylor expanded in F around -inf 48.9%
Taylor expanded in B around 0 26.6%
associate-*r/26.6%
neg-mul-126.6%
distribute-neg-in26.6%
metadata-eval26.6%
Simplified26.6%
Taylor expanded in x around inf 43.7%
mul-1-neg43.7%
distribute-neg-frac243.7%
Simplified43.7%
Final simplification41.7%
(FPCore (F B x) :precision binary64 (if (<= F -3.6e-71) (/ (- -1.0 x) B) (if (<= F 9.6e-117) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-71) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.6e-117) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.6d-71)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 9.6d-117) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.6e-71) {
tmp = (-1.0 - x) / B;
} else if (F <= 9.6e-117) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.6e-71: tmp = (-1.0 - x) / B elif F <= 9.6e-117: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.6e-71) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 9.6e-117) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.6e-71) tmp = (-1.0 - x) / B; elseif (F <= 9.6e-117) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.6e-71], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 9.6e-117], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.6 \cdot 10^{-71}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 9.6 \cdot 10^{-117}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.6e-71Initial program 60.0%
Taylor expanded in F around -inf 87.0%
Taylor expanded in B around 0 48.2%
associate-*r/48.2%
neg-mul-148.2%
distribute-neg-in48.2%
metadata-eval48.2%
Simplified48.2%
if -3.6e-71 < F < 9.60000000000000057e-117Initial program 76.3%
Taylor expanded in F around -inf 50.3%
Taylor expanded in B around 0 27.3%
associate-*r/27.3%
neg-mul-127.3%
distribute-neg-in27.3%
metadata-eval27.3%
Simplified27.3%
Taylor expanded in x around inf 45.1%
mul-1-neg45.1%
distribute-neg-frac245.1%
Simplified45.1%
if 9.60000000000000057e-117 < F Initial program 58.6%
Simplified67.4%
Taylor expanded in x around 0 81.3%
associate-*l/81.3%
*-lft-identity81.3%
+-commutative81.3%
unpow281.3%
fma-undefine81.3%
Simplified81.3%
Taylor expanded in B around 0 71.5%
+-commutative71.5%
unpow271.5%
fma-undefine71.5%
Simplified71.5%
Taylor expanded in F around inf 72.5%
Taylor expanded in B around 0 43.1%
Final simplification45.4%
(FPCore (F B x) :precision binary64 (if (<= F -2.65e+213) (/ (+ -1.0 x) B) (if (<= F 2.5e+136) (/ x (- B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.65e+213) {
tmp = (-1.0 + x) / B;
} else if (F <= 2.5e+136) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.65d+213)) then
tmp = ((-1.0d0) + x) / b
else if (f <= 2.5d+136) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.65e+213) {
tmp = (-1.0 + x) / B;
} else if (F <= 2.5e+136) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.65e+213: tmp = (-1.0 + x) / B elif F <= 2.5e+136: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.65e+213) tmp = Float64(Float64(-1.0 + x) / B); elseif (F <= 2.5e+136) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.65e+213) tmp = (-1.0 + x) / B; elseif (F <= 2.5e+136) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.65e+213], N[(N[(-1.0 + x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.5e+136], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.65 \cdot 10^{+213}:\\
\;\;\;\;\frac{-1 + x}{B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+136}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -2.6499999999999999e213Initial program 24.4%
Taylor expanded in F around -inf 99.9%
Taylor expanded in B around 0 60.9%
associate-*r/60.9%
neg-mul-160.9%
distribute-neg-in60.9%
metadata-eval60.9%
Simplified60.9%
*-un-lft-identity60.9%
add-sqr-sqrt24.4%
sqrt-unprod48.9%
sqr-neg48.9%
sqrt-unprod24.3%
add-sqr-sqrt40.0%
Applied egg-rr40.0%
*-lft-identity40.0%
Simplified40.0%
if -2.6499999999999999e213 < F < 2.5000000000000001e136Initial program 74.9%
Taylor expanded in F around -inf 61.4%
Taylor expanded in B around 0 32.4%
associate-*r/32.4%
neg-mul-132.4%
distribute-neg-in32.4%
metadata-eval32.4%
Simplified32.4%
Taylor expanded in x around inf 36.6%
mul-1-neg36.6%
distribute-neg-frac236.6%
Simplified36.6%
if 2.5000000000000001e136 < F Initial program 39.4%
Simplified53.3%
Taylor expanded in x around 0 53.4%
associate-*l/53.4%
*-lft-identity53.4%
+-commutative53.4%
unpow253.4%
fma-undefine53.4%
Simplified53.4%
Taylor expanded in B around 0 50.6%
+-commutative50.6%
unpow250.6%
fma-undefine50.6%
Simplified50.6%
Taylor expanded in F around inf 74.6%
Taylor expanded in x around 0 31.4%
Final simplification36.3%
(FPCore (F B x) :precision binary64 (if (<= F 3.3e+140) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 3.3e+140) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 3.3d+140) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 3.3e+140) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 3.3e+140: tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 3.3e+140) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 3.3e+140) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 3.3e+140], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.3 \cdot 10^{+140}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 3.3000000000000002e140Initial program 69.2%
Taylor expanded in F around -inf 65.8%
Taylor expanded in B around 0 35.6%
associate-*r/35.6%
neg-mul-135.6%
distribute-neg-in35.6%
metadata-eval35.6%
Simplified35.6%
Taylor expanded in x around inf 35.1%
mul-1-neg35.1%
distribute-neg-frac235.1%
Simplified35.1%
if 3.3000000000000002e140 < F Initial program 39.4%
Simplified53.3%
Taylor expanded in x around 0 53.4%
associate-*l/53.4%
*-lft-identity53.4%
+-commutative53.4%
unpow253.4%
fma-undefine53.4%
Simplified53.4%
Taylor expanded in B around 0 50.6%
+-commutative50.6%
unpow250.6%
fma-undefine50.6%
Simplified50.6%
Taylor expanded in F around inf 74.6%
Taylor expanded in x around 0 31.4%
Final simplification34.6%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 65.3%
Simplified71.9%
Taylor expanded in x around 0 86.7%
associate-*l/86.7%
*-lft-identity86.7%
+-commutative86.7%
unpow286.7%
fma-undefine86.7%
Simplified86.7%
Taylor expanded in B around 0 73.4%
+-commutative73.4%
unpow273.4%
fma-undefine73.4%
Simplified73.4%
Taylor expanded in F around inf 58.7%
Taylor expanded in x around 0 8.9%
Final simplification8.9%
herbie shell --seed 2024058
(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))))))