
(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 -5e+19)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(- (* F (/ (pow (fma x 2.0 (fma F F 2.0)) -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 <= -5e+19) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (F * (pow(fma(x, 2.0, fma(F, F, 2.0)), -0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+19) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(F * Float64((fma(x, 2.0, fma(F, F, 2.0)) ^ -0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+19], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(F * N[(N[Power[N[(x * 2.0 + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -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 -5 \cdot 10^{+19}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;F \cdot \frac{{\left(\mathsf{fma}\left(x, 2, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -5e19Initial program 65.4%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u56.0%
expm1-udef55.9%
+-commutative55.9%
div-inv55.9%
Applied egg-rr55.9%
expm1-def56.0%
expm1-log1p99.8%
unsub-neg99.8%
Simplified99.8%
if -5e19 < F < 1.44999999999999996Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
if 1.44999999999999996 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.32e+26)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* 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.32e+26) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (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.32d+26)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (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.32e+26) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (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.32e+26: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (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.32e+26) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + 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.32e+26) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (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.32e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - 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.32 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\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.32e26Initial program 64.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u54.8%
expm1-udef54.7%
+-commutative54.7%
div-inv54.7%
Applied egg-rr54.7%
expm1-def54.8%
expm1-log1p99.8%
unsub-neg99.8%
Simplified99.8%
if -1.32e26 < F < 1.44999999999999996Initial program 99.6%
Taylor expanded in x around 0 99.6%
if 1.44999999999999996 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7500000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(* x (/ -1.0 (tan 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 <= -7500000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / tan(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 <= (-7500000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + (x * ((-1.0d0) / tan(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 <= -7500000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / Math.tan(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 <= -7500000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (x * (-1.0 / math.tan(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 <= -7500000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(x * Float64(-1.0 / tan(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 <= -7500000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (x * (-1.0 / tan(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, -7500000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(x * N[(-1.0 / N[Tan[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 -7500000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + x \cdot \frac{-1}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -7.5e12Initial program 66.4%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u55.7%
expm1-udef55.6%
+-commutative55.6%
div-inv55.6%
Applied egg-rr55.6%
expm1-def55.7%
expm1-log1p99.8%
unsub-neg99.8%
Simplified99.8%
if -7.5e12 < F < 1.44999999999999996Initial program 99.6%
if 1.44999999999999996 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.32e+26)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2e+22)
(+
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ -1.0 (/ (tan B) x)))
(- (/ 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.32e+26) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2e+22) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (tan(B) / x));
} 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.32d+26)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2d+22) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) + ((-1.0d0) / (tan(b) / x))
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.32e+26) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2e+22) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (Math.tan(B) / x));
} 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.32e+26: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2e+22: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) + (-1.0 / (math.tan(B) / x)) 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.32e+26) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2e+22) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) + Float64(-1.0 / Float64(tan(B) / x))); 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.32e+26) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2e+22) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) + (-1.0 / (tan(B) / x)); 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.32e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2e+22], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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.32 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+22}:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} + \frac{-1}{\frac{\tan B}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.32e26Initial program 64.3%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u54.8%
expm1-udef54.7%
+-commutative54.7%
div-inv54.7%
Applied egg-rr54.7%
expm1-def54.8%
expm1-log1p99.8%
unsub-neg99.8%
Simplified99.8%
if -1.32e26 < F < 2e22Initial program 99.6%
div-inv99.7%
clear-num99.6%
Applied egg-rr99.6%
if 2e22 < F Initial program 52.7%
+-commutative52.7%
unsub-neg52.7%
associate-*l/74.3%
associate-*r/74.2%
*-commutative74.2%
Simplified74.3%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification99.7%
(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.42)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (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.42) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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.42d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / 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.42) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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.42: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / 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.42) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / 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.42) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / 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.42], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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.42:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 66.9%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u56.3%
expm1-udef56.3%
+-commutative56.3%
div-inv56.3%
Applied egg-rr56.3%
expm1-def56.3%
expm1-log1p99.8%
unsub-neg99.8%
Simplified99.8%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 98.6%
if 1.4199999999999999 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification99.2%
(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.42)
(- (* F (/ (sqrt 0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (sqrt(0.5) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = (f * (sqrt(0.5d0) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt(0.5) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = (F * (math.sqrt(0.5) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(0.5) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = (F * (sqrt(0.5) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 66.9%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u56.3%
expm1-udef56.3%
+-commutative56.3%
div-inv56.3%
Applied egg-rr56.3%
expm1-def56.3%
expm1-log1p99.8%
unsub-neg99.8%
Simplified99.8%
if -1.3999999999999999 < F < 1.4199999999999999Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 98.6%
Taylor expanded in x around 0 98.2%
if 1.4199999999999999 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -470.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.45)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -470.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-470.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.45d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -470.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.45) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -470.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.45: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -470.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.45) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -470.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.45) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -470.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.45], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $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 -470:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.45:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -470Initial program 66.9%
Taylor expanded in F around -inf 99.7%
expm1-log1p-u56.3%
expm1-udef56.3%
+-commutative56.3%
div-inv56.3%
Applied egg-rr56.3%
expm1-def56.3%
expm1-log1p99.8%
unsub-neg99.8%
Simplified99.8%
if -470 < F < 1.44999999999999996Initial program 99.6%
Taylor expanded in B around 0 79.2%
if 1.44999999999999996 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification90.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5)))
(t_1 (/ (- (cos B)) (/ (sin B) x)))
(t_2 (/ x (tan B))))
(if (<= F -1.45e-76)
(- (/ -1.0 B) t_2)
(if (<= F -4.6e-97)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -1.05e-150)
t_1
(if (<= F -2.65e-183)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F -1.1e-183)
t_0
(if (<= F 1.4e-58)
t_1
(if (<= F 0.00049) t_0 (- (/ F (* F B)) t_2))))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double t_1 = -cos(B) / (sin(B) / x);
double t_2 = x / tan(B);
double tmp;
if (F <= -1.45e-76) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -4.6e-97) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -1.05e-150) {
tmp = t_1;
} else if (F <= -2.65e-183) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= -1.1e-183) {
tmp = t_0;
} else if (F <= 1.4e-58) {
tmp = t_1;
} else if (F <= 0.00049) {
tmp = t_0;
} else {
tmp = (F / (F * B)) - t_2;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt(0.5d0)
t_1 = -cos(b) / (sin(b) / x)
t_2 = x / tan(b)
if (f <= (-1.45d-76)) then
tmp = ((-1.0d0) / b) - t_2
else if (f <= (-4.6d-97)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-1.05d-150)) then
tmp = t_1
else if (f <= (-2.65d-183)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= (-1.1d-183)) then
tmp = t_0
else if (f <= 1.4d-58) then
tmp = t_1
else if (f <= 0.00049d0) then
tmp = t_0
else
tmp = (f / (f * b)) - t_2
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt(0.5);
double t_1 = -Math.cos(B) / (Math.sin(B) / x);
double t_2 = x / Math.tan(B);
double tmp;
if (F <= -1.45e-76) {
tmp = (-1.0 / B) - t_2;
} else if (F <= -4.6e-97) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -1.05e-150) {
tmp = t_1;
} else if (F <= -2.65e-183) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= -1.1e-183) {
tmp = t_0;
} else if (F <= 1.4e-58) {
tmp = t_1;
} else if (F <= 0.00049) {
tmp = t_0;
} else {
tmp = (F / (F * B)) - t_2;
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) t_1 = -math.cos(B) / (math.sin(B) / x) t_2 = x / math.tan(B) tmp = 0 if F <= -1.45e-76: tmp = (-1.0 / B) - t_2 elif F <= -4.6e-97: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -1.05e-150: tmp = t_1 elif F <= -2.65e-183: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= -1.1e-183: tmp = t_0 elif F <= 1.4e-58: tmp = t_1 elif F <= 0.00049: tmp = t_0 else: tmp = (F / (F * B)) - t_2 return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) t_1 = Float64(Float64(-cos(B)) / Float64(sin(B) / x)) t_2 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e-76) tmp = Float64(Float64(-1.0 / B) - t_2); elseif (F <= -4.6e-97) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -1.05e-150) tmp = t_1; elseif (F <= -2.65e-183) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= -1.1e-183) tmp = t_0; elseif (F <= 1.4e-58) tmp = t_1; elseif (F <= 0.00049) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * B)) - t_2); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); t_1 = -cos(B) / (sin(B) / x); t_2 = x / tan(B); tmp = 0.0; if (F <= -1.45e-76) tmp = (-1.0 / B) - t_2; elseif (F <= -4.6e-97) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -1.05e-150) tmp = t_1; elseif (F <= -2.65e-183) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= -1.1e-183) tmp = t_0; elseif (F <= 1.4e-58) tmp = t_1; elseif (F <= 0.00049) tmp = t_0; else tmp = (F / (F * B)) - t_2; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-76], N[(N[(-1.0 / B), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[F, -4.6e-97], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.05e-150], t$95$1, If[LessEqual[F, -2.65e-183], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.1e-183], t$95$0, If[LessEqual[F, 1.4e-58], t$95$1, If[LessEqual[F, 0.00049], t$95$0, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
t_1 := \frac{-\cos B}{\frac{\sin B}{x}}\\
t_2 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-76}:\\
\;\;\;\;\frac{-1}{B} - t_2\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-97}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq -2.65 \cdot 10^{-183}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-183}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;F \leq 0.00049:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t_2\\
\end{array}
\end{array}
if F < -1.4500000000000001e-76Initial program 73.3%
Taylor expanded in F around -inf 90.2%
expm1-log1p-u51.0%
expm1-udef51.0%
+-commutative51.0%
div-inv51.0%
Applied egg-rr51.0%
expm1-def51.0%
expm1-log1p90.3%
unsub-neg90.3%
Simplified90.3%
Taylor expanded in B around 0 67.7%
if -1.4500000000000001e-76 < F < -4.59999999999999988e-97Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.8%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in F around 0 100.0%
Taylor expanded in x around 0 80.9%
associate-/l*80.7%
Simplified80.7%
associate-/r/81.1%
Applied egg-rr81.1%
if -4.59999999999999988e-97 < F < -1.0500000000000001e-150 or -1.1e-183 < F < 1.4e-58Initial program 99.6%
Taylor expanded in F around -inf 36.3%
Taylor expanded in x around inf 80.1%
mul-1-neg80.1%
associate-/l*79.9%
Simplified79.9%
if -1.0500000000000001e-150 < F < -2.6500000000000002e-183Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.3%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 82.3%
if -2.6500000000000002e-183 < F < -1.1e-183 or 1.4e-58 < F < 4.8999999999999998e-4Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in F around inf 83.3%
associate-*r/83.3%
Simplified83.3%
if 4.8999999999999998e-4 < F Initial program 57.3%
+-commutative57.3%
unsub-neg57.3%
associate-*l/76.7%
associate-*r/76.6%
*-commutative76.6%
Simplified76.8%
Taylor expanded in F around inf 98.9%
*-commutative98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in B around 0 75.2%
associate-/r*75.2%
Simplified75.2%
associate-/l/75.2%
un-div-inv75.3%
Applied egg-rr75.3%
Final simplification74.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))) (t_1 (/ x (tan B))))
(if (<= F -1.45e-76)
(- (/ -1.0 B) t_1)
(if (<= F -4.6e-97)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -3.6e-152)
(/ (- (cos B)) (/ (sin B) x))
(if (<= F -1.12e-183)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F -6.8e-184)
t_0
(if (<= F 1.25e-52)
(* (cos B) (/ (- x) (sin B)))
(if (<= F 0.00039) t_0 (- (/ F (* F B)) t_1))))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -1.45e-76) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -4.6e-97) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -3.6e-152) {
tmp = -cos(B) / (sin(B) / x);
} else if (F <= -1.12e-183) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= -6.8e-184) {
tmp = t_0;
} else if (F <= 1.25e-52) {
tmp = cos(B) * (-x / sin(B));
} else if (F <= 0.00039) {
tmp = t_0;
} else {
tmp = (F / (F * 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)) * sqrt(0.5d0)
t_1 = x / tan(b)
if (f <= (-1.45d-76)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-4.6d-97)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-3.6d-152)) then
tmp = -cos(b) / (sin(b) / x)
else if (f <= (-1.12d-183)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= (-6.8d-184)) then
tmp = t_0
else if (f <= 1.25d-52) then
tmp = cos(b) * (-x / sin(b))
else if (f <= 0.00039d0) then
tmp = t_0
else
tmp = (f / (f * b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt(0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.45e-76) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -4.6e-97) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -3.6e-152) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else if (F <= -1.12e-183) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= -6.8e-184) {
tmp = t_0;
} else if (F <= 1.25e-52) {
tmp = Math.cos(B) * (-x / Math.sin(B));
} else if (F <= 0.00039) {
tmp = t_0;
} else {
tmp = (F / (F * B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -1.45e-76: tmp = (-1.0 / B) - t_1 elif F <= -4.6e-97: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -3.6e-152: tmp = -math.cos(B) / (math.sin(B) / x) elif F <= -1.12e-183: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= -6.8e-184: tmp = t_0 elif F <= 1.25e-52: tmp = math.cos(B) * (-x / math.sin(B)) elif F <= 0.00039: tmp = t_0 else: tmp = (F / (F * B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.45e-76) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -4.6e-97) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -3.6e-152) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); elseif (F <= -1.12e-183) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= -6.8e-184) tmp = t_0; elseif (F <= 1.25e-52) tmp = Float64(cos(B) * Float64(Float64(-x) / sin(B))); elseif (F <= 0.00039) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.45e-76) tmp = (-1.0 / B) - t_1; elseif (F <= -4.6e-97) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -3.6e-152) tmp = -cos(B) / (sin(B) / x); elseif (F <= -1.12e-183) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= -6.8e-184) tmp = t_0; elseif (F <= 1.25e-52) tmp = cos(B) * (-x / sin(B)); elseif (F <= 0.00039) tmp = t_0; else tmp = (F / (F * B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.45e-76], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.6e-97], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.6e-152], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.12e-183], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -6.8e-184], t$95$0, If[LessEqual[F, 1.25e-52], N[(N[Cos[B], $MachinePrecision] * N[((-x) / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00039], t$95$0, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.45 \cdot 10^{-76}:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-97}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -3.6 \cdot 10^{-152}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq -1.12 \cdot 10^{-183}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq -6.8 \cdot 10^{-184}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-52}:\\
\;\;\;\;\cos B \cdot \frac{-x}{\sin B}\\
\mathbf{elif}\;F \leq 0.00039:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t_1\\
\end{array}
\end{array}
if F < -1.4500000000000001e-76Initial program 73.3%
Taylor expanded in F around -inf 90.2%
expm1-log1p-u51.0%
expm1-udef51.0%
+-commutative51.0%
div-inv51.0%
Applied egg-rr51.0%
expm1-def51.0%
expm1-log1p90.3%
unsub-neg90.3%
Simplified90.3%
Taylor expanded in B around 0 67.7%
if -1.4500000000000001e-76 < F < -4.59999999999999988e-97Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.8%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in F around 0 100.0%
Taylor expanded in x around 0 80.9%
associate-/l*80.7%
Simplified80.7%
associate-/r/81.1%
Applied egg-rr81.1%
if -4.59999999999999988e-97 < F < -3.6e-152Initial program 99.6%
Taylor expanded in F around -inf 31.9%
Taylor expanded in x around inf 60.3%
mul-1-neg60.3%
associate-/l*60.5%
Simplified60.5%
if -3.6e-152 < F < -1.1199999999999999e-183Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.3%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 82.3%
if -1.1199999999999999e-183 < F < -6.80000000000000008e-184 or 1.25e-52 < F < 3.89999999999999993e-4Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in F around inf 83.3%
associate-*r/83.3%
Simplified83.3%
if -6.80000000000000008e-184 < F < 1.25e-52Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.5%
*-commutative99.5%
Simplified99.8%
Taylor expanded in F around inf 29.9%
*-commutative29.9%
associate-/r*29.9%
Simplified29.9%
Taylor expanded in B around 0 39.3%
associate-/r*39.3%
Simplified39.3%
Taylor expanded in B around inf 82.3%
mul-1-neg82.3%
associate-*r/82.3%
distribute-rgt-neg-in82.3%
Simplified82.3%
if 3.89999999999999993e-4 < F Initial program 57.3%
+-commutative57.3%
unsub-neg57.3%
associate-*l/76.7%
associate-*r/76.6%
*-commutative76.6%
Simplified76.8%
Taylor expanded in F around inf 98.9%
*-commutative98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in B around 0 75.2%
associate-/r*75.2%
Simplified75.2%
associate-/l/75.2%
un-div-inv75.3%
Applied egg-rr75.3%
Final simplification74.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt 0.5))) (t_1 (/ x (tan B))))
(if (<= F -3.2e-78)
(- (/ -1.0 B) t_1)
(if (<= F -4.4e-97)
(* F (/ (sqrt 0.5) (sin B)))
(if (<= F -2.8e-156)
(/ (- (cos B)) (/ (sin B) x))
(if (<= F -1.15e-183)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F -1.1e-183)
t_0
(if (<= F 1.05e-62)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 1.35e-5) t_0 (- (/ F (* F B)) t_1))))))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt(0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -3.2e-78) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -4.4e-97) {
tmp = F * (sqrt(0.5) / sin(B));
} else if (F <= -2.8e-156) {
tmp = -cos(B) / (sin(B) / x);
} else if (F <= -1.15e-183) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= -1.1e-183) {
tmp = t_0;
} else if (F <= 1.05e-62) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 1.35e-5) {
tmp = t_0;
} else {
tmp = (F / (F * 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)) * sqrt(0.5d0)
t_1 = x / tan(b)
if (f <= (-3.2d-78)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-4.4d-97)) then
tmp = f * (sqrt(0.5d0) / sin(b))
else if (f <= (-2.8d-156)) then
tmp = -cos(b) / (sin(b) / x)
else if (f <= (-1.15d-183)) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= (-1.1d-183)) then
tmp = t_0
else if (f <= 1.05d-62) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 1.35d-5) then
tmp = t_0
else
tmp = (f / (f * b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt(0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -3.2e-78) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -4.4e-97) {
tmp = F * (Math.sqrt(0.5) / Math.sin(B));
} else if (F <= -2.8e-156) {
tmp = -Math.cos(B) / (Math.sin(B) / x);
} else if (F <= -1.15e-183) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= -1.1e-183) {
tmp = t_0;
} else if (F <= 1.05e-62) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.35e-5) {
tmp = t_0;
} else {
tmp = (F / (F * B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt(0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -3.2e-78: tmp = (-1.0 / B) - t_1 elif F <= -4.4e-97: tmp = F * (math.sqrt(0.5) / math.sin(B)) elif F <= -2.8e-156: tmp = -math.cos(B) / (math.sin(B) / x) elif F <= -1.15e-183: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= -1.1e-183: tmp = t_0 elif F <= 1.05e-62: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 1.35e-5: tmp = t_0 else: tmp = (F / (F * B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(0.5)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.2e-78) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -4.4e-97) tmp = Float64(F * Float64(sqrt(0.5) / sin(B))); elseif (F <= -2.8e-156) tmp = Float64(Float64(-cos(B)) / Float64(sin(B) / x)); elseif (F <= -1.15e-183) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= -1.1e-183) tmp = t_0; elseif (F <= 1.05e-62) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.35e-5) tmp = t_0; else tmp = Float64(Float64(F / Float64(F * B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt(0.5); t_1 = x / tan(B); tmp = 0.0; if (F <= -3.2e-78) tmp = (-1.0 / B) - t_1; elseif (F <= -4.4e-97) tmp = F * (sqrt(0.5) / sin(B)); elseif (F <= -2.8e-156) tmp = -cos(B) / (sin(B) / x); elseif (F <= -1.15e-183) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= -1.1e-183) tmp = t_0; elseif (F <= 1.05e-62) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 1.35e-5) tmp = t_0; else tmp = (F / (F * B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.2e-78], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.4e-97], N[(F * N[(N[Sqrt[0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.8e-156], N[((-N[Cos[B], $MachinePrecision]) / N[(N[Sin[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.15e-183], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.1e-183], t$95$0, If[LessEqual[F, 1.05e-62], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1.35e-5], t$95$0, N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{-78}:\\
\;\;\;\;\frac{-1}{B} - t_1\\
\mathbf{elif}\;F \leq -4.4 \cdot 10^{-97}:\\
\;\;\;\;F \cdot \frac{\sqrt{0.5}}{\sin B}\\
\mathbf{elif}\;F \leq -2.8 \cdot 10^{-156}:\\
\;\;\;\;\frac{-\cos B}{\frac{\sin B}{x}}\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{-183}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq -1.1 \cdot 10^{-183}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-62}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t_1\\
\end{array}
\end{array}
if F < -3.2e-78Initial program 73.3%
Taylor expanded in F around -inf 90.2%
expm1-log1p-u51.0%
expm1-udef51.0%
+-commutative51.0%
div-inv51.0%
Applied egg-rr51.0%
expm1-def51.0%
expm1-log1p90.3%
unsub-neg90.3%
Simplified90.3%
Taylor expanded in B around 0 67.7%
if -3.2e-78 < F < -4.3999999999999998e-97Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.8%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in F around 0 100.0%
Taylor expanded in x around 0 80.9%
associate-/l*80.7%
Simplified80.7%
associate-/r/81.1%
Applied egg-rr81.1%
if -4.3999999999999998e-97 < F < -2.8000000000000002e-156Initial program 99.6%
Taylor expanded in F around -inf 31.9%
Taylor expanded in x around inf 60.3%
mul-1-neg60.3%
associate-/l*60.5%
Simplified60.5%
if -2.8000000000000002e-156 < F < -1.15000000000000008e-183Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.3%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in B around 0 82.3%
if -1.15000000000000008e-183 < F < -1.1e-183 or 1.05e-62 < F < 1.3499999999999999e-5Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in F around inf 83.3%
associate-*r/83.3%
Simplified83.3%
if -1.1e-183 < F < 1.05e-62Initial program 99.6%
Taylor expanded in F around -inf 36.9%
Taylor expanded in x around inf 82.3%
associate-*r/82.3%
*-commutative82.3%
associate-*r*82.3%
neg-mul-182.3%
Simplified82.3%
if 1.3499999999999999e-5 < F Initial program 57.3%
+-commutative57.3%
unsub-neg57.3%
associate-*l/76.7%
associate-*r/76.6%
*-commutative76.6%
Simplified76.8%
Taylor expanded in F around inf 98.9%
*-commutative98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in B around 0 75.2%
associate-/r*75.2%
Simplified75.2%
associate-/l/75.2%
un-div-inv75.3%
Applied egg-rr75.3%
Final simplification74.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0152)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.14)
(- (* (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0152) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.0152d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.14d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.0152) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0152: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.14: tmp = (math.sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0152) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.14) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0152) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.14) tmp = (sqrt((1.0 / (2.0 + (x * 2.0)))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0152], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0152:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;\sqrt{\frac{1}{2 + x \cdot 2}} \cdot \frac{F}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.0152Initial program 67.8%
Taylor expanded in F around -inf 97.3%
expm1-log1p-u55.2%
expm1-udef55.1%
+-commutative55.1%
div-inv55.1%
Applied egg-rr55.1%
expm1-def55.2%
expm1-log1p97.4%
unsub-neg97.4%
Simplified97.4%
if -0.0152 < F < 0.14000000000000001Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in B around 0 79.8%
if 0.14000000000000001 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification90.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.8e-59)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3e-61)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 1.5e-6)
(* (/ F (sin B)) (sqrt 0.5))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.8e-59) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3e-61) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 1.5e-6) {
tmp = (F / sin(B)) * sqrt(0.5);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.8d-59)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3d-61) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 1.5d-6) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.8e-59) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3e-61) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.5e-6) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.8e-59: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3e-61: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 1.5e-6: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.8e-59) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3e-61) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.5e-6) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.8e-59) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3e-61) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 1.5e-6) tmp = (F / sin(B)) * sqrt(0.5); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.8e-59], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3e-61], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1.5e-6], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $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 -4.8 \cdot 10^{-59}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 3 \cdot 10^{-61}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -4.8000000000000003e-59Initial program 72.4%
Taylor expanded in F around -inf 92.2%
expm1-log1p-u51.8%
expm1-udef51.8%
+-commutative51.8%
div-inv51.8%
Applied egg-rr51.8%
expm1-def51.8%
expm1-log1p92.3%
unsub-neg92.3%
Simplified92.3%
if -4.8000000000000003e-59 < F < 3.00000000000000012e-61Initial program 99.6%
Taylor expanded in F around -inf 32.6%
Taylor expanded in x around inf 70.4%
associate-*r/70.4%
*-commutative70.4%
associate-*r*70.4%
neg-mul-170.4%
Simplified70.4%
if 3.00000000000000012e-61 < F < 1.5e-6Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in F around inf 81.7%
associate-*r/81.7%
Simplified81.7%
if 1.5e-6 < F Initial program 57.3%
+-commutative57.3%
unsub-neg57.3%
associate-*l/76.7%
associate-*r/76.6%
*-commutative76.6%
Simplified76.8%
Taylor expanded in F around inf 98.9%
*-commutative98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in F around 0 99.1%
Final simplification86.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.0128)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.76) (- (/ (* F (sqrt 0.5)) B) t_0) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.0128) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.76) {
tmp = ((F * sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.0128d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.76d0) then
tmp = ((f * sqrt(0.5d0)) / b) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.0128) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.76) {
tmp = ((F * Math.sqrt(0.5)) / B) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.0128: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.76: tmp = ((F * math.sqrt(0.5)) / B) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0128) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.76) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / B) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.0128) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.76) tmp = ((F * sqrt(0.5)) / B) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0128], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.76], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0128:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 0.76:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{B} - t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t_0\\
\end{array}
\end{array}
if F < -0.0128000000000000006Initial program 67.8%
Taylor expanded in F around -inf 97.3%
expm1-log1p-u55.2%
expm1-udef55.1%
+-commutative55.1%
div-inv55.1%
Applied egg-rr55.1%
expm1-def55.2%
expm1-log1p97.4%
unsub-neg97.4%
Simplified97.4%
if -0.0128000000000000006 < F < 0.76000000000000001Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
Taylor expanded in x around 0 99.3%
Taylor expanded in B around 0 79.4%
if 0.76000000000000001 < F Initial program 56.7%
+-commutative56.7%
unsub-neg56.7%
associate-*l/76.4%
associate-*r/76.3%
*-commutative76.3%
Simplified76.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in F around 0 99.9%
Final simplification90.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= x -3.2e-107)
(- (/ F (* F B)) t_0)
(if (<= x -1.5e-195)
(/ -1.0 (sin B))
(if (<= x 2.15e-156)
(* (/ F (sin B)) (sqrt 0.5))
(if (<= x 1.3e-16)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ -1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (x <= -3.2e-107) {
tmp = (F / (F * B)) - t_0;
} else if (x <= -1.5e-195) {
tmp = -1.0 / sin(B);
} else if (x <= 2.15e-156) {
tmp = (F / sin(B)) * sqrt(0.5);
} else if (x <= 1.3e-16) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (x <= (-3.2d-107)) then
tmp = (f / (f * b)) - t_0
else if (x <= (-1.5d-195)) then
tmp = (-1.0d0) / sin(b)
else if (x <= 2.15d-156) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else if (x <= 1.3d-16) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = ((-1.0d0) / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (x <= -3.2e-107) {
tmp = (F / (F * B)) - t_0;
} else if (x <= -1.5e-195) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 2.15e-156) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else if (x <= 1.3e-16) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if x <= -3.2e-107: tmp = (F / (F * B)) - t_0 elif x <= -1.5e-195: tmp = -1.0 / math.sin(B) elif x <= 2.15e-156: tmp = (F / math.sin(B)) * math.sqrt(0.5) elif x <= 1.3e-16: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (-1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (x <= -3.2e-107) tmp = Float64(Float64(F / Float64(F * B)) - t_0); elseif (x <= -1.5e-195) tmp = Float64(-1.0 / sin(B)); elseif (x <= 2.15e-156) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); elseif (x <= 1.3e-16) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(-1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (x <= -3.2e-107) tmp = (F / (F * B)) - t_0; elseif (x <= -1.5e-195) tmp = -1.0 / sin(B); elseif (x <= 2.15e-156) tmp = (F / sin(B)) * sqrt(0.5); elseif (x <= 1.3e-16) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (-1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e-107], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x, -1.5e-195], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.15e-156], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e-16], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{-107}:\\
\;\;\;\;\frac{F}{F \cdot B} - t_0\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-195}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-156}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-16}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\end{array}
\end{array}
if x < -3.20000000000000013e-107Initial program 73.9%
+-commutative73.9%
unsub-neg73.9%
associate-*l/93.2%
associate-*r/93.1%
*-commutative93.1%
Simplified93.3%
Taylor expanded in F around inf 72.9%
*-commutative72.9%
associate-/r*72.9%
Simplified72.9%
Taylor expanded in B around 0 71.8%
associate-/r*71.8%
Simplified71.8%
associate-/l/71.8%
un-div-inv71.8%
Applied egg-rr71.8%
if -3.20000000000000013e-107 < x < -1.5e-195Initial program 70.5%
Taylor expanded in F around -inf 49.7%
Taylor expanded in x around 0 49.7%
if -1.5e-195 < x < 2.14999999999999989e-156Initial program 79.9%
+-commutative79.9%
unsub-neg79.9%
associate-*l/81.4%
associate-*r/81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in F around 0 64.7%
Taylor expanded in x around 0 64.7%
Taylor expanded in F around inf 50.7%
associate-*r/50.7%
Simplified50.7%
if 2.14999999999999989e-156 < x < 1.2999999999999999e-16Initial program 73.0%
+-commutative73.0%
unsub-neg73.0%
associate-*l/80.7%
associate-*r/80.6%
*-commutative80.6%
Simplified80.7%
Taylor expanded in F around 0 53.1%
Taylor expanded in x around 0 53.1%
Taylor expanded in B around 0 42.2%
if 1.2999999999999999e-16 < x Initial program 87.3%
Taylor expanded in F around -inf 91.9%
expm1-log1p-u44.2%
expm1-udef44.2%
+-commutative44.2%
div-inv44.2%
Applied egg-rr44.2%
expm1-def44.2%
expm1-log1p92.0%
unsub-neg92.0%
Simplified92.0%
Taylor expanded in B around 0 94.5%
Final simplification67.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.8e-59)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.5e-50)
(- (/ (* x (cos B)) (sin B)))
(if (<= F 1.22e-5)
(* (/ F (sin B)) (sqrt 0.5))
(- (/ F (* F B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.8e-59) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.5e-50) {
tmp = -((x * cos(B)) / sin(B));
} else if (F <= 1.22e-5) {
tmp = (F / sin(B)) * sqrt(0.5);
} else {
tmp = (F / (F * 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 <= (-4.8d-59)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.5d-50) then
tmp = -((x * cos(b)) / sin(b))
else if (f <= 1.22d-5) then
tmp = (f / sin(b)) * sqrt(0.5d0)
else
tmp = (f / (f * 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 <= -4.8e-59) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.5e-50) {
tmp = -((x * Math.cos(B)) / Math.sin(B));
} else if (F <= 1.22e-5) {
tmp = (F / Math.sin(B)) * Math.sqrt(0.5);
} else {
tmp = (F / (F * B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.8e-59: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.5e-50: tmp = -((x * math.cos(B)) / math.sin(B)) elif F <= 1.22e-5: tmp = (F / math.sin(B)) * math.sqrt(0.5) else: tmp = (F / (F * B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.8e-59) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.5e-50) tmp = Float64(-Float64(Float64(x * cos(B)) / sin(B))); elseif (F <= 1.22e-5) tmp = Float64(Float64(F / sin(B)) * sqrt(0.5)); else tmp = Float64(Float64(F / Float64(F * B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.8e-59) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.5e-50) tmp = -((x * cos(B)) / sin(B)); elseif (F <= 1.22e-5) tmp = (F / sin(B)) * sqrt(0.5); else tmp = (F / (F * 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, -4.8e-59], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.5e-50], (-N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), If[LessEqual[F, 1.22e-5], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.8 \cdot 10^{-59}:\\
\;\;\;\;\frac{-1}{\sin B} - t_0\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-50}:\\
\;\;\;\;-\frac{x \cdot \cos B}{\sin B}\\
\mathbf{elif}\;F \leq 1.22 \cdot 10^{-5}:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{F}{F \cdot B} - t_0\\
\end{array}
\end{array}
if F < -4.8000000000000003e-59Initial program 72.4%
Taylor expanded in F around -inf 92.2%
expm1-log1p-u51.8%
expm1-udef51.8%
+-commutative51.8%
div-inv51.8%
Applied egg-rr51.8%
expm1-def51.8%
expm1-log1p92.3%
unsub-neg92.3%
Simplified92.3%
if -4.8000000000000003e-59 < F < 1.49999999999999995e-50Initial program 99.6%
Taylor expanded in F around -inf 32.6%
Taylor expanded in x around inf 70.4%
associate-*r/70.4%
*-commutative70.4%
associate-*r*70.4%
neg-mul-170.4%
Simplified70.4%
if 1.49999999999999995e-50 < F < 1.22000000000000001e-5Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in F around 0 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in F around inf 81.7%
associate-*r/81.7%
Simplified81.7%
if 1.22000000000000001e-5 < F Initial program 57.3%
+-commutative57.3%
unsub-neg57.3%
associate-*l/76.7%
associate-*r/76.6%
*-commutative76.6%
Simplified76.8%
Taylor expanded in F around inf 98.9%
*-commutative98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in B around 0 75.2%
associate-/r*75.2%
Simplified75.2%
associate-/l/75.2%
un-div-inv75.3%
Applied egg-rr75.3%
Final simplification79.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -8e-102)
t_0
(if (<= x -3.4e-256)
(/ -1.0 (sin B))
(if (<= x 1.22e-200)
(/ (sqrt 0.5) (/ B F))
(if (<= x 1.28e-114)
(+ (* x (* B 0.3333333333333333)) (/ (- 1.0 x) B))
(if (<= x 8.4e-17) (/ (- x) B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -8e-102) {
tmp = t_0;
} else if (x <= -3.4e-256) {
tmp = -1.0 / sin(B);
} else if (x <= 1.22e-200) {
tmp = sqrt(0.5) / (B / F);
} else if (x <= 1.28e-114) {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
} else if (x <= 8.4e-17) {
tmp = -x / B;
} else {
tmp = 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 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-8d-102)) then
tmp = t_0
else if (x <= (-3.4d-256)) then
tmp = (-1.0d0) / sin(b)
else if (x <= 1.22d-200) then
tmp = sqrt(0.5d0) / (b / f)
else if (x <= 1.28d-114) then
tmp = (x * (b * 0.3333333333333333d0)) + ((1.0d0 - x) / b)
else if (x <= 8.4d-17) then
tmp = -x / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -8e-102) {
tmp = t_0;
} else if (x <= -3.4e-256) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 1.22e-200) {
tmp = Math.sqrt(0.5) / (B / F);
} else if (x <= 1.28e-114) {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
} else if (x <= 8.4e-17) {
tmp = -x / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -8e-102: tmp = t_0 elif x <= -3.4e-256: tmp = -1.0 / math.sin(B) elif x <= 1.22e-200: tmp = math.sqrt(0.5) / (B / F) elif x <= 1.28e-114: tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B) elif x <= 8.4e-17: tmp = -x / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -8e-102) tmp = t_0; elseif (x <= -3.4e-256) tmp = Float64(-1.0 / sin(B)); elseif (x <= 1.22e-200) tmp = Float64(sqrt(0.5) / Float64(B / F)); elseif (x <= 1.28e-114) tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) + Float64(Float64(1.0 - x) / B)); elseif (x <= 8.4e-17) tmp = Float64(Float64(-x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -8e-102) tmp = t_0; elseif (x <= -3.4e-256) tmp = -1.0 / sin(B); elseif (x <= 1.22e-200) tmp = sqrt(0.5) / (B / F); elseif (x <= 1.28e-114) tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B); elseif (x <= 8.4e-17) tmp = -x / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8e-102], t$95$0, If[LessEqual[x, -3.4e-256], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.22e-200], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.28e-114], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.4e-17], N[((-x) / B), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -8 \cdot 10^{-102}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-256}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 1.22 \cdot 10^{-200}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{elif}\;x \leq 1.28 \cdot 10^{-114}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -7.99999999999999946e-102 or 8.39999999999999968e-17 < x Initial program 82.4%
Taylor expanded in F around -inf 81.3%
expm1-log1p-u40.8%
expm1-udef40.7%
+-commutative40.7%
div-inv40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p81.5%
unsub-neg81.5%
Simplified81.5%
Taylor expanded in B around 0 85.2%
if -7.99999999999999946e-102 < x < -3.4000000000000001e-256Initial program 69.1%
Taylor expanded in F around -inf 41.1%
Taylor expanded in x around 0 41.1%
if -3.4000000000000001e-256 < x < 1.22000000000000005e-200Initial program 81.3%
+-commutative81.3%
unsub-neg81.3%
associate-*l/81.2%
associate-*r/81.2%
*-commutative81.2%
Simplified81.3%
Taylor expanded in F around 0 69.2%
Taylor expanded in x around 0 59.7%
associate-/l*59.5%
Simplified59.5%
Taylor expanded in B around 0 33.5%
if 1.22000000000000005e-200 < x < 1.28e-114Initial program 61.4%
+-commutative61.4%
unsub-neg61.4%
associate-*l/73.5%
associate-*r/73.3%
*-commutative73.3%
Simplified73.4%
Taylor expanded in F around inf 60.9%
*-commutative60.9%
associate-/r*60.8%
Simplified60.8%
Taylor expanded in B around 0 42.0%
associate-/r*41.7%
Simplified41.7%
Taylor expanded in B around 0 43.2%
associate--l+43.2%
associate-*r*43.2%
div-sub43.2%
Simplified43.2%
if 1.28e-114 < x < 8.39999999999999968e-17Initial program 83.4%
+-commutative83.4%
unsub-neg83.4%
associate-*l/86.7%
associate-*r/86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in F around inf 21.3%
*-commutative21.3%
associate-/r*21.3%
Simplified21.3%
Taylor expanded in B around 0 18.6%
Taylor expanded in x around inf 35.8%
neg-mul-135.8%
distribute-neg-frac35.8%
Simplified35.8%
Final simplification62.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -1.22e+141)
t_0
(if (<= F -1.15e+29)
(/ -1.0 (sin B))
(if (<= F -2.9e-55)
(+ t_0 (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 7.8e-55)
(/ (- x) B)
(if (<= F 2.45e-9)
(/ (sqrt 0.5) (/ B F))
(+ (* x (* B 0.3333333333333333)) (/ (- 1.0 x) B)))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.22e+141) {
tmp = t_0;
} else if (F <= -1.15e+29) {
tmp = -1.0 / sin(B);
} else if (F <= -2.9e-55) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 7.8e-55) {
tmp = -x / B;
} else if (F <= 2.45e-9) {
tmp = sqrt(0.5) / (B / F);
} else {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) - x) / b
if (f <= (-1.22d+141)) then
tmp = t_0
else if (f <= (-1.15d+29)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-2.9d-55)) then
tmp = t_0 + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 7.8d-55) then
tmp = -x / b
else if (f <= 2.45d-9) then
tmp = sqrt(0.5d0) / (b / f)
else
tmp = (x * (b * 0.3333333333333333d0)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -1.22e+141) {
tmp = t_0;
} else if (F <= -1.15e+29) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -2.9e-55) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 7.8e-55) {
tmp = -x / B;
} else if (F <= 2.45e-9) {
tmp = Math.sqrt(0.5) / (B / F);
} else {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -1.22e+141: tmp = t_0 elif F <= -1.15e+29: tmp = -1.0 / math.sin(B) elif F <= -2.9e-55: tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 7.8e-55: tmp = -x / B elif F <= 2.45e-9: tmp = math.sqrt(0.5) / (B / F) else: tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -1.22e+141) tmp = t_0; elseif (F <= -1.15e+29) tmp = Float64(-1.0 / sin(B)); elseif (F <= -2.9e-55) tmp = Float64(t_0 + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 7.8e-55) tmp = Float64(Float64(-x) / B); elseif (F <= 2.45e-9) tmp = Float64(sqrt(0.5) / Float64(B / F)); else tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -1.22e+141) tmp = t_0; elseif (F <= -1.15e+29) tmp = -1.0 / sin(B); elseif (F <= -2.9e-55) tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 7.8e-55) tmp = -x / B; elseif (F <= 2.45e-9) tmp = sqrt(0.5) / (B / F); else tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -1.22e+141], t$95$0, If[LessEqual[F, -1.15e+29], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.9e-55], N[(t$95$0 + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.8e-55], N[((-x) / B), $MachinePrecision], If[LessEqual[F, 2.45e-9], N[(N[Sqrt[0.5], $MachinePrecision] / N[(B / F), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -1.22 \cdot 10^{+141}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-55}:\\
\;\;\;\;t_0 + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 7.8 \cdot 10^{-55}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{elif}\;F \leq 2.45 \cdot 10^{-9}:\\
\;\;\;\;\frac{\sqrt{0.5}}{\frac{B}{F}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.2199999999999999e141Initial program 39.5%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 52.1%
associate-*r/52.1%
distribute-lft-in52.1%
metadata-eval52.1%
neg-mul-152.1%
Simplified52.1%
if -1.2199999999999999e141 < F < -1.1500000000000001e29Initial program 95.6%
Taylor expanded in F around -inf 99.5%
Taylor expanded in x around 0 63.5%
if -1.1500000000000001e29 < F < -2.9e-55Initial program 99.4%
Taylor expanded in F around -inf 75.6%
Taylor expanded in B around 0 40.2%
if -2.9e-55 < F < 7.8e-55Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.8%
Taylor expanded in F around inf 24.8%
*-commutative24.8%
associate-/r*24.8%
Simplified24.8%
Taylor expanded in B around 0 16.1%
Taylor expanded in x around inf 37.2%
neg-mul-137.2%
distribute-neg-frac37.2%
Simplified37.2%
if 7.8e-55 < F < 2.45000000000000002e-9Initial program 99.5%
+-commutative99.5%
unsub-neg99.5%
associate-*l/99.5%
associate-*r/99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in F around 0 99.5%
Taylor expanded in x around 0 79.9%
associate-/l*79.9%
Simplified79.9%
Taylor expanded in B around 0 60.4%
if 2.45000000000000002e-9 < F Initial program 57.8%
+-commutative57.8%
unsub-neg57.8%
associate-*l/77.1%
associate-*r/77.0%
*-commutative77.0%
Simplified77.1%
Taylor expanded in F around inf 97.7%
*-commutative97.7%
associate-/r*97.7%
Simplified97.7%
Taylor expanded in B around 0 74.2%
associate-/r*74.2%
Simplified74.2%
Taylor expanded in B around 0 58.7%
associate--l+58.7%
associate-*r*58.7%
div-sub58.7%
Simplified58.7%
Final simplification49.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -2.15e-101)
t_0
(if (<= x -2.1e-257)
(/ -1.0 (sin B))
(if (<= x 9.2e-17) (/ (- (* F (sqrt 0.5)) x) B) t_0)))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -2.15e-101) {
tmp = t_0;
} else if (x <= -2.1e-257) {
tmp = -1.0 / sin(B);
} else if (x <= 9.2e-17) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = 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 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-2.15d-101)) then
tmp = t_0
else if (x <= (-2.1d-257)) then
tmp = (-1.0d0) / sin(b)
else if (x <= 9.2d-17) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -2.15e-101) {
tmp = t_0;
} else if (x <= -2.1e-257) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 9.2e-17) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -2.15e-101: tmp = t_0 elif x <= -2.1e-257: tmp = -1.0 / math.sin(B) elif x <= 9.2e-17: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -2.15e-101) tmp = t_0; elseif (x <= -2.1e-257) tmp = Float64(-1.0 / sin(B)); elseif (x <= 9.2e-17) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -2.15e-101) tmp = t_0; elseif (x <= -2.1e-257) tmp = -1.0 / sin(B); elseif (x <= 9.2e-17) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.15e-101], t$95$0, If[LessEqual[x, -2.1e-257], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.2e-17], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -2.15 \cdot 10^{-101}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-257}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 9.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -2.1499999999999999e-101 or 9.20000000000000035e-17 < x Initial program 82.4%
Taylor expanded in F around -inf 81.3%
expm1-log1p-u40.8%
expm1-udef40.7%
+-commutative40.7%
div-inv40.7%
Applied egg-rr40.7%
expm1-def40.8%
expm1-log1p81.5%
unsub-neg81.5%
Simplified81.5%
Taylor expanded in B around 0 85.2%
if -2.1499999999999999e-101 < x < -2.1000000000000001e-257Initial program 69.1%
Taylor expanded in F around -inf 41.1%
Taylor expanded in x around 0 41.1%
if -2.1000000000000001e-257 < x < 9.20000000000000035e-17Initial program 78.4%
+-commutative78.4%
unsub-neg78.4%
associate-*l/81.8%
associate-*r/81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in F around 0 59.8%
Taylor expanded in x around 0 59.8%
Taylor expanded in B around 0 36.5%
Final simplification62.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= x -3.75e-107)
(- (/ F (* F B)) t_0)
(if (<= x -3.7e-259)
(/ -1.0 (sin B))
(if (<= x 7.6e-17) (/ (- (* F (sqrt 0.5)) x) B) (- (/ -1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (x <= -3.75e-107) {
tmp = (F / (F * B)) - t_0;
} else if (x <= -3.7e-259) {
tmp = -1.0 / sin(B);
} else if (x <= 7.6e-17) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (x <= (-3.75d-107)) then
tmp = (f / (f * b)) - t_0
else if (x <= (-3.7d-259)) then
tmp = (-1.0d0) / sin(b)
else if (x <= 7.6d-17) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = ((-1.0d0) / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (x <= -3.75e-107) {
tmp = (F / (F * B)) - t_0;
} else if (x <= -3.7e-259) {
tmp = -1.0 / Math.sin(B);
} else if (x <= 7.6e-17) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (-1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if x <= -3.75e-107: tmp = (F / (F * B)) - t_0 elif x <= -3.7e-259: tmp = -1.0 / math.sin(B) elif x <= 7.6e-17: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (-1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (x <= -3.75e-107) tmp = Float64(Float64(F / Float64(F * B)) - t_0); elseif (x <= -3.7e-259) tmp = Float64(-1.0 / sin(B)); elseif (x <= 7.6e-17) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(-1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (x <= -3.75e-107) tmp = (F / (F * B)) - t_0; elseif (x <= -3.7e-259) tmp = -1.0 / sin(B); elseif (x <= 7.6e-17) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (-1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.75e-107], N[(N[(F / N[(F * B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x, -3.7e-259], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e-17], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -3.75 \cdot 10^{-107}:\\
\;\;\;\;\frac{F}{F \cdot B} - t_0\\
\mathbf{elif}\;x \leq -3.7 \cdot 10^{-259}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-17}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - t_0\\
\end{array}
\end{array}
if x < -3.75000000000000023e-107Initial program 73.9%
+-commutative73.9%
unsub-neg73.9%
associate-*l/93.2%
associate-*r/93.1%
*-commutative93.1%
Simplified93.3%
Taylor expanded in F around inf 72.9%
*-commutative72.9%
associate-/r*72.9%
Simplified72.9%
Taylor expanded in B around 0 71.8%
associate-/r*71.8%
Simplified71.8%
associate-/l/71.8%
un-div-inv71.8%
Applied egg-rr71.8%
if -3.75000000000000023e-107 < x < -3.69999999999999991e-259Initial program 70.2%
Taylor expanded in F around -inf 41.2%
Taylor expanded in x around 0 41.2%
if -3.69999999999999991e-259 < x < 7.6000000000000002e-17Initial program 78.4%
+-commutative78.4%
unsub-neg78.4%
associate-*l/81.8%
associate-*r/81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in F around 0 59.8%
Taylor expanded in x around 0 59.8%
Taylor expanded in B around 0 36.5%
if 7.6000000000000002e-17 < x Initial program 87.3%
Taylor expanded in F around -inf 91.9%
expm1-log1p-u44.2%
expm1-udef44.2%
+-commutative44.2%
div-inv44.2%
Applied egg-rr44.2%
expm1-def44.2%
expm1-log1p92.0%
unsub-neg92.0%
Simplified92.0%
Taylor expanded in B around 0 94.5%
Final simplification63.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- -1.0 x) B)))
(if (<= F -4.2e+140)
t_0
(if (<= F -1.15e+29)
(/ -1.0 (sin B))
(if (<= F -3e-55)
(+ t_0 (* B (- (* x 0.3333333333333333) 0.16666666666666666)))
(if (<= F 1.35e-136)
(/ (- x) B)
(+ (* x (* B 0.3333333333333333)) (/ (- 1.0 x) B))))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -4.2e+140) {
tmp = t_0;
} else if (F <= -1.15e+29) {
tmp = -1.0 / sin(B);
} else if (F <= -3e-55) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.35e-136) {
tmp = -x / B;
} else {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) - x) / b
if (f <= (-4.2d+140)) then
tmp = t_0
else if (f <= (-1.15d+29)) then
tmp = (-1.0d0) / sin(b)
else if (f <= (-3d-55)) then
tmp = t_0 + (b * ((x * 0.3333333333333333d0) - 0.16666666666666666d0))
else if (f <= 1.35d-136) then
tmp = -x / b
else
tmp = (x * (b * 0.3333333333333333d0)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 - x) / B;
double tmp;
if (F <= -4.2e+140) {
tmp = t_0;
} else if (F <= -1.15e+29) {
tmp = -1.0 / Math.sin(B);
} else if (F <= -3e-55) {
tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666));
} else if (F <= 1.35e-136) {
tmp = -x / B;
} else {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 - x) / B tmp = 0 if F <= -4.2e+140: tmp = t_0 elif F <= -1.15e+29: tmp = -1.0 / math.sin(B) elif F <= -3e-55: tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)) elif F <= 1.35e-136: tmp = -x / B else: tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B) return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 - x) / B) tmp = 0.0 if (F <= -4.2e+140) tmp = t_0; elseif (F <= -1.15e+29) tmp = Float64(-1.0 / sin(B)); elseif (F <= -3e-55) tmp = Float64(t_0 + Float64(B * Float64(Float64(x * 0.3333333333333333) - 0.16666666666666666))); elseif (F <= 1.35e-136) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 - x) / B; tmp = 0.0; if (F <= -4.2e+140) tmp = t_0; elseif (F <= -1.15e+29) tmp = -1.0 / sin(B); elseif (F <= -3e-55) tmp = t_0 + (B * ((x * 0.3333333333333333) - 0.16666666666666666)); elseif (F <= 1.35e-136) tmp = -x / B; else tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -4.2e+140], t$95$0, If[LessEqual[F, -1.15e+29], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3e-55], N[(t$95$0 + N[(B * N[(N[(x * 0.3333333333333333), $MachinePrecision] - 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-136], N[((-x) / B), $MachinePrecision], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1 - x}{B}\\
\mathbf{if}\;F \leq -4.2 \cdot 10^{+140}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;F \leq -1.15 \cdot 10^{+29}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq -3 \cdot 10^{-55}:\\
\;\;\;\;t_0 + B \cdot \left(x \cdot 0.3333333333333333 - 0.16666666666666666\right)\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.2000000000000004e140Initial program 39.5%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 52.1%
associate-*r/52.1%
distribute-lft-in52.1%
metadata-eval52.1%
neg-mul-152.1%
Simplified52.1%
if -4.2000000000000004e140 < F < -1.1500000000000001e29Initial program 95.6%
Taylor expanded in F around -inf 99.5%
Taylor expanded in x around 0 63.5%
if -1.1500000000000001e29 < F < -3.00000000000000016e-55Initial program 99.4%
Taylor expanded in F around -inf 75.6%
Taylor expanded in B around 0 40.2%
if -3.00000000000000016e-55 < F < 1.3499999999999999e-136Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.5%
associate-*r/99.6%
*-commutative99.6%
Simplified99.8%
Taylor expanded in F around inf 18.5%
*-commutative18.5%
associate-/r*18.5%
Simplified18.5%
Taylor expanded in B around 0 15.8%
Taylor expanded in x around inf 40.4%
neg-mul-140.4%
distribute-neg-frac40.4%
Simplified40.4%
if 1.3499999999999999e-136 < F Initial program 68.0%
+-commutative68.0%
unsub-neg68.0%
associate-*l/82.5%
associate-*r/82.4%
*-commutative82.4%
Simplified82.5%
Taylor expanded in F around inf 85.5%
*-commutative85.5%
associate-/r*85.5%
Simplified85.5%
Taylor expanded in B around 0 68.6%
associate-/r*68.5%
Simplified68.5%
Taylor expanded in B around 0 47.7%
associate--l+47.7%
associate-*r*47.7%
div-sub47.7%
Simplified47.7%
Final simplification46.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.35e-59)
(/ (- -1.0 x) B)
(if (<= F 1.35e-136)
(/ (- x) B)
(+ (* x (* B 0.3333333333333333)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.35e-136) {
tmp = -x / B;
} else {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.35d-59)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.35d-136) then
tmp = -x / b
else
tmp = (x * (b * 0.3333333333333333d0)) + ((1.0d0 - x) / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-59) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.35e-136) {
tmp = -x / B;
} else {
tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-59: tmp = (-1.0 - x) / B elif F <= 1.35e-136: tmp = -x / B else: tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-59) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.35e-136) tmp = Float64(Float64(-x) / B); else tmp = Float64(Float64(x * Float64(B * 0.3333333333333333)) + Float64(Float64(1.0 - x) / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.35e-59) tmp = (-1.0 - x) / B; elseif (F <= 1.35e-136) tmp = -x / B; else tmp = (x * (B * 0.3333333333333333)) + ((1.0 - x) / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-59], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.35e-136], N[((-x) / B), $MachinePrecision], N[(N[(x * N[(B * 0.3333333333333333), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-59}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-136}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(B \cdot 0.3333333333333333\right) + \frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.3499999999999999e-59Initial program 72.7%
Taylor expanded in F around -inf 91.1%
Taylor expanded in B around 0 44.4%
associate-*r/44.4%
distribute-lft-in44.4%
metadata-eval44.4%
neg-mul-144.4%
Simplified44.4%
if -1.3499999999999999e-59 < F < 1.3499999999999999e-136Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.8%
Taylor expanded in F around inf 18.8%
*-commutative18.8%
associate-/r*18.8%
Simplified18.8%
Taylor expanded in B around 0 16.2%
Taylor expanded in x around inf 41.3%
neg-mul-141.3%
distribute-neg-frac41.3%
Simplified41.3%
if 1.3499999999999999e-136 < F Initial program 68.0%
+-commutative68.0%
unsub-neg68.0%
associate-*l/82.5%
associate-*r/82.4%
*-commutative82.4%
Simplified82.5%
Taylor expanded in F around inf 85.5%
*-commutative85.5%
associate-/r*85.5%
Simplified85.5%
Taylor expanded in B around 0 68.6%
associate-/r*68.5%
Simplified68.5%
Taylor expanded in B around 0 47.7%
associate--l+47.7%
associate-*r*47.7%
div-sub47.7%
Simplified47.7%
Final simplification44.7%
(FPCore (F B x) :precision binary64 (if (<= F -1.75e-61) (/ (- -1.0 x) B) (if (<= F 1.1e-118) (/ (- x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-61) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-118) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.75d-61)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.1d-118) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-61) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.1e-118) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.75e-61: tmp = (-1.0 - x) / B elif F <= 1.1e-118: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-61) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.1e-118) 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 <= -1.75e-61) tmp = (-1.0 - x) / B; elseif (F <= 1.1e-118) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-61], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.1e-118], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-61}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-118}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.7500000000000002e-61Initial program 72.7%
Taylor expanded in F around -inf 91.1%
Taylor expanded in B around 0 44.4%
associate-*r/44.4%
distribute-lft-in44.4%
metadata-eval44.4%
neg-mul-144.4%
Simplified44.4%
if -1.7500000000000002e-61 < F < 1.09999999999999992e-118Initial program 99.6%
+-commutative99.6%
unsub-neg99.6%
associate-*l/99.6%
associate-*r/99.6%
*-commutative99.6%
Simplified99.8%
Taylor expanded in F around inf 19.3%
*-commutative19.3%
associate-/r*19.3%
Simplified19.3%
Taylor expanded in B around 0 15.5%
Taylor expanded in x around inf 39.5%
neg-mul-139.5%
distribute-neg-frac39.5%
Simplified39.5%
if 1.09999999999999992e-118 < F Initial program 66.6%
+-commutative66.6%
unsub-neg66.6%
associate-*l/81.8%
associate-*r/81.7%
*-commutative81.7%
Simplified81.8%
Taylor expanded in F around inf 88.0%
*-commutative88.0%
associate-/r*88.0%
Simplified88.0%
Taylor expanded in B around 0 49.0%
Final simplification44.5%
(FPCore (F B x) :precision binary64 (if (<= F 1.1e-118) (/ (- x) B) (/ (- 1.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.1e-118) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.1d-118) then
tmp = -x / b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.1e-118) {
tmp = -x / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.1e-118: tmp = -x / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.1e-118) 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 <= 1.1e-118) tmp = -x / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.1e-118], N[((-x) / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.1 \cdot 10^{-118}:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < 1.09999999999999992e-118Initial program 85.9%
+-commutative85.9%
unsub-neg85.9%
associate-*l/92.5%
associate-*r/92.5%
*-commutative92.5%
Simplified92.7%
Taylor expanded in F around inf 36.8%
*-commutative36.8%
associate-/r*36.8%
Simplified36.8%
Taylor expanded in B around 0 23.9%
Taylor expanded in x around inf 35.7%
neg-mul-135.7%
distribute-neg-frac35.7%
Simplified35.7%
if 1.09999999999999992e-118 < F Initial program 66.6%
+-commutative66.6%
unsub-neg66.6%
associate-*l/81.8%
associate-*r/81.7%
*-commutative81.7%
Simplified81.8%
Taylor expanded in F around inf 88.0%
*-commutative88.0%
associate-/r*88.0%
Simplified88.0%
Taylor expanded in B around 0 49.0%
Final simplification40.4%
(FPCore (F B x) :precision binary64 (if (<= F 76000000000000.0) (/ (- x) B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 76000000000000.0) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 76000000000000.0d0) then
tmp = -x / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 76000000000000.0) {
tmp = -x / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 76000000000000.0: tmp = -x / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 76000000000000.0) tmp = Float64(Float64(-x) / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 76000000000000.0) tmp = -x / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 76000000000000.0], N[((-x) / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 76000000000000:\\
\;\;\;\;\frac{-x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 7.6e13Initial program 87.6%
+-commutative87.6%
unsub-neg87.6%
associate-*l/93.4%
associate-*r/93.4%
*-commutative93.4%
Simplified93.6%
Taylor expanded in F around inf 39.2%
*-commutative39.2%
associate-/r*39.2%
Simplified39.2%
Taylor expanded in B around 0 24.2%
Taylor expanded in x around inf 34.2%
neg-mul-134.2%
distribute-neg-frac34.2%
Simplified34.2%
if 7.6e13 < F Initial program 54.8%
+-commutative54.8%
unsub-neg54.8%
associate-*l/75.4%
associate-*r/75.3%
*-commutative75.3%
Simplified75.4%
Taylor expanded in F around inf 99.6%
*-commutative99.6%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in B around 0 57.0%
Taylor expanded in x around 0 32.7%
Final simplification33.8%
(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.0%
+-commutative79.0%
unsub-neg79.0%
associate-*l/88.7%
associate-*r/88.7%
*-commutative88.7%
Simplified88.8%
Taylor expanded in F around inf 55.0%
*-commutative55.0%
associate-/r*55.0%
Simplified55.0%
Taylor expanded in B around 0 32.8%
Taylor expanded in x around 0 10.9%
Final simplification10.9%
herbie shell --seed 2023240
(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))))))