
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.5e+47)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 28000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ (* x (cos B)) (sin B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.5e+47) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 28000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * cos(B)) / sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.5d+47)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 28000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - ((x * cos(b)) / sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.5e+47) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 28000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * Math.cos(B)) / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.5e+47: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 28000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - ((x * math.cos(B)) / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5e+47) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 28000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(Float64(x * cos(B)) / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.5e+47) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 28000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - ((x * cos(B)) / sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5e+47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 28000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 28000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x \cdot \cos B}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.5000000000000001e47Initial program 55.3%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u40.8%
expm1-udef40.8%
div-inv40.8%
neg-mul-140.8%
fma-def40.8%
Applied egg-rr40.8%
expm1-def40.8%
expm1-log1p99.7%
rem-log-exp43.0%
fma-udef43.0%
neg-mul-143.0%
prod-exp40.9%
*-commutative40.9%
prod-exp43.0%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -1.5000000000000001e47 < F < 2.8e7Initial program 99.4%
Taylor expanded in x around 0 99.6%
if 2.8e7 < F Initial program 65.4%
Taylor expanded in F around inf 99.7%
expm1-log1p-u39.3%
expm1-udef39.3%
+-commutative39.3%
div-inv39.3%
Applied egg-rr39.3%
expm1-def39.3%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.25e+49)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 115000000.0)
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(* (cos B) (/ x (sin B))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.25e+49) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 115000000.0) {
tmp = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (cos(B) * (x / sin(B)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.25d+49)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 115000000.0d0) then
tmp = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (cos(b) * (x / sin(b)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.25e+49) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 115000000.0) {
tmp = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (Math.cos(B) * (x / Math.sin(B)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.25e+49: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 115000000.0: tmp = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (math.cos(B) * (x / math.sin(B))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.25e+49) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 115000000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(cos(B) * Float64(x / sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.25e+49) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 115000000.0) tmp = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (cos(B) * (x / sin(B))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.25e+49], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 115000000.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(N[Cos[B], $MachinePrecision] * N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.25 \cdot 10^{+49}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 115000000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \cos B \cdot \frac{x}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.2500000000000001e49Initial program 55.3%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u40.8%
expm1-udef40.8%
div-inv40.8%
neg-mul-140.8%
fma-def40.8%
Applied egg-rr40.8%
expm1-def40.8%
expm1-log1p99.7%
rem-log-exp43.0%
fma-udef43.0%
neg-mul-143.0%
prod-exp40.9%
*-commutative40.9%
prod-exp43.0%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -1.2500000000000001e49 < F < 1.15e8Initial program 99.4%
Taylor expanded in x around 0 99.6%
associate-*r/99.5%
Simplified99.5%
if 1.15e8 < F Initial program 65.4%
Taylor expanded in F around inf 99.7%
expm1-log1p-u39.3%
expm1-udef39.3%
+-commutative39.3%
div-inv39.3%
Applied egg-rr39.3%
expm1-def39.3%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4e+22)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 90000000.0)
(+ (* x (/ -1.0 (tan B))) (/ F (* (sin B) (sqrt (+ (* F F) 2.0)))))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4e+22) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 90000000.0) {
tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt(((F * F) + 2.0))));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d+22)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 90000000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + (f / (sin(b) * sqrt(((f * f) + 2.0d0))))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4e+22) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 90000000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (F / (Math.sin(B) * Math.sqrt(((F * F) + 2.0))));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4e+22: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 90000000.0: tmp = (x * (-1.0 / math.tan(B))) + (F / (math.sin(B) * math.sqrt(((F * F) + 2.0)))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4e+22) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 90000000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(F / Float64(sin(B) * sqrt(Float64(Float64(F * F) + 2.0))))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4e+22) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 90000000.0) tmp = (x * (-1.0 / tan(B))) + (F / (sin(B) * sqrt(((F * F) + 2.0)))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4e+22], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 90000000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{+22}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 90000000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B \cdot \sqrt{F \cdot F + 2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.4e22Initial program 58.3%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u38.0%
expm1-udef38.0%
div-inv38.0%
neg-mul-138.0%
fma-def38.0%
Applied egg-rr38.0%
expm1-def38.0%
expm1-log1p99.7%
rem-log-exp45.2%
fma-udef45.2%
neg-mul-145.2%
prod-exp43.3%
*-commutative43.3%
prod-exp45.2%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -1.4e22 < F < 9e7Initial program 99.4%
associate-*l/99.4%
+-commutative99.4%
*-commutative99.4%
fma-udef99.4%
fma-def99.4%
metadata-eval99.4%
metadata-eval99.4%
fma-def99.4%
fma-udef99.4%
*-commutative99.4%
fma-def99.4%
fma-def99.4%
Applied egg-rr99.4%
add-sqr-sqrt99.4%
unpow-prod-down99.3%
Applied egg-rr99.3%
pow-sqr99.3%
metadata-eval99.3%
unpow-199.3%
fma-udef99.3%
fma-udef99.3%
unpow299.3%
+-commutative99.3%
associate-+r+99.3%
+-commutative99.3%
+-commutative99.3%
unpow299.3%
fma-def99.3%
+-commutative99.3%
fma-def99.3%
Simplified99.3%
expm1-log1p-u88.9%
expm1-udef68.1%
un-div-inv68.1%
Applied egg-rr68.1%
expm1-def89.0%
expm1-log1p99.5%
associate-/l/99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
+-commutative99.4%
unpow299.4%
Simplified99.4%
if 9e7 < F Initial program 65.4%
Taylor expanded in F around inf 99.7%
expm1-log1p-u39.3%
expm1-udef39.3%
+-commutative39.3%
div-inv39.3%
Applied egg-rr39.3%
expm1-def39.3%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.4)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.4d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.4) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.4: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.4) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.4) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.4], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.4:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 59.6%
Taylor expanded in F around -inf 98.4%
expm1-log1p-u38.8%
expm1-udef38.8%
div-inv38.8%
neg-mul-138.8%
fma-def38.8%
Applied egg-rr38.8%
expm1-def38.8%
expm1-log1p98.5%
rem-log-exp45.5%
fma-udef45.5%
neg-mul-145.5%
prod-exp43.5%
*-commutative43.5%
prod-exp45.5%
rem-log-exp98.5%
unsub-neg98.5%
Simplified98.5%
if -1.3999999999999999 < F < 1.3999999999999999Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.5%
Taylor expanded in F around 0 99.0%
Taylor expanded in x around 0 99.1%
if 1.3999999999999999 < F Initial program 66.3%
Taylor expanded in F around inf 98.5%
expm1-log1p-u38.9%
expm1-udef38.9%
+-commutative38.9%
div-inv38.9%
Applied egg-rr38.9%
expm1-def38.9%
expm1-log1p98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification98.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -1.5e+47)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3.6e-181)
t_0
(if (<= F 2.9e-45)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_1)
(if (<= F 2200000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.5e+47) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3.6e-181) {
tmp = t_0;
} else if (F <= 2.9e-45) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1;
} else if (F <= 2200000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * ((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-1.5d+47)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3.6d-181)) then
tmp = t_0
else if (f <= 2.9d-45) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_1
else if (f <= 2200000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.5e+47) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3.6e-181) {
tmp = t_0;
} else if (F <= 2.9e-45) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1;
} else if (F <= 2200000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -1.5e+47: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3.6e-181: tmp = t_0 elif F <= 2.9e-45: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1 elif F <= 2200000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.5e+47) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3.6e-181) tmp = t_0; elseif (F <= 2.9e-45) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_1); elseif (F <= 2200000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * ((((F * F) + 2.0) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.5e+47) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3.6e-181) tmp = t_0; elseif (F <= 2.9e-45) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1; elseif (F <= 2200000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.5e+47], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.6e-181], t$95$0, If[LessEqual[F, 2.9e-45], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 2200000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.5 \cdot 10^{+47}:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-181}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-45}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_1\\
\mathbf{elif}\;F \leq 2200000:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -1.5000000000000001e47Initial program 55.3%
Taylor expanded in F around -inf 99.6%
expm1-log1p-u40.8%
expm1-udef40.8%
div-inv40.8%
neg-mul-140.8%
fma-def40.8%
Applied egg-rr40.8%
expm1-def40.8%
expm1-log1p99.7%
rem-log-exp43.0%
fma-udef43.0%
neg-mul-143.0%
prod-exp40.9%
*-commutative40.9%
prod-exp43.0%
rem-log-exp99.7%
unsub-neg99.7%
Simplified99.7%
if -1.5000000000000001e47 < F < -3.5999999999999999e-181 or 2.9e-45 < F < 2.2e6Initial program 99.4%
Taylor expanded in B around 0 93.8%
if -3.5999999999999999e-181 < F < 2.9e-45Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.4%
associate-*r/99.4%
*-commutative99.4%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 89.0%
if 2.2e6 < F Initial program 65.4%
Taylor expanded in F around inf 99.7%
expm1-log1p-u39.3%
expm1-udef39.3%
+-commutative39.3%
div-inv39.3%
Applied egg-rr39.3%
expm1-def39.3%
expm1-log1p99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification95.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))) (t_1 (/ x (tan B))))
(if (<= F -0.021)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3e-54)
t_0
(if (<= F 3e-37)
(- (* (/ F B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) t_1)
(if (<= F 0.001) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double t_1 = x / tan(B);
double tmp;
if (F <= -0.021) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3e-54) {
tmp = t_0;
} else if (F <= 3e-37) {
tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1;
} else if (F <= 0.001) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
t_1 = x / tan(b)
if (f <= (-0.021d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3d-54)) then
tmp = t_0
else if (f <= 3d-37) then
tmp = ((f / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - t_1
else if (f <= 0.001d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.021) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3e-54) {
tmp = t_0;
} else if (F <= 3e-37) {
tmp = ((F / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1;
} else if (F <= 0.001) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) t_1 = x / math.tan(B) tmp = 0 if F <= -0.021: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3e-54: tmp = t_0 elif F <= 3e-37: tmp = ((F / B) * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1 elif F <= 0.001: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.021) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3e-54) tmp = t_0; elseif (F <= 3e-37) tmp = Float64(Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - t_1); elseif (F <= 0.001) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.021) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3e-54) tmp = t_0; elseif (F <= 3e-37) tmp = ((F / B) * sqrt((1.0 / (2.0 + (x * 2.0))))) - t_1; elseif (F <= 0.001) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.021], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3e-54], t$95$0, If[LessEqual[F, 3e-37], N[(N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.001], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.021:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-37}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - t_1\\
\mathbf{elif}\;F \leq 0.001:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.0210000000000000013Initial program 59.6%
Taylor expanded in F around -inf 98.4%
expm1-log1p-u38.8%
expm1-udef38.8%
div-inv38.8%
neg-mul-138.8%
fma-def38.8%
Applied egg-rr38.8%
expm1-def38.8%
expm1-log1p98.5%
rem-log-exp45.5%
fma-udef45.5%
neg-mul-145.5%
prod-exp43.5%
*-commutative43.5%
prod-exp45.5%
rem-log-exp98.5%
unsub-neg98.5%
Simplified98.5%
if -0.0210000000000000013 < F < -3.00000000000000009e-54 or 3e-37 < F < 1e-3Initial program 98.9%
+-commutative98.9%
unsub-neg98.9%
associate-*l/98.8%
associate-*r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in F around 0 96.3%
Taylor expanded in x around 0 96.3%
Taylor expanded in F around inf 90.5%
*-commutative90.5%
associate-*r/91.0%
Simplified91.0%
if -3.00000000000000009e-54 < F < 3e-37Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in B around 0 87.8%
if 1e-3 < F Initial program 66.3%
Taylor expanded in F around inf 98.5%
expm1-log1p-u38.9%
expm1-udef38.9%
+-commutative38.9%
div-inv38.9%
Applied egg-rr38.9%
expm1-def38.9%
expm1-log1p98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))) (t_1 (/ x (tan B))))
(if (<= F -0.0037)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.9e-54)
t_0
(if (<= F -2.8e-201)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 2e-44)
(/ (* x (- (cos B))) (sin B))
(if (<= F 9e-5) t_0 (- (/ 1.0 (sin B)) t_1))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0037) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.9e-54) {
tmp = t_0;
} else if (F <= -2.8e-201) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2e-44) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 9e-5) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
t_1 = x / tan(b)
if (f <= (-0.0037d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.9d-54)) then
tmp = t_0
else if (f <= (-2.8d-201)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 2d-44) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 9d-5) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0037) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.9e-54) {
tmp = t_0;
} else if (F <= -2.8e-201) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2e-44) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 9e-5) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0037: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.9e-54: tmp = t_0 elif F <= -2.8e-201: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 2e-44: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 9e-5: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0037) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.9e-54) tmp = t_0; elseif (F <= -2.8e-201) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2e-44) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 9e-5) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0037) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.9e-54) tmp = t_0; elseif (F <= -2.8e-201) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 2e-44) tmp = (x * -cos(B)) / sin(B); elseif (F <= 9e-5) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0037], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.9e-54], t$95$0, If[LessEqual[F, -2.8e-201], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-44], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9e-5], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0037:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.9 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-201}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-44}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 9 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.0037000000000000002Initial program 59.6%
Taylor expanded in F around -inf 98.4%
expm1-log1p-u38.8%
expm1-udef38.8%
div-inv38.8%
neg-mul-138.8%
fma-def38.8%
Applied egg-rr38.8%
expm1-def38.8%
expm1-log1p98.5%
rem-log-exp45.5%
fma-udef45.5%
neg-mul-145.5%
prod-exp43.5%
*-commutative43.5%
prod-exp45.5%
rem-log-exp98.5%
unsub-neg98.5%
Simplified98.5%
if -0.0037000000000000002 < F < -4.90000000000000021e-54 or 1.99999999999999991e-44 < F < 9.00000000000000057e-5Initial program 98.9%
+-commutative98.9%
unsub-neg98.9%
associate-*l/98.8%
associate-*r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in F around 0 96.3%
Taylor expanded in x around 0 96.3%
Taylor expanded in F around inf 90.5%
*-commutative90.5%
associate-*r/91.0%
Simplified91.0%
if -4.90000000000000021e-54 < F < -2.7999999999999999e-201Initial program 99.7%
Taylor expanded in B around 0 92.9%
Taylor expanded in B around 0 79.3%
if -2.7999999999999999e-201 < F < 1.99999999999999991e-44Initial program 99.4%
Taylor expanded in F around inf 37.6%
Taylor expanded in x around inf 82.0%
associate-*r/82.0%
*-commutative82.0%
associate-*r*82.0%
neg-mul-182.0%
Simplified82.0%
if 9.00000000000000057e-5 < F Initial program 66.3%
Taylor expanded in F around inf 98.5%
expm1-log1p-u38.9%
expm1-udef38.9%
+-commutative38.9%
div-inv38.9%
Applied egg-rr38.9%
expm1-def38.9%
expm1-log1p98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification91.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))))
(if (<= F -0.017)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.5e-54)
t_0
(if (<= F -2e-203)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 5e-64)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (<= F 0.03) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double tmp;
if (F <= -0.017) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.5e-54) {
tmp = t_0;
} else if (F <= -2e-203) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 5e-64) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 0.03) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
if (f <= (-0.017d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.5d-54)) then
tmp = t_0
else if (f <= (-2d-203)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 5d-64) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if (f <= 0.03d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double tmp;
if (F <= -0.017) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.5e-54) {
tmp = t_0;
} else if (F <= -2e-203) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 5e-64) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if (F <= 0.03) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) tmp = 0 if F <= -0.017: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.5e-54: tmp = t_0 elif F <= -2e-203: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 5e-64: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif F <= 0.03: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) tmp = 0.0 if (F <= -0.017) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.5e-54) tmp = t_0; elseif (F <= -2e-203) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 5e-64) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif (F <= 0.03) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); tmp = 0.0; if (F <= -0.017) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.5e-54) tmp = t_0; elseif (F <= -2e-203) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 5e-64) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif (F <= 0.03) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.017], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.5e-54], t$95$0, If[LessEqual[F, -2e-203], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5e-64], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.03], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -0.017:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2 \cdot 10^{-203}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-64}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 0.03:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.017000000000000001Initial program 59.6%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around -inf 73.3%
mul-1-neg73.3%
+-commutative73.3%
distribute-neg-in73.3%
unsub-neg73.3%
distribute-neg-frac73.3%
metadata-eval73.3%
Simplified73.3%
if -0.017000000000000001 < F < -3.49999999999999982e-54 or 5.00000000000000033e-64 < F < 0.029999999999999999Initial program 98.9%
+-commutative98.9%
unsub-neg98.9%
associate-*l/99.0%
associate-*r/99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in F around 0 96.9%
Taylor expanded in x around 0 96.9%
Taylor expanded in F around inf 83.1%
*-commutative83.1%
associate-*r/83.5%
Simplified83.5%
if -3.49999999999999982e-54 < F < -2.0000000000000001e-203Initial program 99.7%
Taylor expanded in B around 0 92.9%
Taylor expanded in B around 0 79.3%
if -2.0000000000000001e-203 < F < 5.00000000000000033e-64Initial program 99.4%
Taylor expanded in F around -inf 36.8%
Taylor expanded in B around 0 59.5%
if 0.029999999999999999 < F Initial program 66.3%
Taylor expanded in B around 0 39.9%
Taylor expanded in F around inf 72.3%
Final simplification70.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))))
(if (<= F -0.0155)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.2e-54)
t_0
(if (<= F -1.55e-201)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 5.8e-38)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 0.00029) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double tmp;
if (F <= -0.0155) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.2e-54) {
tmp = t_0;
} else if (F <= -1.55e-201) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 5.8e-38) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 0.00029) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
if (f <= (-0.0155d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.2d-54)) then
tmp = t_0
else if (f <= (-1.55d-201)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 5.8d-38) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 0.00029d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double tmp;
if (F <= -0.0155) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.2e-54) {
tmp = t_0;
} else if (F <= -1.55e-201) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 5.8e-38) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 0.00029) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) tmp = 0 if F <= -0.0155: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.2e-54: tmp = t_0 elif F <= -1.55e-201: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 5.8e-38: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 0.00029: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) tmp = 0.0 if (F <= -0.0155) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.2e-54) tmp = t_0; elseif (F <= -1.55e-201) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 5.8e-38) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 0.00029) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); tmp = 0.0; if (F <= -0.0155) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.2e-54) tmp = t_0; elseif (F <= -1.55e-201) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 5.8e-38) tmp = cos(B) * (-x / sin(B)); elseif (F <= 0.00029) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.2e-54], t$95$0, If[LessEqual[F, -1.55e-201], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.8e-38], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00029], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -0.0155:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.2 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-201}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 5.8 \cdot 10^{-38}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 0.00029:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0155Initial program 59.6%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around -inf 73.3%
mul-1-neg73.3%
+-commutative73.3%
distribute-neg-in73.3%
unsub-neg73.3%
distribute-neg-frac73.3%
metadata-eval73.3%
Simplified73.3%
if -0.0155 < F < -5.20000000000000004e-54 or 5.79999999999999988e-38 < F < 2.9e-4Initial program 98.9%
+-commutative98.9%
unsub-neg98.9%
associate-*l/98.8%
associate-*r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in F around 0 96.3%
Taylor expanded in x around 0 96.3%
Taylor expanded in F around inf 90.5%
*-commutative90.5%
associate-*r/91.0%
Simplified91.0%
if -5.20000000000000004e-54 < F < -1.5499999999999999e-201Initial program 99.7%
Taylor expanded in B around 0 92.9%
Taylor expanded in B around 0 79.3%
if -1.5499999999999999e-201 < F < 5.79999999999999988e-38Initial program 99.4%
Taylor expanded in F around -inf 37.2%
Taylor expanded in x around inf 82.0%
mul-1-neg82.0%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in B around inf 82.0%
associate-/l*81.8%
*-rgt-identity81.8%
associate-*r/81.7%
associate-/r/81.6%
associate-*l/81.9%
*-lft-identity81.9%
Simplified81.9%
if 2.9e-4 < F Initial program 66.3%
Taylor expanded in B around 0 39.9%
Taylor expanded in F around inf 72.3%
Final simplification77.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))))
(if (<= F -0.025)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.3e-54)
t_0
(if (<= F -1.35e-202)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 2.6e-40)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.00058) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double tmp;
if (F <= -0.025) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.3e-54) {
tmp = t_0;
} else if (F <= -1.35e-202) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.6e-40) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.00058) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
if (f <= (-0.025d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.3d-54)) then
tmp = t_0
else if (f <= (-1.35d-202)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 2.6d-40) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.00058d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double tmp;
if (F <= -0.025) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.3e-54) {
tmp = t_0;
} else if (F <= -1.35e-202) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.6e-40) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.00058) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) tmp = 0 if F <= -0.025: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.3e-54: tmp = t_0 elif F <= -1.35e-202: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 2.6e-40: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.00058: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) tmp = 0.0 if (F <= -0.025) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.3e-54) tmp = t_0; elseif (F <= -1.35e-202) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.6e-40) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.00058) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); tmp = 0.0; if (F <= -0.025) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.3e-54) tmp = t_0; elseif (F <= -1.35e-202) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 2.6e-40) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.00058) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.025], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.3e-54], t$95$0, If[LessEqual[F, -1.35e-202], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-40], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00058], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -0.025:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.3 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{-202}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-40}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.00058:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.025000000000000001Initial program 59.6%
Taylor expanded in B around 0 35.3%
Taylor expanded in F around -inf 73.3%
mul-1-neg73.3%
+-commutative73.3%
distribute-neg-in73.3%
unsub-neg73.3%
distribute-neg-frac73.3%
metadata-eval73.3%
Simplified73.3%
if -0.025000000000000001 < F < -3.29999999999999993e-54 or 2.6000000000000001e-40 < F < 5.8e-4Initial program 98.9%
+-commutative98.9%
unsub-neg98.9%
associate-*l/98.8%
associate-*r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in F around 0 96.3%
Taylor expanded in x around 0 96.3%
Taylor expanded in F around inf 90.5%
*-commutative90.5%
associate-*r/91.0%
Simplified91.0%
if -3.29999999999999993e-54 < F < -1.3499999999999999e-202Initial program 99.7%
Taylor expanded in B around 0 92.9%
Taylor expanded in B around 0 79.3%
if -1.3499999999999999e-202 < F < 2.6000000000000001e-40Initial program 99.4%
Taylor expanded in F around inf 37.6%
Taylor expanded in x around inf 82.0%
associate-*r/82.0%
*-commutative82.0%
associate-*r*82.0%
neg-mul-182.0%
Simplified82.0%
if 5.8e-4 < F Initial program 66.3%
Taylor expanded in B around 0 39.9%
Taylor expanded in F around inf 72.3%
Final simplification77.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))))
(if (<= F -0.0095)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F -1.6e-54)
t_0
(if (<= F -2.8e-201)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 2.6e-48)
(/ (* x (- (cos B))) (sin B))
(if (<= F 0.00055) t_0 (- (/ 1.0 (sin B)) (/ x B)))))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double tmp;
if (F <= -0.0095) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= -1.6e-54) {
tmp = t_0;
} else if (F <= -2.8e-201) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.6e-48) {
tmp = (x * -cos(B)) / sin(B);
} else if (F <= 0.00055) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
if (f <= (-0.0095d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= (-1.6d-54)) then
tmp = t_0
else if (f <= (-2.8d-201)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 2.6d-48) then
tmp = (x * -cos(b)) / sin(b)
else if (f <= 0.00055d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double tmp;
if (F <= -0.0095) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= -1.6e-54) {
tmp = t_0;
} else if (F <= -2.8e-201) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.6e-48) {
tmp = (x * -Math.cos(B)) / Math.sin(B);
} else if (F <= 0.00055) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) tmp = 0 if F <= -0.0095: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= -1.6e-54: tmp = t_0 elif F <= -2.8e-201: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 2.6e-48: tmp = (x * -math.cos(B)) / math.sin(B) elif F <= 0.00055: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) tmp = 0.0 if (F <= -0.0095) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= -1.6e-54) tmp = t_0; elseif (F <= -2.8e-201) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.6e-48) tmp = Float64(Float64(x * Float64(-cos(B))) / sin(B)); elseif (F <= 0.00055) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); tmp = 0.0; if (F <= -0.0095) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= -1.6e-54) tmp = t_0; elseif (F <= -2.8e-201) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 2.6e-48) tmp = (x * -cos(B)) / sin(B); elseif (F <= 0.00055) tmp = t_0; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0095], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.6e-54], t$95$0, If[LessEqual[F, -2.8e-201], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.6e-48], N[(N[(x * (-N[Cos[B], $MachinePrecision])), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00055], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{if}\;F \leq -0.0095:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq -1.6 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-201}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-48}:\\
\;\;\;\;\frac{x \cdot \left(-\cos B\right)}{\sin B}\\
\mathbf{elif}\;F \leq 0.00055:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.00949999999999999976Initial program 59.6%
Taylor expanded in F around -inf 98.4%
expm1-log1p-u38.8%
expm1-udef38.8%
div-inv38.8%
neg-mul-138.8%
fma-def38.8%
Applied egg-rr38.8%
expm1-def38.8%
expm1-log1p98.5%
rem-log-exp45.5%
fma-udef45.5%
neg-mul-145.5%
prod-exp43.5%
*-commutative43.5%
prod-exp45.5%
rem-log-exp98.5%
unsub-neg98.5%
Simplified98.5%
if -0.00949999999999999976 < F < -1.59999999999999999e-54 or 2.59999999999999987e-48 < F < 5.50000000000000033e-4Initial program 98.9%
+-commutative98.9%
unsub-neg98.9%
associate-*l/98.8%
associate-*r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in F around 0 96.3%
Taylor expanded in x around 0 96.3%
Taylor expanded in F around inf 90.5%
*-commutative90.5%
associate-*r/91.0%
Simplified91.0%
if -1.59999999999999999e-54 < F < -2.7999999999999999e-201Initial program 99.7%
Taylor expanded in B around 0 92.9%
Taylor expanded in B around 0 79.3%
if -2.7999999999999999e-201 < F < 2.59999999999999987e-48Initial program 99.4%
Taylor expanded in F around inf 37.6%
Taylor expanded in x around inf 82.0%
associate-*r/82.0%
*-commutative82.0%
associate-*r*82.0%
neg-mul-182.0%
Simplified82.0%
if 5.50000000000000033e-4 < F Initial program 66.3%
Taylor expanded in B around 0 39.9%
Taylor expanded in F around inf 72.3%
Final simplification83.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt 0.5) (sin B)))) (t_1 (/ x (tan B))))
(if (<= F -0.0075)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.2e-54)
t_0
(if (<= F 6e-39)
(- (/ (sqrt 0.5) (/ B F)) t_1)
(if (<= F 0.00026) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt(0.5) / sin(B));
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0075) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.2e-54) {
tmp = t_0;
} else if (F <= 6e-39) {
tmp = (sqrt(0.5) / (B / F)) - t_1;
} else if (F <= 0.00026) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f * (sqrt(0.5d0) / sin(b))
t_1 = x / tan(b)
if (f <= (-0.0075d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.2d-54)) then
tmp = t_0
else if (f <= 6d-39) then
tmp = (sqrt(0.5d0) / (b / f)) - t_1
else if (f <= 0.00026d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt(0.5) / Math.sin(B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0075) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.2e-54) {
tmp = t_0;
} else if (F <= 6e-39) {
tmp = (Math.sqrt(0.5) / (B / F)) - t_1;
} else if (F <= 0.00026) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt(0.5) / math.sin(B)) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0075: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.2e-54: tmp = t_0 elif F <= 6e-39: tmp = (math.sqrt(0.5) / (B / F)) - t_1 elif F <= 0.00026: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(0.5) / sin(B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0075) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.2e-54) tmp = t_0; elseif (F <= 6e-39) tmp = Float64(Float64(sqrt(0.5) / Float64(B / F)) - t_1); elseif (F <= 0.00026) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt(0.5) / sin(B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0075) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.2e-54) tmp = t_0; elseif (F <= 6e-39) tmp = (sqrt(0.5) / (B / F)) - t_1; elseif (F <= 0.00026) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0075], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.2e-54], t$95$0, If[LessEqual[F, 6e-39], N[(N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 0.00026], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{0.5}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0075:\\
\;\;\;\;\frac{-1}{\sin B} - t_1\\
\mathbf{elif}\;F \leq -4.2 \cdot 10^{-54}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-39}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}} - t_1\\
\mathbf{elif}\;F \leq 0.00026:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_1\\
\end{array}
\end{array}
if F < -0.0074999999999999997Initial program 59.6%
Taylor expanded in F around -inf 98.4%
expm1-log1p-u38.8%
expm1-udef38.8%
div-inv38.8%
neg-mul-138.8%
fma-def38.8%
Applied egg-rr38.8%
expm1-def38.8%
expm1-log1p98.5%
rem-log-exp45.5%
fma-udef45.5%
neg-mul-145.5%
prod-exp43.5%
*-commutative43.5%
prod-exp45.5%
rem-log-exp98.5%
unsub-neg98.5%
Simplified98.5%
if -0.0074999999999999997 < F < -4.2e-54 or 6.00000000000000055e-39 < F < 2.59999999999999977e-4Initial program 98.9%
+-commutative98.9%
unsub-neg98.9%
associate-*l/98.8%
associate-*r/99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in F around 0 96.3%
Taylor expanded in x around 0 96.3%
Taylor expanded in F around inf 90.5%
*-commutative90.5%
associate-*r/91.0%
Simplified91.0%
if -4.2e-54 < F < 6.00000000000000055e-39Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.4%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in B around 0 87.8%
associate-/l*87.8%
Simplified87.8%
if 2.59999999999999977e-4 < F Initial program 66.3%
Taylor expanded in F around inf 98.5%
expm1-log1p-u38.9%
expm1-udef38.9%
+-commutative38.9%
div-inv38.9%
Applied egg-rr38.9%
expm1-def38.9%
expm1-log1p98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(if (<= F -680.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.4e-203)
(- (* (pow (+ (+ (* F F) 2.0) (* x 2.0)) -0.5) (/ F B)) (/ x B))
(if (<= F 2.3e-32)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (or (<= F 1.35e+155) (not (<= F 1.1e+252)))
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -680.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.4e-203) {
tmp = (pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.3e-32) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if ((F <= 1.35e+155) || !(F <= 1.1e+252)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(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 <= (-680.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.4d-203)) then
tmp = (((((f * f) + 2.0d0) + (x * 2.0d0)) ** (-0.5d0)) * (f / b)) - (x / b)
else if (f <= 2.3d-32) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if ((f <= 1.35d+155) .or. (.not. (f <= 1.1d+252))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -680.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.4e-203) {
tmp = (Math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B);
} else if (F <= 2.3e-32) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if ((F <= 1.35e+155) || !(F <= 1.1e+252)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -680.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.4e-203: tmp = (math.pow((((F * F) + 2.0) + (x * 2.0)), -0.5) * (F / B)) - (x / B) elif F <= 2.3e-32: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif (F <= 1.35e+155) or not (F <= 1.1e+252): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -680.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.4e-203) tmp = Float64(Float64((Float64(Float64(Float64(F * F) + 2.0) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B)) - Float64(x / B)); elseif (F <= 2.3e-32) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif ((F <= 1.35e+155) || !(F <= 1.1e+252)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -680.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.4e-203) tmp = (((((F * F) + 2.0) + (x * 2.0)) ^ -0.5) * (F / B)) - (x / B); elseif (F <= 2.3e-32) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif ((F <= 1.35e+155) || ~((F <= 1.1e+252))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -680.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.4e-203], N[(N[(N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.3e-32], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.35e+155], N[Not[LessEqual[F, 1.1e+252]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -680:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-203}:\\
\;\;\;\;{\left(\left(F \cdot F + 2\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{+155} \lor \neg \left(F \leq 1.1 \cdot 10^{+252}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -680Initial program 59.0%
Taylor expanded in B around 0 34.3%
Taylor expanded in F around -inf 74.1%
mul-1-neg74.1%
+-commutative74.1%
distribute-neg-in74.1%
unsub-neg74.1%
distribute-neg-frac74.1%
metadata-eval74.1%
Simplified74.1%
if -680 < F < -1.40000000000000011e-203Initial program 99.5%
Taylor expanded in B around 0 92.3%
Taylor expanded in B around 0 66.2%
if -1.40000000000000011e-203 < F < 2.3000000000000001e-32Initial program 99.4%
Taylor expanded in F around -inf 36.7%
Taylor expanded in B around 0 57.9%
if 2.3000000000000001e-32 < F < 1.34999999999999997e155 or 1.1e252 < F Initial program 76.1%
Taylor expanded in B around 0 56.3%
Taylor expanded in F around inf 69.8%
if 1.34999999999999997e155 < F < 1.1e252Initial program 45.6%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 85.4%
Final simplification68.1%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00142)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.95e-206)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 3.8e-30)
(+ (* x (/ -1.0 (tan B))) (* (/ F B) (/ -1.0 F)))
(if (or (<= F 1.2e+155) (not (<= F 3.5e+253)))
(- (/ 1.0 (sin B)) (/ x B))
(- (/ 1.0 B) (* x (/ 1.0 (tan B)))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00142) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.95e-206) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 3.8e-30) {
tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F));
} else if ((F <= 1.2e+155) || !(F <= 3.5e+253)) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / tan(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 <= (-0.00142d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.95d-206)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 3.8d-30) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / b) * ((-1.0d0) / f))
else if ((f <= 1.2d+155) .or. (.not. (f <= 3.5d+253))) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (1.0d0 / b) - (x * (1.0d0 / tan(b)))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00142) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.95e-206) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 3.8e-30) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / B) * (-1.0 / F));
} else if ((F <= 1.2e+155) || !(F <= 3.5e+253)) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00142: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.95e-206: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 3.8e-30: tmp = (x * (-1.0 / math.tan(B))) + ((F / B) * (-1.0 / F)) elif (F <= 1.2e+155) or not (F <= 3.5e+253): tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00142) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.95e-206) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 3.8e-30) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / B) * Float64(-1.0 / F))); elseif ((F <= 1.2e+155) || !(F <= 3.5e+253)) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / tan(B)))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00142) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.95e-206) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 3.8e-30) tmp = (x * (-1.0 / tan(B))) + ((F / B) * (-1.0 / F)); elseif ((F <= 1.2e+155) || ~((F <= 3.5e+253))) tmp = (1.0 / sin(B)) - (x / B); else tmp = (1.0 / B) - (x * (1.0 / tan(B))); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00142], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.95e-206], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.8e-30], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F / B), $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 1.2e+155], N[Not[LessEqual[F, 3.5e+253]], $MachinePrecision]], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00142:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.95 \cdot 10^{-206}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{B} \cdot \frac{-1}{F}\\
\mathbf{elif}\;F \leq 1.2 \cdot 10^{+155} \lor \neg \left(F \leq 3.5 \cdot 10^{+253}\right):\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\end{array}
\end{array}
if F < -0.00142000000000000004Initial program 60.3%
Taylor expanded in B around 0 36.3%
Taylor expanded in F around -inf 72.4%
mul-1-neg72.4%
+-commutative72.4%
distribute-neg-in72.4%
unsub-neg72.4%
distribute-neg-frac72.4%
metadata-eval72.4%
Simplified72.4%
if -0.00142000000000000004 < F < -3.9500000000000001e-206Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in B around 0 66.7%
if -3.9500000000000001e-206 < F < 3.8000000000000003e-30Initial program 99.4%
Taylor expanded in F around -inf 36.7%
Taylor expanded in B around 0 57.9%
if 3.8000000000000003e-30 < F < 1.2000000000000001e155 or 3.49999999999999978e253 < F Initial program 76.1%
Taylor expanded in B around 0 56.3%
Taylor expanded in F around inf 69.8%
if 1.2000000000000001e155 < F < 3.49999999999999978e253Initial program 45.6%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 85.4%
Final simplification67.8%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0029)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.95e-203)
(/ (- (* F (sqrt 0.5)) x) B)
(if (or (<= F 3.5e+63) (not (<= F 2.7e+155)))
(- (/ 1.0 B) (* x (/ 1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0029) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.95e-203) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if ((F <= 3.5e+63) || !(F <= 2.7e+155)) {
tmp = (1.0 / B) - (x * (1.0 / 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 (f <= (-0.0029d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.95d-203)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if ((f <= 3.5d+63) .or. (.not. (f <= 2.7d+155))) then
tmp = (1.0d0 / b) - (x * (1.0d0 / 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 (F <= -0.0029) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.95e-203) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if ((F <= 3.5e+63) || !(F <= 2.7e+155)) {
tmp = (1.0 / B) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0029: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.95e-203: tmp = ((F * math.sqrt(0.5)) - x) / B elif (F <= 3.5e+63) or not (F <= 2.7e+155): tmp = (1.0 / B) - (x * (1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0029) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.95e-203) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif ((F <= 3.5e+63) || !(F <= 2.7e+155)) tmp = Float64(Float64(1.0 / B) - Float64(x * Float64(1.0 / 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 (F <= -0.0029) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.95e-203) tmp = ((F * sqrt(0.5)) - x) / B; elseif ((F <= 3.5e+63) || ~((F <= 2.7e+155))) tmp = (1.0 / B) - (x * (1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0029], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.95e-203], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[Or[LessEqual[F, 3.5e+63], N[Not[LessEqual[F, 2.7e+155]], $MachinePrecision]], N[(N[(1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0029:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.95 \cdot 10^{-203}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{+63} \lor \neg \left(F \leq 2.7 \cdot 10^{+155}\right):\\
\;\;\;\;\frac{1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0029Initial program 60.3%
Taylor expanded in B around 0 36.3%
Taylor expanded in F around -inf 72.4%
mul-1-neg72.4%
+-commutative72.4%
distribute-neg-in72.4%
unsub-neg72.4%
distribute-neg-frac72.4%
metadata-eval72.4%
Simplified72.4%
if -0.0029 < F < -1.95e-203Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in B around 0 66.7%
if -1.95e-203 < F < 3.50000000000000029e63 or 2.69999999999999994e155 < F Initial program 81.1%
Taylor expanded in F around inf 59.1%
Taylor expanded in B around 0 60.2%
if 3.50000000000000029e63 < F < 2.69999999999999994e155Initial program 92.7%
Taylor expanded in B around 0 69.0%
Taylor expanded in F around inf 76.1%
Final simplification65.8%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0028)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.72e-203)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 3.8e-30)
(- (/ -1.0 B) (* x (/ 1.0 (tan B))))
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0028) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.72e-203) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 3.8e-30) {
tmp = (-1.0 / B) - (x * (1.0 / 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 (f <= (-0.0028d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.72d-203)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 3.8d-30) then
tmp = ((-1.0d0) / b) - (x * (1.0d0 / 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 (F <= -0.0028) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.72e-203) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 3.8e-30) {
tmp = (-1.0 / B) - (x * (1.0 / Math.tan(B)));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0028: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.72e-203: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 3.8e-30: tmp = (-1.0 / B) - (x * (1.0 / math.tan(B))) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0028) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.72e-203) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 3.8e-30) tmp = Float64(Float64(-1.0 / B) - Float64(x * Float64(1.0 / 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 (F <= -0.0028) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.72e-203) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 3.8e-30) tmp = (-1.0 / B) - (x * (1.0 / tan(B))); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0028], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.72e-203], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 3.8e-30], N[(N[(-1.0 / B), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0028:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.72 \cdot 10^{-203}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-30}:\\
\;\;\;\;\frac{-1}{B} - x \cdot \frac{1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.00279999999999999997Initial program 60.3%
Taylor expanded in B around 0 36.3%
Taylor expanded in F around -inf 72.4%
mul-1-neg72.4%
+-commutative72.4%
distribute-neg-in72.4%
unsub-neg72.4%
distribute-neg-frac72.4%
metadata-eval72.4%
Simplified72.4%
if -0.00279999999999999997 < F < -1.7200000000000001e-203Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.3%
associate-*r/99.5%
*-commutative99.5%
Simplified99.6%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.6%
Taylor expanded in B around 0 66.7%
if -1.7200000000000001e-203 < F < 3.8000000000000003e-30Initial program 99.4%
Taylor expanded in F around -inf 36.7%
Taylor expanded in B around 0 53.3%
if 3.8000000000000003e-30 < F Initial program 68.7%
Taylor expanded in B around 0 44.2%
Taylor expanded in F around inf 67.7%
Final simplification64.6%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-58)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1e-49)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-58) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1e-49) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.35d-58)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1d-49) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-58) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1e-49) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-58: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1e-49: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-58) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1e-49) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.35e-58) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1e-49) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-58], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-49], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-58}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 10^{-49}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.3499999999999999e-58Initial program 66.4%
Taylor expanded in B around 0 45.0%
Taylor expanded in F around -inf 63.3%
mul-1-neg63.3%
+-commutative63.3%
distribute-neg-in63.3%
unsub-neg63.3%
distribute-neg-frac63.3%
metadata-eval63.3%
Simplified63.3%
if -1.3499999999999999e-58 < F < 9.99999999999999936e-50Initial program 99.5%
Taylor expanded in F around -inf 36.5%
Taylor expanded in x around inf 73.6%
mul-1-neg73.6%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in B around 0 40.3%
*-commutative40.3%
distribute-rgt-out--40.3%
metadata-eval40.3%
Simplified40.3%
if 9.99999999999999936e-50 < F Initial program 69.8%
Taylor expanded in B around 0 45.1%
Taylor expanded in F around inf 65.6%
Final simplification55.4%
(FPCore (F B x)
:precision binary64
(if (<= F -0.0029)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.4e-10)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.0029) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.4e-10) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.0029d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.4d-10) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.0029) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.4e-10) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.0029: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.4e-10: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.0029) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.4e-10) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.0029) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.4e-10) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.0029], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-10], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.0029:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -0.0029Initial program 60.3%
Taylor expanded in B around 0 36.3%
Taylor expanded in F around -inf 72.4%
mul-1-neg72.4%
+-commutative72.4%
distribute-neg-in72.4%
unsub-neg72.4%
distribute-neg-frac72.4%
metadata-eval72.4%
Simplified72.4%
if -0.0029 < F < 2.4e-10Initial program 99.4%
+-commutative99.4%
unsub-neg99.4%
associate-*l/99.3%
associate-*r/99.4%
*-commutative99.4%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in B around 0 51.5%
if 2.4e-10 < F Initial program 66.7%
Taylor expanded in B around 0 40.7%
Taylor expanded in F around inf 71.5%
Final simplification62.7%
(FPCore (F B x)
:precision binary64
(if (<= F -3.1e-57)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 8.5e-50)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-57) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8.5e-50) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-57)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8.5d-50) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-57) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8.5e-50) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-57: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8.5e-50: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-57) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8.5e-50) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e-57) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8.5e-50) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-57], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-50], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-57}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.09999999999999976e-57Initial program 66.4%
Taylor expanded in B around 0 45.0%
Taylor expanded in F around -inf 63.3%
mul-1-neg63.3%
+-commutative63.3%
distribute-neg-in63.3%
unsub-neg63.3%
distribute-neg-frac63.3%
metadata-eval63.3%
Simplified63.3%
if -3.09999999999999976e-57 < F < 8.50000000000000012e-50Initial program 99.5%
Taylor expanded in F around -inf 36.5%
Taylor expanded in x around inf 73.6%
mul-1-neg73.6%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in B around 0 40.3%
*-commutative40.3%
distribute-rgt-out--40.3%
metadata-eval40.3%
Simplified40.3%
if 8.50000000000000012e-50 < F Initial program 69.8%
Taylor expanded in F around inf 90.1%
Taylor expanded in B around 0 41.0%
Final simplification47.2%
(FPCore (F B x)
:precision binary64
(if (<= F -1.45e-58)
(/ (- -1.0 x) B)
(if (<= F 1e-49)
(- (/ (- x) B) (* B (* x -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-58) {
tmp = (-1.0 - x) / B;
} else if (F <= 1e-49) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.45d-58)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1d-49) then
tmp = (-x / b) - (b * (x * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-58) {
tmp = (-1.0 - x) / B;
} else if (F <= 1e-49) {
tmp = (-x / B) - (B * (x * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45e-58: tmp = (-1.0 - x) / B elif F <= 1e-49: tmp = (-x / B) - (B * (x * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45e-58) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1e-49) tmp = Float64(Float64(Float64(-x) / B) - Float64(B * Float64(x * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45e-58) tmp = (-1.0 - x) / B; elseif (F <= 1e-49) tmp = (-x / B) - (B * (x * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45e-58], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-49], N[(N[((-x) / B), $MachinePrecision] - N[(B * N[(x * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45 \cdot 10^{-58}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 10^{-49}:\\
\;\;\;\;\frac{-x}{B} - B \cdot \left(x \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.44999999999999995e-58Initial program 66.4%
Taylor expanded in F around -inf 85.3%
Taylor expanded in B around 0 38.9%
associate-*r/38.9%
distribute-lft-in38.9%
metadata-eval38.9%
neg-mul-138.9%
Simplified38.9%
Taylor expanded in B around 0 38.9%
associate-*r/38.9%
distribute-lft-in38.9%
metadata-eval38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
if -1.44999999999999995e-58 < F < 9.99999999999999936e-50Initial program 99.5%
Taylor expanded in F around -inf 36.5%
Taylor expanded in x around inf 73.6%
mul-1-neg73.6%
associate-/l*73.4%
Simplified73.4%
Taylor expanded in B around 0 40.3%
*-commutative40.3%
distribute-rgt-out--40.3%
metadata-eval40.3%
Simplified40.3%
if 9.99999999999999936e-50 < F Initial program 69.8%
Taylor expanded in F around inf 90.1%
Taylor expanded in B around 0 41.0%
Final simplification40.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-57)
(/ (- -1.0 x) B)
(if (<= F 8e-50)
(* x (+ (/ -1.0 B) (* B 0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-57) {
tmp = (-1.0 - x) / B;
} else if (F <= 8e-50) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.35d-57)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8d-50) then
tmp = x * (((-1.0d0) / b) + (b * 0.3333333333333333d0))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-57) {
tmp = (-1.0 - x) / B;
} else if (F <= 8e-50) {
tmp = x * ((-1.0 / B) + (B * 0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-57: tmp = (-1.0 - x) / B elif F <= 8e-50: tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-57) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8e-50) tmp = Float64(x * Float64(Float64(-1.0 / B) + Float64(B * 0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.35e-57) tmp = (-1.0 - x) / B; elseif (F <= 8e-50) tmp = x * ((-1.0 / B) + (B * 0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-57], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8e-50], N[(x * N[(N[(-1.0 / B), $MachinePrecision] + N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-57}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8 \cdot 10^{-50}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} + B \cdot 0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.3500000000000001e-57Initial program 66.4%
Taylor expanded in F around -inf 85.3%
Taylor expanded in B around 0 38.9%
associate-*r/38.9%
distribute-lft-in38.9%
metadata-eval38.9%
neg-mul-138.9%
Simplified38.9%
Taylor expanded in B around 0 38.9%
associate-*r/38.9%
distribute-lft-in38.9%
metadata-eval38.9%
neg-mul-138.9%
sub-neg38.9%
Simplified38.9%
if -1.3500000000000001e-57 < F < 8.00000000000000006e-50Initial program 99.5%
Taylor expanded in F around -inf 36.5%
Taylor expanded in B around 0 20.1%
*-commutative20.1%
Simplified20.1%
Taylor expanded in B around 0 19.8%
Taylor expanded in x around inf 40.1%
associate-*r*40.1%
*-commutative40.1%
+-commutative40.1%
distribute-lft-in40.1%
neg-mul-140.1%
distribute-neg-frac40.1%
metadata-eval40.1%
neg-mul-140.1%
metadata-eval40.1%
distribute-lft-neg-in40.1%
remove-double-neg40.1%
*-commutative40.1%
Simplified40.1%
if 8.00000000000000006e-50 < F Initial program 69.8%
Taylor expanded in F around inf 90.1%
Taylor expanded in B around 0 41.0%
Final simplification40.0%
(FPCore (F B x) :precision binary64 (if (<= F -7.4e-43) (/ (- -1.0 x) B) (if (<= F 1.15e-32) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.4e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e-32) {
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.4d-43)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.15d-32) 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.4e-43) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.15e-32) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.4e-43: tmp = (-1.0 - x) / B elif F <= 1.15e-32: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.4e-43) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.15e-32) 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.4e-43) tmp = (-1.0 - x) / B; elseif (F <= 1.15e-32) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.4e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.15e-32], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.4 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.15 \cdot 10^{-32}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.4e-43Initial program 64.6%
Taylor expanded in F around -inf 88.4%
Taylor expanded in B around 0 39.5%
associate-*r/39.5%
distribute-lft-in39.5%
metadata-eval39.5%
neg-mul-139.5%
Simplified39.5%
Taylor expanded in B around 0 39.5%
associate-*r/39.5%
distribute-lft-in39.5%
metadata-eval39.5%
neg-mul-139.5%
sub-neg39.5%
Simplified39.5%
if -7.4e-43 < F < 1.15e-32Initial program 99.5%
Taylor expanded in F around -inf 36.2%
Taylor expanded in B around 0 20.0%
associate-*r/20.0%
distribute-lft-in20.0%
metadata-eval20.0%
neg-mul-120.0%
Simplified20.0%
Taylor expanded in x around inf 38.3%
associate-*r/38.3%
neg-mul-138.3%
Simplified38.3%
if 1.15e-32 < F Initial program 68.7%
Taylor expanded in F around inf 92.0%
Taylor expanded in B around 0 42.3%
Final simplification39.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.5e-43) (/ (- -1.0 x) B) (/ (- x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-43) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.5d-43)) then
tmp = ((-1.0d0) - x) / b
else
tmp = -x / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-43) {
tmp = (-1.0 - x) / B;
} else {
tmp = -x / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-43: tmp = (-1.0 - x) / B else: tmp = -x / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-43) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(-x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-43) tmp = (-1.0 - x) / B; else tmp = -x / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-43], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[((-x) / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-43}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{B}\\
\end{array}
\end{array}
if F < -1.50000000000000002e-43Initial program 64.6%
Taylor expanded in F around -inf 88.4%
Taylor expanded in B around 0 39.5%
associate-*r/39.5%
distribute-lft-in39.5%
metadata-eval39.5%
neg-mul-139.5%
Simplified39.5%
Taylor expanded in B around 0 39.5%
associate-*r/39.5%
distribute-lft-in39.5%
metadata-eval39.5%
neg-mul-139.5%
sub-neg39.5%
Simplified39.5%
if -1.50000000000000002e-43 < F Initial program 85.8%
Taylor expanded in F around -inf 37.8%
Taylor expanded in B around 0 19.1%
associate-*r/19.1%
distribute-lft-in19.1%
metadata-eval19.1%
neg-mul-119.1%
Simplified19.1%
Taylor expanded in x around inf 29.6%
associate-*r/29.6%
neg-mul-129.6%
Simplified29.6%
Final simplification32.3%
(FPCore (F B x) :precision binary64 (/ (- x) B))
double code(double F, double B, double x) {
return -x / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -x / b
end function
public static double code(double F, double B, double x) {
return -x / B;
}
def code(F, B, x): return -x / B
function code(F, B, x) return Float64(Float64(-x) / B) end
function tmp = code(F, B, x) tmp = -x / B; end
code[F_, B_, x_] := N[((-x) / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-x}{B}
\end{array}
Initial program 79.9%
Taylor expanded in F around -inf 51.8%
Taylor expanded in B around 0 24.8%
associate-*r/24.8%
distribute-lft-in24.8%
metadata-eval24.8%
neg-mul-124.8%
Simplified24.8%
Taylor expanded in x around inf 27.3%
associate-*r/27.3%
neg-mul-127.3%
Simplified27.3%
Final simplification27.3%
(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 79.9%
Taylor expanded in F around -inf 51.8%
Taylor expanded in B around 0 24.8%
associate-*r/24.8%
distribute-lft-in24.8%
metadata-eval24.8%
neg-mul-124.8%
Simplified24.8%
Taylor expanded in x around 0 8.1%
Final simplification8.1%
herbie shell --seed 2023178
(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))))))