
(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 20 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 -52000000000000.0)
(- (/ F (* (sin B) (- F))) t_0)
(if (<= F 152000000.0)
(- (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5)) t_0)
(- (/ 1.0 (sin B)) (pow (/ (tan B) x) -1.0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -52000000000000.0) {
tmp = (F / (sin(B) * -F)) - t_0;
} else if (F <= 152000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - pow((tan(B) / x), -1.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 <= (-52000000000000.0d0)) then
tmp = (f / (sin(b) * -f)) - t_0
else if (f <= 152000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - ((tan(b) / x) ** (-1.0d0))
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 <= -52000000000000.0) {
tmp = (F / (Math.sin(B) * -F)) - t_0;
} else if (F <= 152000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - Math.pow((Math.tan(B) / x), -1.0);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -52000000000000.0: tmp = (F / (math.sin(B) * -F)) - t_0 elif F <= 152000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - math.pow((math.tan(B) / x), -1.0) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -52000000000000.0) tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_0); elseif (F <= 152000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - (Float64(tan(B) / x) ^ -1.0)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -52000000000000.0) tmp = (F / (sin(B) * -F)) - t_0; elseif (F <= 152000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - ((tan(B) / x) ^ -1.0); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -52000000000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 152000000.0], 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] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[Power[N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -52000000000000:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_0\\
\mathbf{elif}\;F \leq 152000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - {\left(\frac{\tan B}{x}\right)}^{-1}\\
\end{array}
\end{array}
if F < -5.2e13Initial program 77.1%
Simplified83.9%
clear-num83.9%
un-div-inv84.0%
fma-define84.0%
fma-undefine84.0%
*-commutative84.0%
fma-define84.0%
fma-define84.0%
Applied egg-rr84.0%
Taylor expanded in F around -inf 99.7%
mul-1-neg99.7%
*-commutative99.7%
distribute-lft-neg-in99.7%
Simplified99.7%
if -5.2e13 < F < 1.52e8Initial program 99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
distribute-lft-neg-in99.5%
un-div-inv99.6%
Applied egg-rr99.6%
if 1.52e8 < F Initial program 52.5%
Simplified68.1%
Taylor expanded in F around inf 99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.65)
(- (/ F (* (sin B) (- F))) t_0)
(if (<= F 1.6)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) (pow (/ (tan B) x) -1.0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.65) {
tmp = (F / (sin(B) * -F)) - t_0;
} else if (F <= 1.6) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - pow((tan(B) / x), -1.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.65d0)) then
tmp = (f / (sin(b) * -f)) - t_0
else if (f <= 1.6d0) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - ((tan(b) / x) ** (-1.0d0))
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.65) {
tmp = (F / (Math.sin(B) * -F)) - t_0;
} else if (F <= 1.6) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - Math.pow((Math.tan(B) / x), -1.0);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.65: tmp = (F / (math.sin(B) * -F)) - t_0 elif F <= 1.6: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - math.pow((math.tan(B) / x), -1.0) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.65) tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_0); elseif (F <= 1.6) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - (Float64(tan(B) / x) ^ -1.0)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.65) tmp = (F / (sin(B) * -F)) - t_0; elseif (F <= 1.6) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - ((tan(B) / x) ^ -1.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.65], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.6], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[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] - N[Power[N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.65:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_0\\
\mathbf{elif}\;F \leq 1.6:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - {\left(\frac{\tan B}{x}\right)}^{-1}\\
\end{array}
\end{array}
if F < -1.6499999999999999Initial program 78.6%
Simplified84.9%
clear-num84.9%
un-div-inv85.0%
fma-define85.0%
fma-undefine85.0%
*-commutative85.0%
fma-define85.0%
fma-define85.0%
Applied egg-rr85.0%
Taylor expanded in F around -inf 98.3%
mul-1-neg98.3%
*-commutative98.3%
distribute-lft-neg-in98.3%
Simplified98.3%
if -1.6499999999999999 < F < 1.6000000000000001Initial program 99.4%
Simplified99.5%
clear-num99.5%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 98.6%
if 1.6000000000000001 < F Initial program 54.3%
Simplified69.3%
Taylor expanded in F around inf 98.6%
clear-num98.7%
inv-pow98.7%
Applied egg-rr98.7%
Final simplification98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ F (* (sin B) (- F))) t_0)
(if (<= F 1.4)
(- (* F (/ 1.0 (/ (sin B) (sqrt 0.5)))) t_0)
(- (/ 1.0 (sin B)) (pow (/ (tan B) x) -1.0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (F / (sin(B) * -F)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - t_0;
} else {
tmp = (1.0 / sin(B)) - pow((tan(B) / x), -1.0);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = (f / (sin(b) * -f)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (1.0d0 / (sin(b) / sqrt(0.5d0)))) - t_0
else
tmp = (1.0d0 / sin(b)) - ((tan(b) / x) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (F / (Math.sin(B) * -F)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (1.0 / (Math.sin(B) / Math.sqrt(0.5)))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - Math.pow((Math.tan(B) / x), -1.0);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (F / (math.sin(B) * -F)) - t_0 elif F <= 1.4: tmp = (F * (1.0 / (math.sin(B) / math.sqrt(0.5)))) - t_0 else: tmp = (1.0 / math.sin(B)) - math.pow((math.tan(B) / x), -1.0) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(1.0 / Float64(sin(B) / sqrt(0.5)))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - (Float64(tan(B) / x) ^ -1.0)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (F / (sin(B) * -F)) - t_0; elseif (F <= 1.4) tmp = (F * (1.0 / (sin(B) / sqrt(0.5)))) - t_0; else tmp = (1.0 / sin(B)) - ((tan(B) / x) ^ -1.0); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[Power[N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{1}{\frac{\sin B}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - {\left(\frac{\tan B}{x}\right)}^{-1}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 78.6%
Simplified84.9%
clear-num84.9%
un-div-inv85.0%
fma-define85.0%
fma-undefine85.0%
*-commutative85.0%
fma-define85.0%
fma-define85.0%
Applied egg-rr85.0%
Taylor expanded in F around -inf 98.3%
mul-1-neg98.3%
*-commutative98.3%
distribute-lft-neg-in98.3%
Simplified98.3%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 98.4%
clear-num98.4%
inv-pow98.4%
Applied egg-rr98.4%
unpow-198.4%
Simplified98.4%
if 1.3999999999999999 < F Initial program 54.3%
Simplified69.3%
Taylor expanded in F around inf 98.6%
clear-num98.7%
inv-pow98.7%
Applied egg-rr98.7%
Final simplification98.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ F (* (sin B) (- F))) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) (pow (/ (tan B) x) -1.0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (F / (sin(B) * -F)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - pow((tan(B) / x), -1.0);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = (f / (sin(b) * -f)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - ((tan(b) / x) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (F / (Math.sin(B) * -F)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - Math.pow((Math.tan(B) / x), -1.0);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (F / (math.sin(B) * -F)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - math.pow((math.tan(B) / x), -1.0) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - (Float64(tan(B) / x) ^ -1.0)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (F / (sin(B) * -F)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - ((tan(B) / x) ^ -1.0); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], 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] - N[Power[N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - {\left(\frac{\tan B}{x}\right)}^{-1}\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 78.6%
Simplified84.9%
clear-num84.9%
un-div-inv85.0%
fma-define85.0%
fma-undefine85.0%
*-commutative85.0%
fma-define85.0%
fma-define85.0%
Applied egg-rr85.0%
Taylor expanded in F around -inf 98.3%
mul-1-neg98.3%
*-commutative98.3%
distribute-lft-neg-in98.3%
Simplified98.3%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 98.4%
if 1.3999999999999999 < F Initial program 54.3%
Simplified69.3%
Taylor expanded in F around inf 98.6%
clear-num98.7%
inv-pow98.7%
Applied egg-rr98.7%
Final simplification98.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.068)
(- (/ F (* (sin B) (- F))) t_0)
(if (<= F 8.8e-10)
(- (/ (* F (sqrt 0.5)) B) t_0)
(- (/ 1.0 (sin B)) (pow (/ (tan B) x) -1.0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.068) {
tmp = (F / (sin(B) * -F)) - t_0;
} else if (F <= 8.8e-10) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - pow((tan(B) / x), -1.0);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.068d0)) then
tmp = (f / (sin(b) * -f)) - t_0
else if (f <= 8.8d-10) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else
tmp = (1.0d0 / sin(b)) - ((tan(b) / x) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.068) {
tmp = (F / (Math.sin(B) * -F)) - t_0;
} else if (F <= 8.8e-10) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - Math.pow((Math.tan(B) / x), -1.0);
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.068: tmp = (F / (math.sin(B) * -F)) - t_0 elif F <= 8.8e-10: tmp = ((F * math.sqrt(0.5)) / B) - t_0 else: tmp = (1.0 / math.sin(B)) - math.pow((math.tan(B) / x), -1.0) return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.068) tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_0); elseif (F <= 8.8e-10) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - (Float64(tan(B) / x) ^ -1.0)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.068) tmp = (F / (sin(B) * -F)) - t_0; elseif (F <= 8.8e-10) tmp = ((F * sqrt(0.5)) / B) - t_0; else tmp = (1.0 / sin(B)) - ((tan(B) / x) ^ -1.0); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.068], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.8e-10], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[Power[N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.068:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - {\left(\frac{\tan B}{x}\right)}^{-1}\\
\end{array}
\end{array}
if F < -0.068000000000000005Initial program 78.6%
Simplified84.9%
clear-num84.9%
un-div-inv85.0%
fma-define85.0%
fma-undefine85.0%
*-commutative85.0%
fma-define85.0%
fma-define85.0%
Applied egg-rr85.0%
Taylor expanded in F around -inf 98.3%
mul-1-neg98.3%
*-commutative98.3%
distribute-lft-neg-in98.3%
Simplified98.3%
if -0.068000000000000005 < F < 8.7999999999999996e-10Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 99.0%
Taylor expanded in B around 0 83.5%
if 8.7999999999999996e-10 < F Initial program 56.6%
Simplified70.8%
Taylor expanded in F around inf 94.3%
clear-num94.3%
inv-pow94.3%
Applied egg-rr94.3%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -9.8e-51)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.5e-168)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 2.5e-97)
(* (- x) (/ (cos B) (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 <= -9.8e-51) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.5e-168) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 2.5e-97) {
tmp = -x * (cos(B) / 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 <= (-9.8d-51)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.5d-168)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 2.5d-97) then
tmp = -x * (cos(b) / 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 <= -9.8e-51) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.5e-168) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 2.5e-97) {
tmp = -x * (Math.cos(B) / 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 <= -9.8e-51: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.5e-168: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 2.5e-97: tmp = -x * (math.cos(B) / 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 <= -9.8e-51) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.5e-168) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 2.5e-97) tmp = Float64(Float64(-x) * Float64(cos(B) / 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 <= -9.8e-51) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.5e-168) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 2.5e-97) tmp = -x * (cos(B) / 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, -9.8e-51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.5e-168], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.5e-97], N[((-x) * N[(N[Cos[B], $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 -9.8 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-168}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-97}:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -9.79999999999999948e-51Initial program 79.4%
Simplified85.5%
Taylor expanded in F around -inf 96.1%
if -9.79999999999999948e-51 < F < -1.49999999999999996e-168Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 60.5%
associate-/l*60.6%
Simplified60.6%
if -1.49999999999999996e-168 < F < 2.4999999999999998e-97Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
fma-define99.8%
fma-undefine99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 85.7%
mul-1-neg85.7%
associate-/l*85.8%
distribute-lft-neg-in85.8%
Simplified85.8%
if 2.4999999999999998e-97 < F Initial program 62.2%
Simplified74.5%
Taylor expanded in F around inf 89.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.22e-51)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.5e-168)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 6.5e-102) (* (- x) (/ (cos B) (sin B))) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.22e-51) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.5e-168) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 6.5e-102) {
tmp = -x * (cos(B) / sin(B));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.22d-51)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.5d-168)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 6.5d-102) then
tmp = -x * (cos(b) / sin(b))
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.22e-51) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.5e-168) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 6.5e-102) {
tmp = -x * (Math.cos(B) / Math.sin(B));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.22e-51: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.5e-168: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 6.5e-102: tmp = -x * (math.cos(B) / math.sin(B)) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.22e-51) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.5e-168) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 6.5e-102) tmp = Float64(Float64(-x) * Float64(cos(B) / sin(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.22e-51) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.5e-168) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 6.5e-102) tmp = -x * (cos(B) / sin(B)); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.22e-51], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.5e-168], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6.5e-102], N[((-x) * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.22 \cdot 10^{-51}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-168}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 6.5 \cdot 10^{-102}:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.21999999999999998e-51Initial program 79.4%
Simplified85.5%
Taylor expanded in F around -inf 96.1%
if -1.21999999999999998e-51 < F < -1.49999999999999996e-168Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 60.5%
associate-/l*60.6%
Simplified60.6%
if -1.49999999999999996e-168 < F < 6.5000000000000003e-102Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
fma-define99.8%
fma-undefine99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 87.1%
mul-1-neg87.1%
associate-/l*87.1%
distribute-lft-neg-in87.1%
Simplified87.1%
if 6.5000000000000003e-102 < F Initial program 62.6%
Simplified74.8%
Taylor expanded in F around inf 88.1%
Taylor expanded in B around 0 68.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.3e-56)
(- (/ -1.0 B) t_0)
(if (<= F -1.4e-168)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 8.6e-102) (* (- x) (/ (cos B) (sin B))) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.3e-56) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.4e-168) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 8.6e-102) {
tmp = -x * (cos(B) / sin(B));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.3d-56)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1.4d-168)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 8.6d-102) then
tmp = -x * (cos(b) / sin(b))
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.3e-56) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.4e-168) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 8.6e-102) {
tmp = -x * (Math.cos(B) / Math.sin(B));
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.3e-56: tmp = (-1.0 / B) - t_0 elif F <= -1.4e-168: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 8.6e-102: tmp = -x * (math.cos(B) / math.sin(B)) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.3e-56) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1.4e-168) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 8.6e-102) tmp = Float64(Float64(-x) * Float64(cos(B) / sin(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.3e-56) tmp = (-1.0 / B) - t_0; elseif (F <= -1.4e-168) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 8.6e-102) tmp = -x * (cos(B) / sin(B)); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.3e-56], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.4e-168], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.6e-102], N[((-x) * N[(N[Cos[B], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{-56}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-168}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{-102}:\\
\;\;\;\;\left(-x\right) \cdot \frac{\cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -3.29999999999999984e-56Initial program 79.6%
Simplified85.7%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 73.0%
if -3.29999999999999984e-56 < F < -1.4000000000000001e-168Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 62.9%
associate-/l*63.1%
Simplified63.1%
if -1.4000000000000001e-168 < F < 8.5999999999999995e-102Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
fma-define99.8%
fma-undefine99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 87.1%
mul-1-neg87.1%
associate-/l*87.1%
distribute-lft-neg-in87.1%
Simplified87.1%
if 8.5999999999999995e-102 < F Initial program 62.6%
Simplified74.8%
Taylor expanded in F around inf 88.1%
Taylor expanded in B around 0 68.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.36)
(- (/ F (* (sin B) (- F))) t_0)
(if (<= F 8.8e-10)
(- (/ (* F (sqrt 0.5)) B) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.36) {
tmp = (F / (sin(B) * -F)) - t_0;
} else if (F <= 8.8e-10) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.36d0)) then
tmp = (f / (sin(b) * -f)) - t_0
else if (f <= 8.8d-10) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.36) {
tmp = (F / (Math.sin(B) * -F)) - t_0;
} else if (F <= 8.8e-10) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.36: tmp = (F / (math.sin(B) * -F)) - t_0 elif F <= 8.8e-10: tmp = ((F * math.sqrt(0.5)) / B) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.36) tmp = Float64(Float64(F / Float64(sin(B) * Float64(-F))) - t_0); elseif (F <= 8.8e-10) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.36) tmp = (F / (sin(B) * -F)) - t_0; elseif (F <= 8.8e-10) tmp = ((F * sqrt(0.5)) / B) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.36], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * (-F)), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.8e-10], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $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 -0.36:\\
\;\;\;\;\frac{F}{\sin B \cdot \left(-F\right)} - t\_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.35999999999999999Initial program 78.6%
Simplified84.9%
clear-num84.9%
un-div-inv85.0%
fma-define85.0%
fma-undefine85.0%
*-commutative85.0%
fma-define85.0%
fma-define85.0%
Applied egg-rr85.0%
Taylor expanded in F around -inf 98.3%
mul-1-neg98.3%
*-commutative98.3%
distribute-lft-neg-in98.3%
Simplified98.3%
if -0.35999999999999999 < F < 8.7999999999999996e-10Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 99.0%
Taylor expanded in B around 0 83.5%
if 8.7999999999999996e-10 < F Initial program 56.6%
Simplified70.8%
Taylor expanded in F around inf 94.3%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.37)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 8.8e-10)
(- (/ (* F (sqrt 0.5)) B) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.37) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 8.8e-10) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.37d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 8.8d-10) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.37) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 8.8e-10) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.37: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 8.8e-10: tmp = ((F * math.sqrt(0.5)) / B) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.37) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 8.8e-10) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.37) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 8.8e-10) tmp = ((F * sqrt(0.5)) / B) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.37], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.8e-10], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $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 -0.37:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.37Initial program 78.6%
Simplified84.9%
Taylor expanded in F around -inf 98.3%
if -0.37 < F < 8.7999999999999996e-10Initial program 99.4%
Simplified99.5%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 99.0%
Taylor expanded in B around 0 83.5%
if 8.7999999999999996e-10 < F Initial program 56.6%
Simplified70.8%
Taylor expanded in F around inf 94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.3e-55)
(- (/ -1.0 B) t_0)
(if (<= F -1.5e-168)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F 8.6e-102) (/ -1.0 (/ (tan B) x)) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.3e-55) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.5e-168) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= 8.6e-102) {
tmp = -1.0 / (tan(B) / x);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.3d-55)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-1.5d-168)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= 8.6d-102) then
tmp = (-1.0d0) / (tan(b) / x)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.3e-55) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -1.5e-168) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= 8.6e-102) {
tmp = -1.0 / (Math.tan(B) / x);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.3e-55: tmp = (-1.0 / B) - t_0 elif F <= -1.5e-168: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= 8.6e-102: tmp = -1.0 / (math.tan(B) / x) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.3e-55) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -1.5e-168) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= 8.6e-102) tmp = Float64(-1.0 / Float64(tan(B) / x)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.3e-55) tmp = (-1.0 / B) - t_0; elseif (F <= -1.5e-168) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= 8.6e-102) tmp = -1.0 / (tan(B) / x); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.3e-55], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.5e-168], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.6e-102], N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.3 \cdot 10^{-55}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -1.5 \cdot 10^{-168}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{-102}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -3.2999999999999999e-55Initial program 79.6%
Simplified85.7%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 73.0%
if -3.2999999999999999e-55 < F < -1.49999999999999996e-168Initial program 99.1%
Simplified99.3%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 62.9%
associate-/l*63.1%
Simplified63.1%
if -1.49999999999999996e-168 < F < 8.5999999999999995e-102Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
fma-define99.8%
fma-undefine99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 87.1%
clear-num87.0%
un-div-inv87.0%
associate-/l/87.0%
tan-quot87.1%
Applied egg-rr87.1%
if 8.5999999999999995e-102 < F Initial program 62.6%
Simplified74.8%
Taylor expanded in F around inf 88.1%
Taylor expanded in B around 0 68.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-13)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 2.6e+172)
(/ -1.0 (/ (tan B) x))
(if (<= F 7.9e+245) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-13) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.6e+172) {
tmp = -1.0 / (tan(B) / x);
} else if (F <= 7.9e+245) {
tmp = 1.0 / 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 <= (-1.35d-13)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.6d+172) then
tmp = (-1.0d0) / (tan(b) / x)
else if (f <= 7.9d+245) then
tmp = 1.0d0 / 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 <= -1.35e-13) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.6e+172) {
tmp = -1.0 / (Math.tan(B) / x);
} else if (F <= 7.9e+245) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-13: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.6e+172: tmp = -1.0 / (math.tan(B) / x) elif F <= 7.9e+245: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-13) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.6e+172) tmp = Float64(-1.0 / Float64(tan(B) / x)); elseif (F <= 7.9e+245) tmp = Float64(1.0 / 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 <= -1.35e-13) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.6e+172) tmp = -1.0 / (tan(B) / x); elseif (F <= 7.9e+245) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-13], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e+172], N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.9e+245], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{+172}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 7.9 \cdot 10^{+245}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.35000000000000005e-13Initial program 78.9%
Simplified85.1%
Taylor expanded in F around -inf 97.2%
Taylor expanded in B around 0 73.1%
if -1.35000000000000005e-13 < F < 2.6e172Initial program 95.4%
Simplified98.9%
clear-num99.0%
un-div-inv99.0%
fma-define99.0%
fma-undefine99.0%
*-commutative99.0%
fma-define99.0%
fma-define99.0%
Applied egg-rr99.0%
Taylor expanded in F around 0 63.1%
clear-num63.1%
un-div-inv63.1%
associate-/l/63.1%
tan-quot63.1%
Applied egg-rr63.1%
if 2.6e172 < F < 7.90000000000000048e245Initial program 13.6%
Simplified14.8%
Taylor expanded in F around inf 99.6%
Taylor expanded in x around 0 88.2%
if 7.90000000000000048e245 < F Initial program 26.5%
Simplified59.0%
Taylor expanded in B around 0 39.0%
Taylor expanded in F around inf 72.3%
(FPCore (F B x)
:precision binary64
(if (<= F -1450.0)
(/ (- -1.0 x) B)
(if (<= F 1.16e-54)
(/ x (- (sin B)))
(if (<= F 8.5e+245) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1450.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.16e-54) {
tmp = x / -sin(B);
} else if (F <= 8.5e+245) {
tmp = 1.0 / 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 <= (-1450.0d0)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.16d-54) then
tmp = x / -sin(b)
else if (f <= 8.5d+245) then
tmp = 1.0d0 / 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 <= -1450.0) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.16e-54) {
tmp = x / -Math.sin(B);
} else if (F <= 8.5e+245) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1450.0: tmp = (-1.0 - x) / B elif F <= 1.16e-54: tmp = x / -math.sin(B) elif F <= 8.5e+245: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1450.0) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.16e-54) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 8.5e+245) tmp = Float64(1.0 / 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 <= -1450.0) tmp = (-1.0 - x) / B; elseif (F <= 1.16e-54) tmp = x / -sin(B); elseif (F <= 8.5e+245) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1450.0], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.16e-54], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 8.5e+245], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1450:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{-54}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+245}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1450Initial program 77.7%
Simplified84.3%
Taylor expanded in F around -inf 99.2%
Taylor expanded in B around 0 41.8%
associate-*r/41.8%
distribute-lft-in41.8%
metadata-eval41.8%
neg-mul-141.8%
unsub-neg41.8%
Simplified41.8%
if -1450 < F < 1.16e-54Initial program 99.4%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 70.5%
Taylor expanded in B around 0 43.1%
if 1.16e-54 < F < 8.49999999999999971e245Initial program 69.4%
Simplified77.0%
Taylor expanded in F around inf 89.3%
Taylor expanded in x around 0 51.9%
if 8.49999999999999971e245 < F Initial program 26.5%
Simplified59.0%
Taylor expanded in B around 0 39.0%
Taylor expanded in F around inf 72.3%
Final simplification47.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.85e-57)
(/ (- -1.0 x) B)
(if (<= F 1.16e-54)
(/ x (- B))
(if (<= F 8.6e+245) (/ 1.0 (sin B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.85e-57) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.16e-54) {
tmp = x / -B;
} else if (F <= 8.6e+245) {
tmp = 1.0 / 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 <= (-1.85d-57)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.16d-54) then
tmp = x / -b
else if (f <= 8.6d+245) then
tmp = 1.0d0 / 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 <= -1.85e-57) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.16e-54) {
tmp = x / -B;
} else if (F <= 8.6e+245) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.85e-57: tmp = (-1.0 - x) / B elif F <= 1.16e-54: tmp = x / -B elif F <= 8.6e+245: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.85e-57) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.16e-54) tmp = Float64(x / Float64(-B)); elseif (F <= 8.6e+245) tmp = Float64(1.0 / 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 <= -1.85e-57) tmp = (-1.0 - x) / B; elseif (F <= 1.16e-54) tmp = x / -B; elseif (F <= 8.6e+245) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.85e-57], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.16e-54], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 8.6e+245], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.85 \cdot 10^{-57}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.16 \cdot 10^{-54}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{+245}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.85e-57Initial program 79.6%
Simplified85.7%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 39.9%
associate-*r/39.9%
distribute-lft-in39.9%
metadata-eval39.9%
neg-mul-139.9%
unsub-neg39.9%
Simplified39.9%
if -1.85e-57 < F < 1.16e-54Initial program 99.4%
Simplified99.6%
Taylor expanded in B around 0 55.3%
Taylor expanded in F around 0 42.7%
associate-*r/42.7%
neg-mul-142.7%
Simplified42.7%
if 1.16e-54 < F < 8.59999999999999958e245Initial program 69.4%
Simplified77.0%
Taylor expanded in F around inf 89.3%
Taylor expanded in x around 0 51.9%
if 8.59999999999999958e245 < F Initial program 26.5%
Simplified59.0%
Taylor expanded in B around 0 39.0%
Taylor expanded in F around inf 72.3%
Final simplification46.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.8e-14)
(- (/ -1.0 B) t_0)
(if (<= F 8.5e-102) (/ -1.0 (/ (tan B) x)) (- (/ 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-14) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 8.5e-102) {
tmp = -1.0 / (tan(B) / x);
} 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-14)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 8.5d-102) then
tmp = (-1.0d0) / (tan(b) / x)
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-14) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 8.5e-102) {
tmp = -1.0 / (Math.tan(B) / x);
} 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-14: tmp = (-1.0 / B) - t_0 elif F <= 8.5e-102: tmp = -1.0 / (math.tan(B) / x) 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-14) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 8.5e-102) tmp = Float64(-1.0 / Float64(tan(B) / x)); 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-14) tmp = (-1.0 / B) - t_0; elseif (F <= 8.5e-102) tmp = -1.0 / (tan(B) / x); 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-14], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.5e-102], N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-102}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -5.8000000000000005e-14Initial program 78.9%
Simplified85.1%
Taylor expanded in F around -inf 97.2%
Taylor expanded in B around 0 73.1%
if -5.8000000000000005e-14 < F < 8.49999999999999973e-102Initial program 99.4%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 73.7%
clear-num73.7%
un-div-inv73.7%
associate-/l/73.6%
tan-quot73.7%
Applied egg-rr73.7%
if 8.49999999999999973e-102 < F Initial program 62.6%
Simplified74.8%
Taylor expanded in F around inf 88.1%
Taylor expanded in B around 0 68.4%
(FPCore (F B x) :precision binary64 (if (<= F 2.8e+172) (/ -1.0 (/ (tan B) x)) (if (<= F 8e+245) (/ 1.0 (sin B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= 2.8e+172) {
tmp = -1.0 / (tan(B) / x);
} else if (F <= 8e+245) {
tmp = 1.0 / 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.8d+172) then
tmp = (-1.0d0) / (tan(b) / x)
else if (f <= 8d+245) then
tmp = 1.0d0 / 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.8e+172) {
tmp = -1.0 / (Math.tan(B) / x);
} else if (F <= 8e+245) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 2.8e+172: tmp = -1.0 / (math.tan(B) / x) elif F <= 8e+245: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 2.8e+172) tmp = Float64(-1.0 / Float64(tan(B) / x)); elseif (F <= 8e+245) tmp = Float64(1.0 / 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.8e+172) tmp = -1.0 / (tan(B) / x); elseif (F <= 8e+245) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 2.8e+172], N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8e+245], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.8 \cdot 10^{+172}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{+245}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 2.8e172Initial program 89.6%
Simplified94.1%
clear-num94.1%
un-div-inv94.2%
fma-define94.2%
fma-undefine94.2%
*-commutative94.2%
fma-define94.2%
fma-define94.2%
Applied egg-rr94.2%
Taylor expanded in F around 0 58.3%
clear-num58.3%
un-div-inv58.3%
associate-/l/58.2%
tan-quot58.3%
Applied egg-rr58.3%
if 2.8e172 < F < 8.00000000000000035e245Initial program 13.6%
Simplified14.8%
Taylor expanded in F around inf 99.6%
Taylor expanded in x around 0 88.2%
if 8.00000000000000035e245 < F Initial program 26.5%
Simplified59.0%
Taylor expanded in B around 0 39.0%
Taylor expanded in F around inf 72.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.9e-55) (/ (- -1.0 x) B) (if (<= F 8.6e-102) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e-55) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.6e-102) {
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 <= (-1.9d-55)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.6d-102) 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 <= -1.9e-55) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.6e-102) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e-55: tmp = (-1.0 - x) / B elif F <= 8.6e-102: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e-55) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.6e-102) 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 <= -1.9e-55) tmp = (-1.0 - x) / B; elseif (F <= 8.6e-102) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e-55], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.6e-102], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{-55}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.6 \cdot 10^{-102}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.8999999999999998e-55Initial program 79.6%
Simplified85.7%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 39.9%
associate-*r/39.9%
distribute-lft-in39.9%
metadata-eval39.9%
neg-mul-139.9%
unsub-neg39.9%
Simplified39.9%
if -1.8999999999999998e-55 < F < 8.5999999999999995e-102Initial program 99.4%
Simplified99.6%
Taylor expanded in B around 0 55.6%
Taylor expanded in F around 0 44.4%
associate-*r/44.4%
neg-mul-144.4%
Simplified44.4%
if 8.5999999999999995e-102 < F Initial program 62.6%
Simplified74.8%
Taylor expanded in B around 0 37.8%
Taylor expanded in F around inf 49.0%
Final simplification44.6%
(FPCore (F B x) :precision binary64 (if (<= F -8.6e-57) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.6e-57) {
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 <= (-8.6d-57)) 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 <= -8.6e-57) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.6e-57: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.6e-57) 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 <= -8.6e-57) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.6e-57], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.6 \cdot 10^{-57}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -8.60000000000000043e-57Initial program 79.6%
Simplified85.7%
Taylor expanded in F around -inf 94.9%
Taylor expanded in B around 0 39.9%
associate-*r/39.9%
distribute-lft-in39.9%
metadata-eval39.9%
neg-mul-139.9%
unsub-neg39.9%
Simplified39.9%
if -8.60000000000000043e-57 < F Initial program 80.0%
Simplified86.5%
Taylor expanded in B around 0 46.2%
Taylor expanded in F around 0 33.7%
associate-*r/33.7%
neg-mul-133.7%
Simplified33.7%
Final simplification35.6%
(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 79.9%
Simplified86.2%
Taylor expanded in B around 0 42.6%
Taylor expanded in F around 0 28.5%
associate-*r/28.5%
neg-mul-128.5%
Simplified28.5%
Final simplification28.5%
(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 79.9%
Simplified86.2%
Taylor expanded in B around 0 42.6%
Taylor expanded in F around 0 28.5%
associate-*r/28.5%
neg-mul-128.5%
Simplified28.5%
div-inv28.4%
add-sqr-sqrt10.2%
sqrt-unprod10.2%
sqr-neg10.2%
sqrt-unprod1.4%
add-sqr-sqrt2.7%
Applied egg-rr2.7%
associate-*r/2.7%
*-rgt-identity2.7%
Simplified2.7%
herbie shell --seed 2024137
(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))))))