
(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 26 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))) (t_1 (/ (sin B) -1.0)))
(if (<= F -6.5e+166)
(/ (/ (fma -1.0 (tan B) (* x t_1)) t_1) (- (tan B)))
(if (<= F 0.0013)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = sin(B) / -1.0;
double tmp;
if (F <= -6.5e+166) {
tmp = (fma(-1.0, tan(B), (x * t_1)) / t_1) / -tan(B);
} else if (F <= 0.0013) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(sin(B) / -1.0) tmp = 0.0 if (F <= -6.5e+166) tmp = Float64(Float64(fma(-1.0, tan(B), Float64(x * t_1)) / t_1) / Float64(-tan(B))); elseif (F <= 0.0013) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[B], $MachinePrecision] / -1.0), $MachinePrecision]}, If[LessEqual[F, -6.5e+166], N[(N[(N[(-1.0 * N[Tan[B], $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 0.0013], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{\sin B}{-1}\\
\mathbf{if}\;F \leq -6.5 \cdot 10^{+166}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(-1, \tan B, x \cdot t_1\right)}{t_1}}{-\tan B}\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.5000000000000005e166Initial program 24.7%
Simplified42.9%
Taylor expanded in x around 0 42.9%
associate-*l/42.9%
*-lft-identity42.9%
+-commutative42.9%
unpow242.9%
fma-udef42.9%
Simplified42.9%
Taylor expanded in F around -inf 99.8%
clear-num99.8%
frac-2neg99.8%
frac-sub74.4%
Applied egg-rr74.4%
associate-/r*99.8%
*-lft-identity99.8%
neg-mul-199.8%
fma-neg99.8%
distribute-rgt-neg-out99.8%
remove-double-neg99.8%
*-commutative99.8%
Simplified99.8%
if -6.5000000000000005e166 < F < 0.0012999999999999999Initial program 94.8%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 0.0012999999999999999 < F Initial program 59.5%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
associate-*r/78.8%
sqrt-div78.9%
metadata-eval78.9%
un-div-inv78.9%
Applied egg-rr78.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.5e+166)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.0013)
(- (/ (/ F (sqrt (fma F F 2.0))) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -6.5e+166) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.0013) {
tmp = ((F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -6.5e+166) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.0013) tmp = Float64(Float64(Float64(F / sqrt(fma(F, F, 2.0))) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.5e+166], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0013], N[(N[(N[(F / N[Sqrt[N[(F * F + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6.5 \cdot 10^{+166}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\mathsf{fma}\left(F, F, 2\right)}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -6.5000000000000005e166Initial program 24.7%
Simplified42.9%
Taylor expanded in x around 0 42.9%
associate-*l/42.9%
*-lft-identity42.9%
+-commutative42.9%
unpow242.9%
fma-udef42.9%
Simplified42.9%
Taylor expanded in F around -inf 99.8%
if -6.5000000000000005e166 < F < 0.0012999999999999999Initial program 94.8%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.6%
sqrt-div99.6%
metadata-eval99.6%
un-div-inv99.7%
Applied egg-rr99.7%
if 0.0012999999999999999 < F Initial program 59.5%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
associate-*r/78.8%
sqrt-div78.9%
metadata-eval78.9%
un-div-inv78.9%
Applied egg-rr78.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.0013)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.0013) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.9d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.0013d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.0013) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.0013: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.0013) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.9) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.0013) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.9], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0013], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.9:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 54.0%
Simplified71.3%
Taylor expanded in x around 0 71.3%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
associate-*r/71.4%
sqrt-div71.4%
metadata-eval71.4%
un-div-inv71.4%
Applied egg-rr71.4%
Taylor expanded in F around -inf 99.7%
mul-1-neg99.7%
Simplified99.7%
if -0.900000000000000022 < F < 0.0012999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
if 0.0012999999999999999 < F Initial program 59.5%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
associate-*r/78.8%
sqrt-div78.9%
metadata-eval78.9%
un-div-inv78.9%
Applied egg-rr78.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.92)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F 0.0013)
(- (/ (/ F (sqrt 2.0)) (sin B)) t_0)
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.92) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= 0.0013) {
tmp = ((F / sqrt(2.0)) / sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.92d0)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= 0.0013d0) then
tmp = ((f / sqrt(2.0d0)) / sin(b)) - t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.92) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= 0.0013) {
tmp = ((F / Math.sqrt(2.0)) / Math.sin(B)) - t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.92: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= 0.0013: tmp = ((F / math.sqrt(2.0)) / math.sin(B)) - t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.92) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= 0.0013) tmp = Float64(Float64(Float64(F / sqrt(2.0)) / sin(B)) - t_0); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.92) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= 0.0013) tmp = ((F / sqrt(2.0)) / sin(B)) - t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.92], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.0013], N[(N[(N[(F / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.92:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.92000000000000004Initial program 54.0%
Simplified71.3%
Taylor expanded in x around 0 71.3%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
associate-*r/71.4%
sqrt-div71.4%
metadata-eval71.4%
un-div-inv71.4%
Applied egg-rr71.4%
Taylor expanded in F around -inf 99.7%
mul-1-neg99.7%
Simplified99.7%
if -0.92000000000000004 < F < 0.0012999999999999999Initial program 99.5%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.5%
sqrt-div99.5%
metadata-eval99.5%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in F around 0 99.6%
if 0.0012999999999999999 < F Initial program 59.5%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
associate-*r/78.8%
sqrt-div78.9%
metadata-eval78.9%
un-div-inv78.9%
Applied egg-rr78.9%
Taylor expanded in F around inf 99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (/ (- x) (/ (sin B) (cos B))))
(t_2 (- (/ 1.0 (sin B)) (/ x B))))
(if (<= F -215000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -2.3e-204)
(- (* t_0 (/ F B)) (/ x B))
(if (<= F 2.95e-55)
t_1
(if (<= F 0.0013)
(- (* t_0 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
(if (<= F 2.4e+44)
t_2
(if (<= F 1.22e+200)
(- (/ 1.0 B) (/ x (tan B)))
(if (<= F 8.5e+290) t_2 t_1)))))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = -x / (sin(B) / cos(B));
double t_2 = (1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -2.3e-204) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 2.95e-55) {
tmp = t_1;
} else if (F <= 0.0013) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.4e+44) {
tmp = t_2;
} else if (F <= 1.22e+200) {
tmp = (1.0 / B) - (x / tan(B));
} else if (F <= 8.5e+290) {
tmp = t_2;
} else {
tmp = 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) :: t_2
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = -x / (sin(b) / cos(b))
t_2 = (1.0d0 / sin(b)) - (x / b)
if (f <= (-215000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-2.3d-204)) then
tmp = (t_0 * (f / b)) - (x / b)
else if (f <= 2.95d-55) then
tmp = t_1
else if (f <= 0.0013d0) then
tmp = (t_0 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 2.4d+44) then
tmp = t_2
else if (f <= 1.22d+200) then
tmp = (1.0d0 / b) - (x / tan(b))
else if (f <= 8.5d+290) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = -x / (Math.sin(B) / Math.cos(B));
double t_2 = (1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -2.3e-204) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 2.95e-55) {
tmp = t_1;
} else if (F <= 0.0013) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.4e+44) {
tmp = t_2;
} else if (F <= 1.22e+200) {
tmp = (1.0 / B) - (x / Math.tan(B));
} else if (F <= 8.5e+290) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = -x / (math.sin(B) / math.cos(B)) t_2 = (1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -215000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -2.3e-204: tmp = (t_0 * (F / B)) - (x / B) elif F <= 2.95e-55: tmp = t_1 elif F <= 0.0013: tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 2.4e+44: tmp = t_2 elif F <= 1.22e+200: tmp = (1.0 / B) - (x / math.tan(B)) elif F <= 8.5e+290: tmp = t_2 else: tmp = t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(Float64(-x) / Float64(sin(B) / cos(B))) t_2 = Float64(Float64(1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -215000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -2.3e-204) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.95e-55) tmp = t_1; elseif (F <= 0.0013) tmp = Float64(Float64(t_0 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 2.4e+44) tmp = t_2; elseif (F <= 1.22e+200) tmp = Float64(Float64(1.0 / B) - Float64(x / tan(B))); elseif (F <= 8.5e+290) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = -x / (sin(B) / cos(B)); t_2 = (1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -215000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -2.3e-204) tmp = (t_0 * (F / B)) - (x / B); elseif (F <= 2.95e-55) tmp = t_1; elseif (F <= 0.0013) tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 2.4e+44) tmp = t_2; elseif (F <= 1.22e+200) tmp = (1.0 / B) - (x / tan(B)); elseif (F <= 8.5e+290) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -215000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.3e-204], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.95e-55], t$95$1, If[LessEqual[F, 0.0013], N[(N[(t$95$0 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e+44], t$95$2, If[LessEqual[F, 1.22e+200], N[(N[(1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e+290], t$95$2, t$95$1]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{-x}{\frac{\sin B}{\cos B}}\\
t_2 := \frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -215000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-204}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{+44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{+200}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+290}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if F < -2.15e8Initial program 52.8%
Simplified70.6%
Taylor expanded in x around 0 70.6%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.5%
if -2.15e8 < F < -2.2999999999999999e-204Initial program 99.6%
Taylor expanded in B around 0 86.4%
Taylor expanded in B around 0 66.3%
if -2.2999999999999999e-204 < F < 2.9499999999999999e-55 or 8.50000000000000061e290 < F Initial program 97.6%
Taylor expanded in F around -inf 33.1%
Taylor expanded in x around inf 77.6%
mul-1-neg77.6%
associate-/l*77.6%
distribute-neg-frac77.6%
Simplified77.6%
if 2.9499999999999999e-55 < F < 0.0012999999999999999Initial program 99.5%
Taylor expanded in B around 0 89.5%
Taylor expanded in B around 0 80.0%
if 0.0012999999999999999 < F < 2.40000000000000013e44 or 1.22000000000000007e200 < F < 8.50000000000000061e290Initial program 40.5%
Taylor expanded in B around 0 25.0%
Taylor expanded in F around inf 84.7%
if 2.40000000000000013e44 < F < 1.22000000000000007e200Initial program 75.3%
Simplified91.7%
Taylor expanded in F around inf 99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 86.4%
Final simplification78.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_1 (/ x (tan B)))
(t_2 (/ (- x) (/ (sin B) (cos B))))
(t_3 (- (/ 1.0 (sin B)) (/ x B))))
(if (<= F -215000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.3e-204)
(- (* t_0 (/ F B)) (/ x B))
(if (<= F 1.05e-55)
t_2
(if (<= F 0.0013)
(- (* t_0 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
(if (<= F 1.6e+44)
t_3
(if (<= F 6.8e+200)
(- (/ 1.0 B) t_1)
(if (<= F 8.5e+290) t_3 t_2)))))))))
double code(double F, double B, double x) {
double t_0 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double t_2 = -x / (sin(B) / cos(B));
double t_3 = (1.0 / sin(B)) - (x / B);
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.3e-204) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 1.05e-55) {
tmp = t_2;
} else if (F <= 0.0013) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 1.6e+44) {
tmp = t_3;
} else if (F <= 6.8e+200) {
tmp = (1.0 / B) - t_1;
} else if (F <= 8.5e+290) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_1 = x / tan(b)
t_2 = -x / (sin(b) / cos(b))
t_3 = (1.0d0 / sin(b)) - (x / b)
if (f <= (-215000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.3d-204)) then
tmp = (t_0 * (f / b)) - (x / b)
else if (f <= 1.05d-55) then
tmp = t_2
else if (f <= 0.0013d0) then
tmp = (t_0 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 1.6d+44) then
tmp = t_3
else if (f <= 6.8d+200) then
tmp = (1.0d0 / b) - t_1
else if (f <= 8.5d+290) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double t_2 = -x / (Math.sin(B) / Math.cos(B));
double t_3 = (1.0 / Math.sin(B)) - (x / B);
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.3e-204) {
tmp = (t_0 * (F / B)) - (x / B);
} else if (F <= 1.05e-55) {
tmp = t_2;
} else if (F <= 0.0013) {
tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 1.6e+44) {
tmp = t_3;
} else if (F <= 6.8e+200) {
tmp = (1.0 / B) - t_1;
} else if (F <= 8.5e+290) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(F, B, x): t_0 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) t_2 = -x / (math.sin(B) / math.cos(B)) t_3 = (1.0 / math.sin(B)) - (x / B) tmp = 0 if F <= -215000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.3e-204: tmp = (t_0 * (F / B)) - (x / B) elif F <= 1.05e-55: tmp = t_2 elif F <= 0.0013: tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 1.6e+44: tmp = t_3 elif F <= 6.8e+200: tmp = (1.0 / B) - t_1 elif F <= 8.5e+290: tmp = t_3 else: tmp = t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(-x) / Float64(sin(B) / cos(B))) t_3 = Float64(Float64(1.0 / sin(B)) - Float64(x / B)) tmp = 0.0 if (F <= -215000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.3e-204) tmp = Float64(Float64(t_0 * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.05e-55) tmp = t_2; elseif (F <= 0.0013) tmp = Float64(Float64(t_0 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 1.6e+44) tmp = t_3; elseif (F <= 6.8e+200) tmp = Float64(Float64(1.0 / B) - t_1); elseif (F <= 8.5e+290) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_1 = x / tan(B); t_2 = -x / (sin(B) / cos(B)); t_3 = (1.0 / sin(B)) - (x / B); tmp = 0.0; if (F <= -215000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.3e-204) tmp = (t_0 * (F / B)) - (x / B); elseif (F <= 1.05e-55) tmp = t_2; elseif (F <= 0.0013) tmp = (t_0 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 1.6e+44) tmp = t_3; elseif (F <= 6.8e+200) tmp = (1.0 / B) - t_1; elseif (F <= 8.5e+290) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -215000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.3e-204], N[(N[(t$95$0 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-55], t$95$2, If[LessEqual[F, 0.0013], N[(N[(t$95$0 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e+44], t$95$3, If[LessEqual[F, 6.8e+200], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 8.5e+290], t$95$3, t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{-x}{\frac{\sin B}{\cos B}}\\
t_3 := \frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{if}\;F \leq -215000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-204}:\\
\;\;\;\;t_0 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;t_0 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{+44}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{+200}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+290}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if F < -2.15e8Initial program 52.8%
Simplified70.6%
Taylor expanded in x around 0 70.6%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in F around -inf 99.8%
if -2.15e8 < F < -2.2999999999999999e-204Initial program 99.6%
Taylor expanded in B around 0 86.4%
Taylor expanded in B around 0 66.3%
if -2.2999999999999999e-204 < F < 1.0500000000000001e-55 or 8.50000000000000061e290 < F Initial program 97.6%
Taylor expanded in F around -inf 33.1%
Taylor expanded in x around inf 77.6%
mul-1-neg77.6%
associate-/l*77.6%
distribute-neg-frac77.6%
Simplified77.6%
if 1.0500000000000001e-55 < F < 0.0012999999999999999Initial program 99.5%
Taylor expanded in B around 0 89.5%
Taylor expanded in B around 0 80.0%
if 0.0012999999999999999 < F < 1.60000000000000002e44 or 6.79999999999999939e200 < F < 8.50000000000000061e290Initial program 40.5%
Taylor expanded in B around 0 25.0%
Taylor expanded in F around inf 84.7%
if 1.60000000000000002e44 < F < 6.79999999999999939e200Initial program 75.3%
Simplified91.7%
Taylor expanded in F around inf 99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 86.4%
Final simplification84.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(t_1 (/ x (tan B))))
(if (<= F -3.5e+26)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.8e-217)
(- t_0 (/ x B))
(if (<= F 1.2e-136)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_1)
(if (<= F 0.0013)
(+ t_0 (* x (/ -1.0 B)))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -3.5e+26) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.8e-217) {
tmp = t_0 - (x / B);
} else if (F <= 1.2e-136) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1;
} else if (F <= 0.0013) {
tmp = t_0 + (x * (-1.0 / B));
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))
t_1 = x / tan(b)
if (f <= (-3.5d+26)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-5.8d-217)) then
tmp = t_0 - (x / b)
else if (f <= 1.2d-136) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_1
else if (f <= 0.0013d0) then
tmp = t_0 + (x * ((-1.0d0) / b))
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.5e+26) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -5.8e-217) {
tmp = t_0 - (x / B);
} else if (F <= 1.2e-136) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_1;
} else if (F <= 0.0013) {
tmp = t_0 + (x * (-1.0 / B));
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -3.5e+26: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -5.8e-217: tmp = t_0 - (x / B) elif F <= 1.2e-136: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_1 elif F <= 0.0013: tmp = t_0 + (x * (-1.0 / B)) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e+26) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.8e-217) tmp = Float64(t_0 - Float64(x / B)); elseif (F <= 1.2e-136) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_1); elseif (F <= 0.0013) tmp = Float64(t_0 + Float64(x * Float64(-1.0 / B))); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.5e+26) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -5.8e-217) tmp = t_0 - (x / B); elseif (F <= 1.2e-136) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1; elseif (F <= 0.0013) tmp = t_0 + (x * (-1.0 / B)); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.8e-217], N[(t$95$0 - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.2e-136], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.0013], N[(t$95$0 + N[(x * N[(-1.0 / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -5.8 \cdot 10^{-217}:\\
\;\;\;\;t_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{-136}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;t_0 + x \cdot \frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -3.4999999999999999e26Initial program 51.6%
Simplified69.8%
Taylor expanded in x around 0 69.9%
associate-*l/69.8%
*-lft-identity69.8%
+-commutative69.8%
unpow269.8%
fma-udef69.8%
Simplified69.8%
Taylor expanded in F around -inf 99.8%
if -3.4999999999999999e26 < F < -5.79999999999999963e-217Initial program 99.6%
Taylor expanded in B around 0 86.2%
if -5.79999999999999963e-217 < F < 1.1999999999999999e-136Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in F around -inf 85.4%
mul-1-neg85.4%
Simplified85.4%
if 1.1999999999999999e-136 < F < 0.0012999999999999999Initial program 99.5%
Taylor expanded in B around 0 90.3%
if 0.0012999999999999999 < F Initial program 59.5%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
associate-*r/78.8%
sqrt-div78.9%
metadata-eval78.9%
un-div-inv78.9%
Applied egg-rr78.9%
Taylor expanded in F around inf 99.8%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (/ F (sin B)) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (/ x (tan B)))
(t_2 (- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_1)))
(if (<= F -3.2e-12)
t_2
(if (<= F -1.7e-217)
t_0
(if (<= F 2.3e-137)
t_2
(if (<= F 0.0013) t_0 (- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / tan(B);
double t_2 = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1;
double tmp;
if (F <= -3.2e-12) {
tmp = t_2;
} else if (F <= -1.7e-217) {
tmp = t_0;
} else if (F <= 2.3e-137) {
tmp = t_2;
} else if (F <= 0.0013) {
tmp = t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / 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) :: t_2
real(8) :: tmp
t_0 = ((f / sin(b)) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = x / tan(b)
t_2 = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_1
if (f <= (-3.2d-12)) then
tmp = t_2
else if (f <= (-1.7d-217)) then
tmp = t_0
else if (f <= 2.3d-137) then
tmp = t_2
else if (f <= 0.0013d0) then
tmp = t_0
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / Math.tan(B);
double t_2 = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_1;
double tmp;
if (F <= -3.2e-12) {
tmp = t_2;
} else if (F <= -1.7e-217) {
tmp = t_0;
} else if (F <= 2.3e-137) {
tmp = t_2;
} else if (F <= 0.0013) {
tmp = t_0;
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) t_1 = x / math.tan(B) t_2 = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_1 tmp = 0 if F <= -3.2e-12: tmp = t_2 elif F <= -1.7e-217: tmp = t_0 elif F <= 2.3e-137: tmp = t_2 elif F <= 0.0013: tmp = t_0 else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_1) tmp = 0.0 if (F <= -3.2e-12) tmp = t_2; elseif (F <= -1.7e-217) tmp = t_0; elseif (F <= 2.3e-137) tmp = t_2; elseif (F <= 0.0013) tmp = t_0; else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); t_1 = x / tan(B); t_2 = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1; tmp = 0.0; if (F <= -3.2e-12) tmp = t_2; elseif (F <= -1.7e-217) tmp = t_0; elseif (F <= 2.3e-137) tmp = t_2; elseif (F <= 0.0013) tmp = t_0; else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -3.2e-12], t$95$2, If[LessEqual[F, -1.7e-217], t$95$0, If[LessEqual[F, 2.3e-137], t$95$2, If[LessEqual[F, 0.0013], t$95$0, N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_1\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{-12}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq -1.7 \cdot 10^{-217}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -3.2000000000000001e-12 or -1.70000000000000008e-217 < F < 2.30000000000000008e-137Initial program 68.1%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-*l/80.1%
*-lft-identity80.1%
+-commutative80.1%
unpow280.1%
fma-udef80.1%
Simplified80.1%
associate-*r/80.2%
sqrt-div80.1%
metadata-eval80.1%
un-div-inv80.2%
Applied egg-rr80.2%
Taylor expanded in F around -inf 94.7%
mul-1-neg94.7%
Simplified94.7%
if -3.2000000000000001e-12 < F < -1.70000000000000008e-217 or 2.30000000000000008e-137 < F < 0.0012999999999999999Initial program 99.5%
Taylor expanded in B around 0 87.7%
Taylor expanded in F around 0 87.7%
if 0.0012999999999999999 < F Initial program 59.5%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
associate-*r/78.8%
sqrt-div78.9%
metadata-eval78.9%
un-div-inv78.9%
Applied egg-rr78.9%
Taylor expanded in F around inf 99.8%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ F (sin B))) (t_1 (/ x (tan B))))
(if (<= F -3.5e+26)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.6e-218)
(- (* t_0 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x B))
(if (<= F 1.7e-137)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_1)
(if (<= F 0.0013)
(- (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (/ x B))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = F / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -3.5e+26) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.6e-218) {
tmp = (t_0 * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.7e-137) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1;
} else if (F <= 0.0013) {
tmp = (t_0 * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f / sin(b)
t_1 = x / tan(b)
if (f <= (-3.5d+26)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.6d-218)) then
tmp = (t_0 * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
else if (f <= 1.7d-137) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_1
else if (f <= 0.0013d0) then
tmp = (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - (x / b)
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.5e+26) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.6e-218) {
tmp = (t_0 * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
} else if (F <= 1.7e-137) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_1;
} else if (F <= 0.0013) {
tmp = (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -3.5e+26: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.6e-218: tmp = (t_0 * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) elif F <= 1.7e-137: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_1 elif F <= 0.0013: tmp = (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.5e+26) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.6e-218) tmp = Float64(Float64(t_0 * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)); elseif (F <= 1.7e-137) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_1); elseif (F <= 0.0013) tmp = Float64(Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.5e+26) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.6e-218) tmp = (t_0 * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); elseif (F <= 1.7e-137) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_1; elseif (F <= 0.0013) tmp = (t_0 * sqrt((1.0 / (2.0 + (x * 2.0))))) - (x / B); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.5e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.6e-218], N[(N[(t$95$0 * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-137], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.0013], N[(N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-218}:\\
\;\;\;\;t_0 \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-137}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_1\\
\mathbf{elif}\;F \leq 0.0013:\\
\;\;\;\;t_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -3.4999999999999999e26Initial program 51.6%
Simplified69.8%
Taylor expanded in x around 0 69.9%
associate-*l/69.8%
*-lft-identity69.8%
+-commutative69.8%
unpow269.8%
fma-udef69.8%
Simplified69.8%
Taylor expanded in F around -inf 99.8%
if -3.4999999999999999e26 < F < -4.59999999999999989e-218Initial program 99.6%
Taylor expanded in B around 0 86.2%
if -4.59999999999999989e-218 < F < 1.70000000000000007e-137Initial program 99.4%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
associate-*r/99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in F around -inf 85.4%
mul-1-neg85.4%
Simplified85.4%
if 1.70000000000000007e-137 < F < 0.0012999999999999999Initial program 99.5%
Taylor expanded in B around 0 90.2%
Taylor expanded in F around 0 90.2%
if 0.0012999999999999999 < F Initial program 59.5%
Simplified78.7%
Taylor expanded in x around 0 78.7%
associate-*l/78.7%
*-lft-identity78.7%
+-commutative78.7%
unpow278.7%
fma-udef78.7%
Simplified78.7%
associate-*r/78.8%
sqrt-div78.9%
metadata-eval78.9%
un-div-inv78.9%
Applied egg-rr78.9%
Taylor expanded in F around inf 99.8%
Final simplification94.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -215000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -2.3e-204)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -2.3e-204) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-215000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-2.3d-204)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -2.3e-204) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -215000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -2.3e-204: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -215000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -2.3e-204) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -215000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -2.3e-204) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -215000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.3e-204], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -215000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-204}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -2.15e8Initial program 52.8%
Simplified70.6%
Taylor expanded in x around 0 70.6%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in F around -inf 99.8%
if -2.15e8 < F < -2.2999999999999999e-204Initial program 99.6%
Taylor expanded in B around 0 86.4%
Taylor expanded in B around 0 66.3%
if -2.2999999999999999e-204 < F Initial program 77.5%
Simplified88.1%
Taylor expanded in x around 0 88.1%
associate-*l/88.1%
*-lft-identity88.1%
+-commutative88.1%
unpow288.1%
fma-udef88.1%
Simplified88.1%
associate-*r/88.2%
sqrt-div88.2%
metadata-eval88.2%
un-div-inv88.2%
Applied egg-rr88.2%
Taylor expanded in F around inf 86.6%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.55e-12)
(- (/ (/ F (- (/ -1.0 F) F)) (sin B)) t_0)
(if (<= F -2.3e-204)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(- (/ (/ F (+ F (/ 1.0 F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.55e-12) {
tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0;
} else if (F <= -2.3e-204) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.55d-12)) then
tmp = ((f / (((-1.0d0) / f) - f)) / sin(b)) - t_0
else if (f <= (-2.3d-204)) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else
tmp = ((f / (f + (1.0d0 / f))) / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.55e-12) {
tmp = ((F / ((-1.0 / F) - F)) / Math.sin(B)) - t_0;
} else if (F <= -2.3e-204) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else {
tmp = ((F / (F + (1.0 / F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.55e-12: tmp = ((F / ((-1.0 / F) - F)) / math.sin(B)) - t_0 elif F <= -2.3e-204: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) else: tmp = ((F / (F + (1.0 / F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.55e-12) tmp = Float64(Float64(Float64(F / Float64(Float64(-1.0 / F) - F)) / sin(B)) - t_0); elseif (F <= -2.3e-204) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); else tmp = Float64(Float64(Float64(F / Float64(F + Float64(1.0 / F))) / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.55e-12) tmp = ((F / ((-1.0 / F) - F)) / sin(B)) - t_0; elseif (F <= -2.3e-204) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); else tmp = ((F / (F + (1.0 / F))) / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.55e-12], N[(N[(N[(F / N[(N[(-1.0 / F), $MachinePrecision] - F), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.3e-204], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(F / N[(F + N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.55 \cdot 10^{-12}:\\
\;\;\;\;\frac{\frac{F}{\frac{-1}{F} - F}}{\sin B} - t_0\\
\mathbf{elif}\;F \leq -2.3 \cdot 10^{-204}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F + \frac{1}{F}}}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.5500000000000001e-12Initial program 55.6%
Simplified72.3%
Taylor expanded in x around 0 72.3%
associate-*l/72.3%
*-lft-identity72.3%
+-commutative72.3%
unpow272.3%
fma-udef72.3%
Simplified72.3%
associate-*r/72.3%
sqrt-div72.3%
metadata-eval72.3%
un-div-inv72.3%
Applied egg-rr72.3%
Taylor expanded in F around -inf 97.6%
mul-1-neg97.6%
Simplified97.6%
if -1.5500000000000001e-12 < F < -2.2999999999999999e-204Initial program 99.5%
Taylor expanded in B around 0 87.2%
Taylor expanded in B around 0 66.9%
Taylor expanded in F around 0 66.9%
*-commutative66.9%
Simplified66.9%
if -2.2999999999999999e-204 < F Initial program 77.5%
Simplified88.1%
Taylor expanded in x around 0 88.1%
associate-*l/88.1%
*-lft-identity88.1%
+-commutative88.1%
unpow288.1%
fma-udef88.1%
Simplified88.1%
associate-*r/88.2%
sqrt-div88.2%
metadata-eval88.2%
un-div-inv88.2%
Applied egg-rr88.2%
Taylor expanded in F around inf 86.6%
Final simplification87.3%
(FPCore (F B x)
:precision binary64
(if (<= F -215000000.0)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -4.5e-205)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 1.1e-27)
(/ (- x) (/ (sin B) (cos B)))
(/ (- 1.0 (* x (cos B))) (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -4.5e-205) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.1e-27) {
tmp = -x / (sin(B) / cos(B));
} else {
tmp = (1.0 - (x * cos(B))) / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-215000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-4.5d-205)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 1.1d-27) then
tmp = -x / (sin(b) / cos(b))
else
tmp = (1.0d0 - (x * cos(b))) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -4.5e-205) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 1.1e-27) {
tmp = -x / (Math.sin(B) / Math.cos(B));
} else {
tmp = (1.0 - (x * Math.cos(B))) / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -215000000.0: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -4.5e-205: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 1.1e-27: tmp = -x / (math.sin(B) / math.cos(B)) else: tmp = (1.0 - (x * math.cos(B))) / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -215000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -4.5e-205) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.1e-27) tmp = Float64(Float64(-x) / Float64(sin(B) / cos(B))); else tmp = Float64(Float64(1.0 - Float64(x * cos(B))) / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -215000000.0) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -4.5e-205) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 1.1e-27) tmp = -x / (sin(B) / cos(B)); else tmp = (1.0 - (x * cos(B))) / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -215000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -4.5e-205], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.1e-27], N[((-x) / N[(N[Sin[B], $MachinePrecision] / N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -215000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -4.5 \cdot 10^{-205}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-27}:\\
\;\;\;\;\frac{-x}{\frac{\sin B}{\cos B}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x \cdot \cos B}{\sin B}\\
\end{array}
\end{array}
if F < -2.15e8Initial program 52.8%
Simplified70.6%
Taylor expanded in x around 0 70.6%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in F around -inf 99.8%
if -2.15e8 < F < -4.49999999999999956e-205Initial program 99.6%
Taylor expanded in B around 0 86.4%
Taylor expanded in B around 0 66.3%
if -4.49999999999999956e-205 < F < 1.09999999999999993e-27Initial program 99.5%
Taylor expanded in F around -inf 29.1%
Taylor expanded in x around inf 75.9%
mul-1-neg75.9%
associate-/l*75.9%
distribute-neg-frac75.9%
Simplified75.9%
if 1.09999999999999993e-27 < F Initial program 62.0%
Simplified80.0%
Taylor expanded in F around inf 93.8%
associate-/r*93.8%
Simplified93.8%
Taylor expanded in F around 0 93.9%
div-sub93.9%
Simplified93.9%
Final simplification87.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B)))
(t_1 (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(t_2 (- (/ -1.0 B) t_0)))
(if (<= F -215000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.5e-225)
(- (* t_1 (/ F B)) (/ x B))
(if (<= F 1.6e-93)
t_2
(if (<= F 0.00125)
(- (* t_1 (+ (/ F B) (* 0.16666666666666666 (* F B)))) (/ x B))
(if (<= F 2.1e+200)
(- (/ 1.0 B) t_0)
(if (<= F 8.5e+290) (- (/ 1.0 (sin B)) (/ x B)) t_2))))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_2 = (-1.0 / B) - t_0;
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.5e-225) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 1.6e-93) {
tmp = t_2;
} else if (F <= 0.00125) {
tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.1e+200) {
tmp = (1.0 / B) - t_0;
} else if (F <= 8.5e+290) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)
t_2 = ((-1.0d0) / b) - t_0
if (f <= (-215000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.5d-225)) then
tmp = (t_1 * (f / b)) - (x / b)
else if (f <= 1.6d-93) then
tmp = t_2
else if (f <= 0.00125d0) then
tmp = (t_1 * ((f / b) + (0.16666666666666666d0 * (f * b)))) - (x / b)
else if (f <= 2.1d+200) then
tmp = (1.0d0 / b) - t_0
else if (f <= 8.5d+290) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_2
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 = Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5);
double t_2 = (-1.0 / B) - t_0;
double tmp;
if (F <= -215000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.5e-225) {
tmp = (t_1 * (F / B)) - (x / B);
} else if (F <= 1.6e-93) {
tmp = t_2;
} else if (F <= 0.00125) {
tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B);
} else if (F <= 2.1e+200) {
tmp = (1.0 / B) - t_0;
} else if (F <= 8.5e+290) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_2;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) t_2 = (-1.0 / B) - t_0 tmp = 0 if F <= -215000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.5e-225: tmp = (t_1 * (F / B)) - (x / B) elif F <= 1.6e-93: tmp = t_2 elif F <= 0.00125: tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B) elif F <= 2.1e+200: tmp = (1.0 / B) - t_0 elif F <= 8.5e+290: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_2 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5 t_2 = Float64(Float64(-1.0 / B) - t_0) tmp = 0.0 if (F <= -215000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.5e-225) tmp = Float64(Float64(t_1 * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.6e-93) tmp = t_2; elseif (F <= 0.00125) tmp = Float64(Float64(t_1 * Float64(Float64(F / B) + Float64(0.16666666666666666 * Float64(F * B)))) - Float64(x / B)); elseif (F <= 2.1e+200) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= 8.5e+290) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = t_2; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = ((2.0 + (F * F)) + (x * 2.0)) ^ -0.5; t_2 = (-1.0 / B) - t_0; tmp = 0.0; if (F <= -215000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.5e-225) tmp = (t_1 * (F / B)) - (x / B); elseif (F <= 1.6e-93) tmp = t_2; elseif (F <= 0.00125) tmp = (t_1 * ((F / B) + (0.16666666666666666 * (F * B)))) - (x / B); elseif (F <= 2.1e+200) tmp = (1.0 / B) - t_0; elseif (F <= 8.5e+290) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_2; 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[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[F, -215000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.5e-225], N[(N[(t$95$1 * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.6e-93], t$95$2, If[LessEqual[F, 0.00125], N[(N[(t$95$1 * N[(N[(F / B), $MachinePrecision] + N[(0.16666666666666666 * N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.1e+200], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.5e+290], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
t_2 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -215000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.5 \cdot 10^{-225}:\\
\;\;\;\;t_1 \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 0.00125:\\
\;\;\;\;t_1 \cdot \left(\frac{F}{B} + 0.16666666666666666 \cdot \left(F \cdot B\right)\right) - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.1 \cdot 10^{+200}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+290}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if F < -2.15e8Initial program 52.8%
Simplified70.6%
Taylor expanded in x around 0 70.6%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.5%
if -2.15e8 < F < -5.5000000000000002e-225Initial program 99.6%
Taylor expanded in B around 0 86.0%
Taylor expanded in B around 0 63.9%
if -5.5000000000000002e-225 < F < 1.5999999999999999e-93 or 8.50000000000000061e290 < F Initial program 97.2%
Simplified99.5%
Taylor expanded in x around 0 99.5%
associate-*l/99.5%
*-lft-identity99.5%
+-commutative99.5%
unpow299.5%
fma-udef99.5%
Simplified99.5%
Taylor expanded in F around -inf 36.0%
Taylor expanded in B around 0 55.7%
if 1.5999999999999999e-93 < F < 0.00125000000000000003Initial program 99.6%
Taylor expanded in B around 0 92.4%
Taylor expanded in B around 0 79.0%
if 0.00125000000000000003 < F < 2.09999999999999997e200Initial program 79.7%
Simplified93.1%
Taylor expanded in F around inf 99.5%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 82.4%
if 2.09999999999999997e200 < F < 8.50000000000000061e290Initial program 21.6%
Taylor expanded in B around 0 8.9%
Taylor expanded in F around inf 87.6%
Final simplification74.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B)))
(t_1 (/ x (tan B)))
(t_2 (- (/ -1.0 B) t_1)))
(if (<= F -0.22)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.15e-227)
t_0
(if (<= F 1.3e-137)
t_2
(if (<= F 6.8e-6)
t_0
(if (<= F 4.5e+201)
(- (/ 1.0 B) t_1)
(if (<= F 8.5e+290) (- (/ 1.0 (sin B)) (/ x B)) t_2))))))))
double code(double F, double B, double x) {
double t_0 = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
double t_1 = x / tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -0.22) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.15e-227) {
tmp = t_0;
} else if (F <= 1.3e-137) {
tmp = t_2;
} else if (F <= 6.8e-6) {
tmp = t_0;
} else if (F <= 4.5e+201) {
tmp = (1.0 / B) - t_1;
} else if (F <= 8.5e+290) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
t_1 = x / tan(b)
t_2 = ((-1.0d0) / b) - t_1
if (f <= (-0.22d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.15d-227)) then
tmp = t_0
else if (f <= 1.3d-137) then
tmp = t_2
else if (f <= 6.8d-6) then
tmp = t_0
else if (f <= 4.5d+201) then
tmp = (1.0d0 / b) - t_1
else if (f <= 8.5d+290) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
double t_1 = x / Math.tan(B);
double t_2 = (-1.0 / B) - t_1;
double tmp;
if (F <= -0.22) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.15e-227) {
tmp = t_0;
} else if (F <= 1.3e-137) {
tmp = t_2;
} else if (F <= 6.8e-6) {
tmp = t_0;
} else if (F <= 4.5e+201) {
tmp = (1.0 / B) - t_1;
} else if (F <= 8.5e+290) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_2;
}
return tmp;
}
def code(F, B, x): t_0 = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) t_1 = x / math.tan(B) t_2 = (-1.0 / B) - t_1 tmp = 0 if F <= -0.22: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.15e-227: tmp = t_0 elif F <= 1.3e-137: tmp = t_2 elif F <= 6.8e-6: tmp = t_0 elif F <= 4.5e+201: tmp = (1.0 / B) - t_1 elif F <= 8.5e+290: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) t_2 = Float64(Float64(-1.0 / B) - t_1) tmp = 0.0 if (F <= -0.22) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.15e-227) tmp = t_0; elseif (F <= 1.3e-137) tmp = t_2; elseif (F <= 6.8e-6) tmp = t_0; elseif (F <= 4.5e+201) tmp = Float64(Float64(1.0 / B) - t_1); elseif (F <= 8.5e+290) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = t_2; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); t_1 = x / tan(B); t_2 = (-1.0 / B) - t_1; tmp = 0.0; if (F <= -0.22) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.15e-227) tmp = t_0; elseif (F <= 1.3e-137) tmp = t_2; elseif (F <= 6.8e-6) tmp = t_0; elseif (F <= 4.5e+201) tmp = (1.0 / B) - t_1; elseif (F <= 8.5e+290) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[F, -0.22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-227], t$95$0, If[LessEqual[F, 1.3e-137], t$95$2, If[LessEqual[F, 6.8e-6], t$95$0, If[LessEqual[F, 4.5e+201], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 8.5e+290], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
t_2 := \frac{-1}{B} - t_1\\
\mathbf{if}\;F \leq -0.22:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-227}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;F \leq 6.8 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{+201}:\\
\;\;\;\;\frac{1}{B} - t_1\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+290}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if F < -0.220000000000000001Initial program 54.0%
Simplified71.3%
Taylor expanded in x around 0 71.3%
associate-*l/71.3%
*-lft-identity71.3%
+-commutative71.3%
unpow271.3%
fma-udef71.3%
Simplified71.3%
Taylor expanded in F around -inf 99.3%
Taylor expanded in B around 0 80.4%
if -0.220000000000000001 < F < -1.15000000000000006e-227 or 1.3e-137 < F < 6.80000000000000012e-6Initial program 99.5%
Taylor expanded in B around 0 86.9%
Taylor expanded in B around 0 64.0%
Taylor expanded in F around 0 64.0%
*-commutative64.0%
Simplified64.0%
if -1.15000000000000006e-227 < F < 1.3e-137 or 8.50000000000000061e290 < F Initial program 96.8%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around -inf 34.6%
Taylor expanded in B around 0 57.7%
if 6.80000000000000012e-6 < F < 4.5000000000000001e201Initial program 79.7%
Simplified93.1%
Taylor expanded in F around inf 99.5%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 82.4%
if 4.5000000000000001e201 < F < 8.50000000000000061e290Initial program 21.6%
Taylor expanded in B around 0 8.9%
Taylor expanded in F around inf 87.6%
Final simplification73.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (- (/ -1.0 B) t_0)))
(if (<= F -215000000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -8.2e-228)
(- (* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 4.2e-137)
t_1
(if (<= F 6.2e-5)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) (/ x B))
(if (<= F 1.15e+204)
(- (/ 1.0 B) t_0)
(if (<= F 8.5e+290) (- (/ 1.0 (sin B)) (/ x B)) t_1))))))))
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 <= -215000000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -8.2e-228) {
tmp = (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.2e-137) {
tmp = t_1;
} else if (F <= 6.2e-5) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 1.15e+204) {
tmp = (1.0 / B) - t_0;
} else if (F <= 8.5e+290) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = ((-1.0d0) / b) - t_0
if (f <= (-215000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-8.2d-228)) then
tmp = ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 4.2d-137) then
tmp = t_1
else if (f <= 6.2d-5) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - (x / b)
else if (f <= 1.15d+204) then
tmp = (1.0d0 / b) - t_0
else if (f <= 8.5d+290) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = t_1
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 <= -215000000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -8.2e-228) {
tmp = (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 4.2e-137) {
tmp = t_1;
} else if (F <= 6.2e-5) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B);
} else if (F <= 1.15e+204) {
tmp = (1.0 / B) - t_0;
} else if (F <= 8.5e+290) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = t_1;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = (-1.0 / B) - t_0 tmp = 0 if F <= -215000000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -8.2e-228: tmp = (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 4.2e-137: tmp = t_1 elif F <= 6.2e-5: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B) elif F <= 1.15e+204: tmp = (1.0 / B) - t_0 elif F <= 8.5e+290: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = t_1 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 <= -215000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -8.2e-228) tmp = Float64(Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 4.2e-137) tmp = t_1; elseif (F <= 6.2e-5) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - Float64(x / B)); elseif (F <= 1.15e+204) tmp = Float64(Float64(1.0 / B) - t_0); elseif (F <= 8.5e+290) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = t_1; 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 <= -215000000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -8.2e-228) tmp = ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 4.2e-137) tmp = t_1; elseif (F <= 6.2e-5) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - (x / B); elseif (F <= 1.15e+204) tmp = (1.0 / B) - t_0; elseif (F <= 8.5e+290) tmp = (1.0 / sin(B)) - (x / B); else tmp = t_1; 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, -215000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -8.2e-228], N[(N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-137], t$95$1, If[LessEqual[F, 6.2e-5], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.15e+204], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 8.5e+290], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := \frac{-1}{B} - t_0\\
\mathbf{if}\;F \leq -215000000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -8.2 \cdot 10^{-228}:\\
\;\;\;\;{\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 6.2 \cdot 10^{-5}:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{+204}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{+290}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if F < -2.15e8Initial program 52.8%
Simplified70.6%
Taylor expanded in x around 0 70.6%
associate-*l/70.6%
*-lft-identity70.6%
+-commutative70.6%
unpow270.6%
fma-udef70.6%
Simplified70.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 80.5%
if -2.15e8 < F < -8.19999999999999995e-228Initial program 99.6%
Taylor expanded in B around 0 86.0%
Taylor expanded in B around 0 63.9%
if -8.19999999999999995e-228 < F < 4.19999999999999983e-137 or 8.50000000000000061e290 < F Initial program 96.8%
Simplified99.6%
Taylor expanded in x around 0 99.5%
associate-*l/99.6%
*-lft-identity99.6%
+-commutative99.6%
unpow299.6%
fma-udef99.6%
Simplified99.6%
Taylor expanded in F around -inf 34.6%
Taylor expanded in B around 0 57.7%
if 4.19999999999999983e-137 < F < 6.20000000000000027e-5Initial program 99.5%
Taylor expanded in B around 0 90.2%
Taylor expanded in B around 0 67.6%
Taylor expanded in F around 0 67.6%
*-commutative67.6%
Simplified67.6%
if 6.20000000000000027e-5 < F < 1.14999999999999995e204Initial program 79.7%
Simplified93.1%
Taylor expanded in F around inf 99.5%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 82.4%
if 1.14999999999999995e204 < F < 8.50000000000000061e290Initial program 21.6%
Taylor expanded in B around 0 8.9%
Taylor expanded in F around inf 87.6%
Final simplification74.0%
(FPCore (F B x) :precision binary64 (if (or (<= x -4.6e-113) (not (<= x 1.08e-99))) (- (/ -1.0 B) (/ x (tan B))) (- (/ -1.0 (sin B)) (/ x B))))
double code(double F, double B, double x) {
double tmp;
if ((x <= -4.6e-113) || !(x <= 1.08e-99)) {
tmp = (-1.0 / B) - (x / tan(B));
} else {
tmp = (-1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-4.6d-113)) .or. (.not. (x <= 1.08d-99))) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else
tmp = ((-1.0d0) / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -4.6e-113) || !(x <= 1.08e-99)) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = (-1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -4.6e-113) or not (x <= 1.08e-99): tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = (-1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -4.6e-113) || !(x <= 1.08e-99)) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); else tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -4.6e-113) || ~((x <= 1.08e-99))) tmp = (-1.0 / B) - (x / tan(B)); else tmp = (-1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -4.6e-113], N[Not[LessEqual[x, 1.08e-99]], $MachinePrecision]], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{-113} \lor \neg \left(x \leq 1.08 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if x < -4.60000000000000016e-113 or 1.08000000000000006e-99 < x Initial program 76.2%
Simplified92.5%
Taylor expanded in x around 0 92.6%
associate-*l/92.5%
*-lft-identity92.5%
+-commutative92.5%
unpow292.5%
fma-udef92.5%
Simplified92.5%
Taylor expanded in F around -inf 74.2%
Taylor expanded in B around 0 78.2%
if -4.60000000000000016e-113 < x < 1.08000000000000006e-99Initial program 68.9%
Simplified71.0%
Taylor expanded in x around 0 70.9%
associate-*l/71.0%
*-lft-identity71.0%
+-commutative71.0%
unpow271.0%
fma-udef71.0%
Simplified71.0%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 34.3%
Final simplification61.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= x -1.2e-135)
(- (/ 1.0 B) t_0)
(if (<= x 1.35e-100) (- (/ -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.2e-135) {
tmp = (1.0 / B) - t_0;
} else if (x <= 1.35e-100) {
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.2d-135)) then
tmp = (1.0d0 / b) - t_0
else if (x <= 1.35d-100) 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.2e-135) {
tmp = (1.0 / B) - t_0;
} else if (x <= 1.35e-100) {
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.2e-135: tmp = (1.0 / B) - t_0 elif x <= 1.35e-100: 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.2e-135) tmp = Float64(Float64(1.0 / B) - t_0); elseif (x <= 1.35e-100) 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.2e-135) tmp = (1.0 / B) - t_0; elseif (x <= 1.35e-100) 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.2e-135], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x, 1.35e-100], 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.2 \cdot 10^{-135}:\\
\;\;\;\;\frac{1}{B} - t_0\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-100}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\end{array}
\end{array}
if x < -1.1999999999999999e-135Initial program 64.2%
Simplified90.0%
Taylor expanded in F around inf 76.1%
associate-/r*76.1%
Simplified76.1%
Taylor expanded in B around 0 75.5%
if -1.1999999999999999e-135 < x < 1.35000000000000008e-100Initial program 70.0%
Simplified72.2%
Taylor expanded in x around 0 72.1%
associate-*l/72.2%
*-lft-identity72.2%
+-commutative72.2%
unpow272.2%
fma-udef72.2%
Simplified72.2%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 34.3%
if 1.35000000000000008e-100 < x Initial program 83.9%
Simplified92.6%
Taylor expanded in x around 0 92.7%
associate-*l/92.6%
*-lft-identity92.6%
+-commutative92.6%
unpow292.6%
fma-udef92.6%
Simplified92.6%
Taylor expanded in F around -inf 76.9%
Taylor expanded in B around 0 82.2%
Final simplification63.1%
(FPCore (F B x) :precision binary64 (- (/ -1.0 B) (/ x (tan B))))
double code(double F, double B, double x) {
return (-1.0 / B) - (x / tan(B));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = ((-1.0d0) / b) - (x / tan(b))
end function
public static double code(double F, double B, double x) {
return (-1.0 / B) - (x / Math.tan(B));
}
def code(F, B, x): return (-1.0 / B) - (x / math.tan(B))
function code(F, B, x) return Float64(Float64(-1.0 / B) - Float64(x / tan(B))) end
function tmp = code(F, B, x) tmp = (-1.0 / B) - (x / tan(B)); end
code[F_, B_, x_] := N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B} - \frac{x}{\tan B}
\end{array}
Initial program 73.5%
Simplified84.6%
Taylor expanded in x around 0 84.5%
associate-*l/84.6%
*-lft-identity84.6%
+-commutative84.6%
unpow284.6%
fma-udef84.6%
Simplified84.6%
Taylor expanded in F around -inf 59.4%
Taylor expanded in B around 0 56.6%
Final simplification56.6%
(FPCore (F B x)
:precision binary64
(if (<= F -7.8e-124)
(+ (* 0.3333333333333333 (* B x)) (/ (- -1.0 x) B))
(if (<= F 2.2e-23)
(/ (- x) B)
(-
(+ (/ 1.0 B) (* B (+ 0.16666666666666666 (* x 0.3333333333333333))))
(/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else if (F <= 2.2e-23) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)))) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.8d-124)) then
tmp = (0.3333333333333333d0 * (b * x)) + (((-1.0d0) - x) / b)
else if (f <= 2.2d-23) then
tmp = -x / b
else
tmp = ((1.0d0 / b) + (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0)))) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else if (F <= 2.2e-23) {
tmp = -x / B;
} else {
tmp = ((1.0 / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)))) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.8e-124: tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B) elif F <= 2.2e-23: tmp = -x / B else: tmp = ((1.0 / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)))) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.8e-124) tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 2.2e-23) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(Float64(1.0 / B) + Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333)))) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.8e-124) tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B); elseif (F <= 2.2e-23) tmp = -x / B; else tmp = ((1.0 / B) + (B * (0.16666666666666666 + (x * 0.3333333333333333)))) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.8e-124], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-23], N[((-x) / B), $MachinePrecision], N[(N[(N[(1.0 / B), $MachinePrecision] + N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.8 \cdot 10^{-124}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-23}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{B} + B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right)\right) - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999986e-124Initial program 64.3%
Taylor expanded in F around -inf 86.2%
Taylor expanded in B around 0 68.7%
Taylor expanded in B around 0 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
Simplified53.0%
if -7.79999999999999986e-124 < F < 2.1999999999999999e-23Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 16.4%
associate-/r*16.4%
Simplified16.4%
Taylor expanded in B around 0 19.9%
Taylor expanded in x around inf 45.8%
associate-*r/45.8%
neg-mul-145.8%
Simplified45.8%
if 2.1999999999999999e-23 < F Initial program 61.5%
Simplified79.8%
Taylor expanded in F around inf 94.9%
associate-/r*94.9%
Simplified94.9%
Taylor expanded in B around 0 50.0%
Final simplification50.0%
(FPCore (F B x)
:precision binary64
(if (or (<= x -3e-81)
(not (or (<= x 5.8e-169) (and (not (<= x 6.6e-64)) (<= x 7.6e-22)))))
(/ (- x) B)
(/ -1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3e-81) || !((x <= 5.8e-169) || (!(x <= 6.6e-64) && (x <= 7.6e-22)))) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-3d-81)) .or. (.not. (x <= 5.8d-169) .or. (.not. (x <= 6.6d-64)) .and. (x <= 7.6d-22))) then
tmp = -x / b
else
tmp = (-1.0d0) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3e-81) || !((x <= 5.8e-169) || (!(x <= 6.6e-64) && (x <= 7.6e-22)))) {
tmp = -x / B;
} else {
tmp = -1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3e-81) or not ((x <= 5.8e-169) or (not (x <= 6.6e-64) and (x <= 7.6e-22))): tmp = -x / B else: tmp = -1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3e-81) || !((x <= 5.8e-169) || (!(x <= 6.6e-64) && (x <= 7.6e-22)))) tmp = Float64(Float64(-x) / B); else tmp = Float64(-1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3e-81) || ~(((x <= 5.8e-169) || (~((x <= 6.6e-64)) && (x <= 7.6e-22))))) tmp = -x / B; else tmp = -1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3e-81], N[Not[Or[LessEqual[x, 5.8e-169], And[N[Not[LessEqual[x, 6.6e-64]], $MachinePrecision], LessEqual[x, 7.6e-22]]]], $MachinePrecision]], N[((-x) / B), $MachinePrecision], N[(-1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{-81} \lor \neg \left(x \leq 5.8 \cdot 10^{-169} \lor \neg \left(x \leq 6.6 \cdot 10^{-64}\right) \land x \leq 7.6 \cdot 10^{-22}\right):\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B}\\
\end{array}
\end{array}
if x < -2.9999999999999999e-81 or 5.80000000000000038e-169 < x < 6.5999999999999999e-64 or 7.60000000000000046e-22 < x Initial program 77.8%
Simplified92.7%
Taylor expanded in F around inf 65.7%
associate-/r*65.7%
Simplified65.7%
Taylor expanded in B around 0 41.7%
Taylor expanded in x around inf 50.2%
associate-*r/50.2%
neg-mul-150.2%
Simplified50.2%
if -2.9999999999999999e-81 < x < 5.80000000000000038e-169 or 6.5999999999999999e-64 < x < 7.60000000000000046e-22Initial program 66.0%
Taylor expanded in F around -inf 34.3%
Taylor expanded in B around 0 27.8%
Taylor expanded in x around 0 25.7%
Final simplification41.3%
(FPCore (F B x)
:precision binary64
(if (<= F -7.8e-124)
(+ (* 0.3333333333333333 (* B x)) (/ (- -1.0 x) B))
(if (<= F 8.3e-23)
(/ (- x) B)
(+
(* B (+ 0.16666666666666666 (* x 0.3333333333333333)))
(/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else if (F <= 8.3e-23) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.8d-124)) then
tmp = (0.3333333333333333d0 * (b * x)) + (((-1.0d0) - x) / b)
else if (f <= 8.3d-23) then
tmp = -x / b
else
tmp = (b * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else if (F <= 8.3e-23) {
tmp = -x / B;
} else {
tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.8e-124: tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B) elif F <= 8.3e-23: tmp = -x / B else: tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.8e-124) tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 8.3e-23) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(B * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.8e-124) tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B); elseif (F <= 8.3e-23) tmp = -x / B; else tmp = (B * (0.16666666666666666 + (x * 0.3333333333333333))) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.8e-124], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.3e-23], N[((-x) / B), $MachinePrecision], N[(N[(B * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.8 \cdot 10^{-124}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.3 \cdot 10^{-23}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;B \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999986e-124Initial program 64.3%
Taylor expanded in F around -inf 86.2%
Taylor expanded in B around 0 68.7%
Taylor expanded in B around 0 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
Simplified53.0%
if -7.79999999999999986e-124 < F < 8.29999999999999986e-23Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 16.4%
associate-/r*16.4%
Simplified16.4%
Taylor expanded in B around 0 19.9%
Taylor expanded in x around inf 45.8%
associate-*r/45.8%
neg-mul-145.8%
Simplified45.8%
if 8.29999999999999986e-23 < F Initial program 61.5%
Simplified79.8%
Taylor expanded in F around inf 94.9%
associate-/r*94.9%
Simplified94.9%
Taylor expanded in B around 0 50.0%
associate--l+50.0%
*-commutative50.0%
div-sub49.9%
Simplified49.9%
Final simplification50.0%
(FPCore (F B x) :precision binary64 (if (<= F -7.8e-124) (+ (* 0.3333333333333333 (* B x)) (/ (- -1.0 x) B)) (if (<= F 4e-26) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else if (F <= 4e-26) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.8d-124)) then
tmp = (0.3333333333333333d0 * (b * x)) + (((-1.0d0) - x) / b)
else if (f <= 4d-26) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B);
} else if (F <= 4e-26) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.8e-124: tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B) elif F <= 4e-26: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.8e-124) tmp = Float64(Float64(0.3333333333333333 * Float64(B * x)) + Float64(Float64(-1.0 - x) / B)); elseif (F <= 4e-26) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.8e-124) tmp = (0.3333333333333333 * (B * x)) + ((-1.0 - x) / B); elseif (F <= 4e-26) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.8e-124], N[(N[(0.3333333333333333 * N[(B * x), $MachinePrecision]), $MachinePrecision] + N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-26], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.8 \cdot 10^{-124}:\\
\;\;\;\;0.3333333333333333 \cdot \left(B \cdot x\right) + \frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-26}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999986e-124Initial program 64.3%
Taylor expanded in F around -inf 86.2%
Taylor expanded in B around 0 68.7%
Taylor expanded in B around 0 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
Simplified53.0%
if -7.79999999999999986e-124 < F < 4.0000000000000002e-26Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 16.4%
associate-/r*16.4%
Simplified16.4%
Taylor expanded in B around 0 19.9%
Taylor expanded in x around inf 45.8%
associate-*r/45.8%
neg-mul-145.8%
Simplified45.8%
if 4.0000000000000002e-26 < F Initial program 61.5%
Simplified79.8%
Taylor expanded in F around inf 94.9%
associate-/r*94.9%
Simplified94.9%
Taylor expanded in B around 0 49.4%
Final simplification49.8%
(FPCore (F B x) :precision binary64 (if (<= F -5e+174) (/ -1.0 B) (if (<= F 9.2e-26) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5e+174) {
tmp = -1.0 / B;
} else if (F <= 9.2e-26) {
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 <= (-5d+174)) then
tmp = (-1.0d0) / b
else if (f <= 9.2d-26) 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 <= -5e+174) {
tmp = -1.0 / B;
} else if (F <= 9.2e-26) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5e+174: tmp = -1.0 / B elif F <= 9.2e-26: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5e+174) tmp = Float64(-1.0 / B); elseif (F <= 9.2e-26) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5e+174) tmp = -1.0 / B; elseif (F <= 9.2e-26) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5e+174], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 9.2e-26], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5 \cdot 10^{+174}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 9.2 \cdot 10^{-26}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.9999999999999997e174Initial program 24.0%
Taylor expanded in F around -inf 99.7%
Taylor expanded in B around 0 75.3%
Taylor expanded in x around 0 35.1%
if -4.9999999999999997e174 < F < 9.20000000000000035e-26Initial program 93.9%
Simplified98.7%
Taylor expanded in F around inf 29.4%
associate-/r*29.4%
Simplified29.4%
Taylor expanded in B around 0 26.4%
Taylor expanded in x around inf 40.0%
associate-*r/40.0%
neg-mul-140.0%
Simplified40.0%
if 9.20000000000000035e-26 < F Initial program 61.5%
Simplified79.8%
Taylor expanded in F around inf 94.9%
associate-/r*94.9%
Simplified94.9%
Taylor expanded in B around 0 49.4%
Final simplification42.1%
(FPCore (F B x) :precision binary64 (if (<= F -7.8e-124) (/ (- -1.0 x) B) (if (<= F 1.15e-26) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e-26) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.8d-124)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.15d-26) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.8e-124) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e-26) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.8e-124: tmp = (-1.0 - x) / B elif F <= 1.15e-26: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.8e-124) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.15e-26) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.8e-124) tmp = (-1.0 - x) / B; elseif (F <= 1.15e-26) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.8e-124], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.15e-26], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.8 \cdot 10^{-124}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-26}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.79999999999999986e-124Initial program 64.3%
Taylor expanded in F around -inf 86.2%
Taylor expanded in B around 0 52.4%
associate-*r/52.4%
distribute-lft-in52.4%
metadata-eval52.4%
neg-mul-152.4%
Simplified52.4%
if -7.79999999999999986e-124 < F < 1.15000000000000004e-26Initial program 99.5%
Simplified99.6%
Taylor expanded in F around inf 16.4%
associate-/r*16.4%
Simplified16.4%
Taylor expanded in B around 0 19.9%
Taylor expanded in x around inf 45.8%
associate-*r/45.8%
neg-mul-145.8%
Simplified45.8%
if 1.15000000000000004e-26 < F Initial program 61.5%
Simplified79.8%
Taylor expanded in F around inf 94.9%
associate-/r*94.9%
Simplified94.9%
Taylor expanded in B around 0 49.4%
Final simplification49.6%
(FPCore (F B x) :precision binary64 (if (<= F 2.15e-57) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 2.15e-57) {
tmp = -1.0 / 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.15d-57) then
tmp = (-1.0d0) / 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.15e-57) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 2.15e-57: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 2.15e-57) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 2.15e-57) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 2.15e-57], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 2.15 \cdot 10^{-57}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 2.15000000000000011e-57Initial program 77.8%
Taylor expanded in F around -inf 63.3%
Taylor expanded in B around 0 58.9%
Taylor expanded in x around 0 18.1%
if 2.15000000000000011e-57 < F Initial program 64.7%
Simplified81.4%
Taylor expanded in F around inf 89.8%
associate-/r*89.8%
Simplified89.8%
Taylor expanded in B around 0 46.8%
Taylor expanded in x around 0 20.8%
Final simplification19.0%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 73.5%
Taylor expanded in F around -inf 59.4%
Taylor expanded in B around 0 56.6%
Taylor expanded in x around 0 13.0%
Final simplification13.0%
herbie shell --seed 2024018
(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))))))