
(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 29 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+20)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 170000.0)
(- (* 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+20) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 170000.0) {
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+20) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 170000.0) 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+20], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 170000.0], 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^{+20}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 170000:\\
\;\;\;\;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 < -5e20Initial program 48.1%
Simplified71.5%
Taylor expanded in F around -inf 99.8%
if -5e20 < F < 1.7e5Initial program 99.5%
Simplified99.7%
if 1.7e5 < F Initial program 54.3%
Simplified75.8%
Taylor expanded in F around inf 99.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -135000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 170000.0)
(+
(* x (/ -1.0 (tan B)))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -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 <= -135000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 170000.0) {
tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= (-135000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 170000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-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 <= -135000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 170000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= -135000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 170000.0: tmp = (x * (-1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -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 <= -135000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 170000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -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 <= -135000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 170000.0) tmp = (x * (-1.0 / tan(B))) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -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, -135000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 170000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 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]), $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 -135000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 170000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.35e8Initial program 51.1%
Simplified73.1%
Taylor expanded in F around -inf 99.8%
if -1.35e8 < F < 1.7e5Initial program 99.5%
metadata-eval99.5%
metadata-eval99.5%
Applied egg-rr99.5%
if 1.7e5 < F Initial program 54.3%
Simplified75.8%
Taylor expanded in F around inf 99.9%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.48)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-6)
(- (* 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.48) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-6) {
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.48d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-6) 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.48) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-6) {
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.48: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-6: 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.48) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-6) 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.48) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-6) 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.48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-6], 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.48:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;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.48Initial program 51.1%
Simplified73.1%
Taylor expanded in F around -inf 99.8%
if -1.48 < F < 9.99999999999999955e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.48)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-6)
(- (/ F (* (sin B) (sqrt (+ 2.0 (* x 2.0))))) 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.48) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-6) {
tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - 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.48d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-6) then
tmp = (f / (sin(b) * sqrt((2.0d0 + (x * 2.0d0))))) - 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.48) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-6) {
tmp = (F / (Math.sin(B) * Math.sqrt((2.0 + (x * 2.0))))) - 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.48: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-6: tmp = (F / (math.sin(B) * math.sqrt((2.0 + (x * 2.0))))) - 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.48) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-6) tmp = Float64(Float64(F / Float64(sin(B) * sqrt(Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.48) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-6) tmp = (F / (sin(B) * sqrt((2.0 + (x * 2.0))))) - 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.48], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(F / N[(N[Sin[B], $MachinePrecision] * N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.48:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{F}{\sin B \cdot \sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.48Initial program 51.1%
Simplified73.1%
Taylor expanded in F around -inf 99.8%
if -1.48 < F < 9.99999999999999955e-7Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 99.3%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
Final simplification99.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-6)
(- (/ 1.0 (/ (sin B) (* F (sqrt 0.5)))) 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 <= 1e-6) {
tmp = (1.0 / (sin(B) / (F * sqrt(0.5)))) - 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 <= 1d-6) then
tmp = (1.0d0 / (sin(b) / (f * sqrt(0.5d0)))) - 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 <= 1e-6) {
tmp = (1.0 / (Math.sin(B) / (F * Math.sqrt(0.5)))) - 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 <= 1e-6: tmp = (1.0 / (math.sin(B) / (F * math.sqrt(0.5)))) - 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 <= 1e-6) tmp = Float64(Float64(1.0 / Float64(sin(B) / Float64(F * sqrt(0.5)))) - 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 <= 1e-6) tmp = (1.0 / (sin(B) / (F * sqrt(0.5)))) - 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, 1e-6], N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / N[(F * N[Sqrt[0.5], $MachinePrecision]), $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 10^{-6}:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F \cdot \sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 51.1%
Simplified73.1%
Taylor expanded in F around -inf 99.8%
if -1.3999999999999999 < F < 9.99999999999999955e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.1%
clear-num99.1%
inv-pow99.1%
Applied egg-rr99.1%
unpow-199.1%
Simplified99.1%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-6)
(- (/ (* 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 <= 1e-6) {
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 <= 1d-6) 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 <= 1e-6) {
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 <= 1e-6: 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 <= 1e-6) tmp = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-6) 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, 1e-6], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 51.1%
Simplified73.1%
Taylor expanded in F around -inf 99.8%
if -1.3999999999999999 < F < 9.99999999999999955e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around 0 99.1%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.1e-162)
(- (* F (* (/ 1.0 B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_0)
(if (<= F 32000.0)
(- (* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)) (/ x 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 <= -6e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.1e-162) {
tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else if (F <= 32000.0) {
tmp = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= (-6d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.1d-162) then
tmp = (f * ((1.0d0 / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_0
else if (f <= 32000.0d0) then
tmp = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / 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 <= -6e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.1e-162) {
tmp = (F * ((1.0 / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0;
} else if (F <= 32000.0) {
tmp = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= -6e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.1e-162: tmp = (F * ((1.0 / B) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0 elif F <= 32000.0: tmp = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / 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 <= -6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.1e-162) tmp = Float64(Float64(F * Float64(Float64(1.0 / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_0); elseif (F <= 32000.0) tmp = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / 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 <= -6e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.1e-162) tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_0; elseif (F <= 32000.0) tmp = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / 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, -6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.1e-162], N[(N[(F * N[(N[(1.0 / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 32000.0], 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 / B), $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 -6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.1 \cdot 10^{-162}:\\
\;\;\;\;F \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_0\\
\mathbf{elif}\;F \leq 32000:\\
\;\;\;\;\frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.00000000000000015e-5Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
if -6.00000000000000015e-5 < F < 3.0999999999999999e-162Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 87.9%
if 3.0999999999999999e-162 < F < 32000Initial program 99.3%
Taylor expanded in B around 0 87.8%
associate-*r/87.8%
neg-mul-187.8%
Simplified87.8%
metadata-eval99.3%
metadata-eval99.3%
Applied egg-rr87.8%
if 32000 < F Initial program 54.3%
Simplified75.8%
Taylor expanded in F around inf 99.9%
Final simplification94.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (sqrt 0.5))) (t_1 (/ x (tan B))))
(if (<= F -0.0074)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4.6e-132)
(- (/ t_0 (sin B)) (/ x B))
(if (<= F 2.95e-260)
(/ x (- (tan B)))
(if (<= F 1e-6)
(- (/ 1.0 (/ (sin B) t_0)) (/ x B))
(- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = F * sqrt(0.5);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.0074) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4.6e-132) {
tmp = (t_0 / sin(B)) - (x / B);
} else if (F <= 2.95e-260) {
tmp = x / -tan(B);
} else if (F <= 1e-6) {
tmp = (1.0 / (sin(B) / t_0)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f * sqrt(0.5d0)
t_1 = x / tan(b)
if (f <= (-0.0074d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4.6d-132)) then
tmp = (t_0 / sin(b)) - (x / b)
else if (f <= 2.95d-260) then
tmp = x / -tan(b)
else if (f <= 1d-6) then
tmp = (1.0d0 / (sin(b) / t_0)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * Math.sqrt(0.5);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.0074) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4.6e-132) {
tmp = (t_0 / Math.sin(B)) - (x / B);
} else if (F <= 2.95e-260) {
tmp = x / -Math.tan(B);
} else if (F <= 1e-6) {
tmp = (1.0 / (Math.sin(B) / t_0)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F * math.sqrt(0.5) t_1 = x / math.tan(B) tmp = 0 if F <= -0.0074: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4.6e-132: tmp = (t_0 / math.sin(B)) - (x / B) elif F <= 2.95e-260: tmp = x / -math.tan(B) elif F <= 1e-6: tmp = (1.0 / (math.sin(B) / t_0)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F * sqrt(0.5)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.0074) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4.6e-132) tmp = Float64(Float64(t_0 / sin(B)) - Float64(x / B)); elseif (F <= 2.95e-260) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1e-6) tmp = Float64(Float64(1.0 / Float64(sin(B) / t_0)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * sqrt(0.5); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.0074) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4.6e-132) tmp = (t_0 / sin(B)) - (x / B); elseif (F <= 2.95e-260) tmp = x / -tan(B); elseif (F <= 1e-6) tmp = (1.0 / (sin(B) / t_0)) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.0074], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4.6e-132], N[(N[(t$95$0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.95e-260], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \sqrt{0.5}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.0074:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{t\_0}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-260}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{1}{\frac{\sin B}{t\_0}} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -0.0074000000000000003Initial program 51.1%
Simplified73.1%
Taylor expanded in F around -inf 99.8%
if -0.0074000000000000003 < F < -4.60000000000000006e-132Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in x around 0 97.3%
Taylor expanded in B around 0 79.7%
if -4.60000000000000006e-132 < F < 2.95e-260Initial program 99.6%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
fma-define99.8%
fma-undefine99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 86.1%
mul-1-neg86.1%
associate-/l*86.2%
Simplified86.2%
distribute-lft-neg-in86.2%
clear-num86.0%
tan-quot86.0%
un-div-inv86.2%
Applied egg-rr86.2%
if 2.95e-260 < F < 9.99999999999999955e-7Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.5%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
Taylor expanded in B around 0 82.6%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
Final simplification92.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ (* F (sqrt 0.5)) (sin B)) (/ x B))) (t_1 (/ x (tan B))))
(if (<= F -0.076)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.2e-132)
t_0
(if (<= F 2.95e-260)
(/ x (- (tan B)))
(if (<= F 1e-6) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt(0.5)) / sin(B)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.076) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.2e-132) {
tmp = t_0;
} else if (F <= 2.95e-260) {
tmp = x / -tan(B);
} else if (F <= 1e-6) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * sqrt(0.5d0)) / sin(b)) - (x / b)
t_1 = x / tan(b)
if (f <= (-0.076d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.2d-132)) then
tmp = t_0
else if (f <= 2.95d-260) then
tmp = x / -tan(b)
else if (f <= 1d-6) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.sqrt(0.5)) / Math.sin(B)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.076) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.2e-132) {
tmp = t_0;
} else if (F <= 2.95e-260) {
tmp = x / -Math.tan(B);
} else if (F <= 1e-6) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt(0.5)) / math.sin(B)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -0.076: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.2e-132: tmp = t_0 elif F <= 2.95e-260: tmp = x / -math.tan(B) elif F <= 1e-6: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(0.5)) / sin(B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.076) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.2e-132) tmp = t_0; elseif (F <= 2.95e-260) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1e-6) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt(0.5)) / sin(B)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.076) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.2e-132) tmp = t_0; elseif (F <= 2.95e-260) tmp = x / -tan(B); elseif (F <= 1e-6) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.076], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.2e-132], t$95$0, If[LessEqual[F, 2.95e-260], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1e-6], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{0.5}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.076:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-132}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.95 \cdot 10^{-260}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -0.0759999999999999981Initial program 51.1%
Simplified73.1%
Taylor expanded in F around -inf 99.8%
if -0.0759999999999999981 < F < -2.19999999999999991e-132 or 2.95e-260 < F < 9.99999999999999955e-7Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 98.7%
Taylor expanded in B around 0 81.5%
if -2.19999999999999991e-132 < F < 2.95e-260Initial program 99.6%
Simplified99.8%
clear-num99.8%
un-div-inv99.8%
fma-define99.8%
fma-undefine99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
Applied egg-rr99.8%
Taylor expanded in F around 0 86.1%
mul-1-neg86.1%
associate-/l*86.2%
Simplified86.2%
distribute-lft-neg-in86.2%
clear-num86.0%
tan-quot86.0%
un-div-inv86.2%
Applied egg-rr86.2%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
Final simplification92.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-6)
(- (* F (* (/ 1.0 B) (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) 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 <= -6e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-6) {
tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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 <= (-6d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-6) then
tmp = (f * ((1.0d0 / b) * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - 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 <= -6e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-6) {
tmp = (F * ((1.0 / B) * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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 <= -6e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-6: tmp = (F * ((1.0 / B) * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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 <= -6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-6) tmp = Float64(Float64(F * Float64(Float64(1.0 / B) * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - 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 <= -6e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-6) tmp = (F * ((1.0 / B) * sqrt((1.0 / (2.0 + (x * 2.0)))))) - 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, -6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(F * N[(N[(1.0 / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;F \cdot \left(\frac{1}{B} \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.00000000000000015e-5Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
if -6.00000000000000015e-5 < F < 9.99999999999999955e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 84.5%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-6)
(- (* (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 <= -6e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-6) {
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 <= (-6d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-6) 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 <= -6e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-6) {
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 <= -6e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-6: 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 <= -6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-6) 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 <= -6e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-6) 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, -6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-6], 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 -6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\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 < -6.00000000000000015e-5Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
if -6.00000000000000015e-5 < F < 9.99999999999999955e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in B around 0 84.4%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7e-10)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.35e-111)
(/ x (/ (sin B) (- (cos B))))
(if (<= F 1e-6)
(/ (fma F (sqrt 0.5) (- x)) 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 <= -7e-10) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.35e-111) {
tmp = x / (sin(B) / -cos(B));
} else if (F <= 1e-6) {
tmp = fma(F, sqrt(0.5), -x) / B;
} 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 <= -7e-10) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.35e-111) tmp = Float64(x / Float64(sin(B) / Float64(-cos(B)))); elseif (F <= 1e-6) tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B); 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, -7e-10], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.35e-111], N[(x / N[(N[Sin[B], $MachinePrecision] / (-N[Cos[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $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 -7 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{\frac{\sin B}{-\cos B}}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.99999999999999961e-10Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
if -6.99999999999999961e-10 < F < 1.34999999999999994e-111Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
Simplified68.4%
distribute-lft-neg-in68.4%
clear-num68.3%
tan-quot68.3%
un-div-inv68.4%
Applied egg-rr68.4%
Taylor expanded in B around inf 68.5%
if 1.34999999999999994e-111 < F < 9.99999999999999955e-7Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
Taylor expanded in B around 0 73.6%
fma-neg73.7%
Simplified73.7%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
Final simplification86.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.7e-11)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.5e-111)
(/ x (/ (sin B) (- (cos B))))
(if (<= F 1e-6)
(/ (fma F (sqrt 0.5) (- x)) B)
(if (<= F 2e+191)
(- (/ 1.0 (sin B)) (/ x B))
(- (* F (/ 1.0 (* F B))) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.7e-11) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.5e-111) {
tmp = x / (sin(B) / -cos(B));
} else if (F <= 1e-6) {
tmp = fma(F, sqrt(0.5), -x) / B;
} else if (F <= 2e+191) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - t_0;
}
return tmp;
}
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.7e-11) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.5e-111) tmp = Float64(x / Float64(sin(B) / Float64(-cos(B)))); elseif (F <= 1e-6) tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B); elseif (F <= 2e+191) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * 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, -3.7e-11], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.5e-111], N[(x / N[(N[Sin[B], $MachinePrecision] / (-N[Cos[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2e+191], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.7 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.5 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{\frac{\sin B}{-\cos B}}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{+191}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - t\_0\\
\end{array}
\end{array}
if F < -3.7000000000000001e-11Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
if -3.7000000000000001e-11 < F < 3.5e-111Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
Simplified68.4%
distribute-lft-neg-in68.4%
clear-num68.3%
tan-quot68.3%
un-div-inv68.4%
Applied egg-rr68.4%
Taylor expanded in B around inf 68.5%
if 3.5e-111 < F < 9.99999999999999955e-7Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
Taylor expanded in B around 0 73.6%
fma-neg73.7%
Simplified73.7%
if 9.99999999999999955e-7 < F < 2.00000000000000015e191Initial program 74.3%
Taylor expanded in B around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
Taylor expanded in F around inf 94.8%
neg-mul-194.8%
+-commutative94.8%
unsub-neg94.8%
Simplified94.8%
if 2.00000000000000015e191 < F Initial program 35.4%
Simplified66.1%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 89.5%
Final simplification84.3%
(FPCore (F B x)
:precision binary64
(if (<= F -5.9e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2e-111)
(/ x (/ (sin B) (- (cos B))))
(if (<= F 1e-6)
(/ (fma F (sqrt 0.5) (- x)) B)
(if (<= F 1.02e+190)
(- (/ 1.0 (sin B)) (/ x B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.9e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2e-111) {
tmp = x / (sin(B) / -cos(B));
} else if (F <= 1e-6) {
tmp = fma(F, sqrt(0.5), -x) / B;
} else if (F <= 1.02e+190) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
function code(F, B, x) tmp = 0.0 if (F <= -5.9e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2e-111) tmp = Float64(x / Float64(sin(B) / Float64(-cos(B)))); elseif (F <= 1e-6) tmp = Float64(fma(F, sqrt(0.5), Float64(-x)) / B); elseif (F <= 1.02e+190) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
code[F_, B_, x_] := If[LessEqual[F, -5.9e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-111], N[(x / N[(N[Sin[B], $MachinePrecision] / (-N[Cos[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(F * N[Sqrt[0.5], $MachinePrecision] + (-x)), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.02e+190], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{\frac{\sin B}{-\cos B}}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{\mathsf{fma}\left(F, \sqrt{0.5}, -x\right)}{B}\\
\mathbf{elif}\;F \leq 1.02 \cdot 10^{+190}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -5.8999999999999998e-5Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 74.7%
if -5.8999999999999998e-5 < F < 2.00000000000000018e-111Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
Simplified68.4%
distribute-lft-neg-in68.4%
clear-num68.3%
tan-quot68.3%
un-div-inv68.4%
Applied egg-rr68.4%
Taylor expanded in B around inf 68.5%
if 2.00000000000000018e-111 < F < 9.99999999999999955e-7Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
Taylor expanded in B around 0 73.6%
fma-neg73.7%
Simplified73.7%
if 9.99999999999999955e-7 < F < 1.0200000000000001e190Initial program 74.3%
Taylor expanded in B around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
Taylor expanded in F around inf 94.8%
neg-mul-194.8%
+-commutative94.8%
unsub-neg94.8%
Simplified94.8%
if 1.0200000000000001e190 < F Initial program 35.4%
Simplified66.1%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 89.5%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-6)
(- (/ 1.0 (/ (/ B F) (sqrt 0.5))) 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 <= -6e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-6) {
tmp = (1.0 / ((B / F) / sqrt(0.5))) - 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 <= (-6d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-6) then
tmp = (1.0d0 / ((b / f) / sqrt(0.5d0))) - 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 <= -6e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-6) {
tmp = (1.0 / ((B / F) / Math.sqrt(0.5))) - 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 <= -6e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-6: tmp = (1.0 / ((B / F) / math.sqrt(0.5))) - 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 <= -6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-6) tmp = Float64(Float64(1.0 / Float64(Float64(B / F) / sqrt(0.5))) - 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 <= -6e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-6) tmp = (1.0 / ((B / F) / sqrt(0.5))) - 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, -6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(1.0 / N[(N[(B / F), $MachinePrecision] / N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{1}{\frac{\frac{B}{F}}{\sqrt{0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -6.00000000000000015e-5Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
if -6.00000000000000015e-5 < F < 9.99999999999999955e-7Initial program 99.5%
Simplified99.7%
Taylor expanded in F around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.4%
clear-num99.4%
inv-pow99.4%
Applied egg-rr99.4%
unpow-199.4%
Simplified99.4%
Taylor expanded in B around 0 84.4%
associate-/r*84.4%
Simplified84.4%
if 9.99999999999999955e-7 < F Initial program 56.1%
Simplified76.7%
Taylor expanded in F around inf 99.0%
(FPCore (F B x)
:precision binary64
(if (<= F -2.7e-8)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.2e-111)
(/ x (/ (sin B) (- (cos B))))
(if (<= F 1e-6)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.25e+189)
(- (/ 1.0 (sin B)) (/ x B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e-8) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.2e-111) {
tmp = x / (sin(B) / -cos(B));
} else if (F <= 1e-6) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.25e+189) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.7d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.2d-111) then
tmp = x / (sin(b) / -cos(b))
else if (f <= 1d-6) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.25d+189) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.7e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.2e-111) {
tmp = x / (Math.sin(B) / -Math.cos(B));
} else if (F <= 1e-6) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.25e+189) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.7e-8: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.2e-111: tmp = x / (math.sin(B) / -math.cos(B)) elif F <= 1e-6: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.25e+189: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.7e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.2e-111) tmp = Float64(x / Float64(sin(B) / Float64(-cos(B)))); elseif (F <= 1e-6) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.25e+189) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.7e-8) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.2e-111) tmp = x / (sin(B) / -cos(B)); elseif (F <= 1e-6) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.25e+189) tmp = (1.0 / sin(B)) - (x / B); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.7e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-111], N[(x / N[(N[Sin[B], $MachinePrecision] / (-N[Cos[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.25e+189], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.7 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{\frac{\sin B}{-\cos B}}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{+189}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.70000000000000002e-8Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 74.7%
if -2.70000000000000002e-8 < F < 3.1999999999999998e-111Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
Simplified68.4%
distribute-lft-neg-in68.4%
clear-num68.3%
tan-quot68.3%
un-div-inv68.4%
Applied egg-rr68.4%
Taylor expanded in B around inf 68.5%
if 3.1999999999999998e-111 < F < 9.99999999999999955e-7Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in B around 0 73.6%
if 9.99999999999999955e-7 < F < 1.2500000000000001e189Initial program 74.3%
Taylor expanded in B around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
Taylor expanded in F around inf 94.8%
neg-mul-194.8%
+-commutative94.8%
unsub-neg94.8%
Simplified94.8%
if 1.2500000000000001e189 < F Initial program 35.4%
Simplified66.1%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 89.5%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -2.85e-8)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.05e-110)
(/ x (- (tan B)))
(if (<= F 1e-6)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B)
(if (<= F 1.25e+189)
(- (/ 1.0 (sin B)) (/ x B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.85e-8) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.05e-110) {
tmp = x / -tan(B);
} else if (F <= 1e-6) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.25e+189) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.85d-8)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.05d-110) then
tmp = x / -tan(b)
else if (f <= 1d-6) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
else if (f <= 1.25d+189) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.85e-8) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.05e-110) {
tmp = x / -Math.tan(B);
} else if (F <= 1e-6) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
} else if (F <= 1.25e+189) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.85e-8: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.05e-110: tmp = x / -math.tan(B) elif F <= 1e-6: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B elif F <= 1.25e+189: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.85e-8) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.05e-110) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1e-6) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B); elseif (F <= 1.25e+189) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.85e-8) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.05e-110) tmp = x / -tan(B); elseif (F <= 1e-6) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; elseif (F <= 1.25e+189) tmp = (1.0 / sin(B)) - (x / B); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.85e-8], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-110], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.25e+189], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.85 \cdot 10^{-8}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-110}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{+189}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.85000000000000004e-8Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 74.7%
if -2.85000000000000004e-8 < F < 1.05000000000000001e-110Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
Simplified68.4%
distribute-lft-neg-in68.4%
clear-num68.3%
tan-quot68.3%
un-div-inv68.4%
Applied egg-rr68.4%
if 1.05000000000000001e-110 < F < 9.99999999999999955e-7Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in B around 0 73.6%
if 9.99999999999999955e-7 < F < 1.2500000000000001e189Initial program 74.3%
Taylor expanded in B around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
Taylor expanded in F around inf 94.8%
neg-mul-194.8%
+-commutative94.8%
unsub-neg94.8%
Simplified94.8%
if 1.2500000000000001e189 < F Initial program 35.4%
Simplified66.1%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 89.5%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -2.3e-10)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4e-111)
(/ x (- (tan B)))
(if (<= F 1e-6)
(/ (- (* F (sqrt 0.5)) x) B)
(if (<= F 1.3e+191)
(- (/ 1.0 (sin B)) (/ x B))
(- (* F (/ 1.0 (* F B))) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-10) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4e-111) {
tmp = x / -tan(B);
} else if (F <= 1e-6) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else if (F <= 1.3e+191) {
tmp = (1.0 / sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.3d-10)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4d-111) then
tmp = x / -tan(b)
else if (f <= 1d-6) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else if (f <= 1.3d+191) then
tmp = (1.0d0 / sin(b)) - (x / b)
else
tmp = (f * (1.0d0 / (f * b))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-10) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4e-111) {
tmp = x / -Math.tan(B);
} else if (F <= 1e-6) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else if (F <= 1.3e+191) {
tmp = (1.0 / Math.sin(B)) - (x / B);
} else {
tmp = (F * (1.0 / (F * B))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-10: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4e-111: tmp = x / -math.tan(B) elif F <= 1e-6: tmp = ((F * math.sqrt(0.5)) - x) / B elif F <= 1.3e+191: tmp = (1.0 / math.sin(B)) - (x / B) else: tmp = (F * (1.0 / (F * B))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-10) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4e-111) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1e-6) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); elseif (F <= 1.3e+191) tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(F * Float64(1.0 / Float64(F * B))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-10) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4e-111) tmp = x / -tan(B); elseif (F <= 1e-6) tmp = ((F * sqrt(0.5)) - x) / B; elseif (F <= 1.3e+191) tmp = (1.0 / sin(B)) - (x / B); else tmp = (F * (1.0 / (F * B))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-10], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-111], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.3e+191], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(F * N[(1.0 / N[(F * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{+191}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;F \cdot \frac{1}{F \cdot B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -2.30000000000000007e-10Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 74.7%
if -2.30000000000000007e-10 < F < 4.00000000000000035e-111Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
Simplified68.4%
distribute-lft-neg-in68.4%
clear-num68.3%
tan-quot68.3%
un-div-inv68.4%
Applied egg-rr68.4%
if 4.00000000000000035e-111 < F < 9.99999999999999955e-7Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
Taylor expanded in B around 0 73.6%
if 9.99999999999999955e-7 < F < 1.3e191Initial program 74.3%
Taylor expanded in B around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
Taylor expanded in F around inf 94.8%
neg-mul-194.8%
+-commutative94.8%
unsub-neg94.8%
Simplified94.8%
if 1.3e191 < F Initial program 35.4%
Simplified66.1%
Taylor expanded in F around inf 99.8%
Taylor expanded in B around 0 89.5%
Final simplification77.9%
(FPCore (F B x)
:precision binary64
(if (<= F -4.8e+223)
(/ (- -1.0 x) B)
(if (<= F -4.6e+155)
(/ -1.0 (/ (tan B) x))
(if (<= F -2.4e-5)
(/ -1.0 (sin B))
(if (<= F 2.2e-51) (/ x (- (tan B))) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e+223) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.6e+155) {
tmp = -1.0 / (tan(B) / x);
} else if (F <= -2.4e-5) {
tmp = -1.0 / sin(B);
} else if (F <= 2.2e-51) {
tmp = x / -tan(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 <= (-4.8d+223)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-4.6d+155)) then
tmp = (-1.0d0) / (tan(b) / x)
else if (f <= (-2.4d-5)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 2.2d-51) then
tmp = x / -tan(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 <= -4.8e+223) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.6e+155) {
tmp = -1.0 / (Math.tan(B) / x);
} else if (F <= -2.4e-5) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 2.2e-51) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e+223: tmp = (-1.0 - x) / B elif F <= -4.6e+155: tmp = -1.0 / (math.tan(B) / x) elif F <= -2.4e-5: tmp = -1.0 / math.sin(B) elif F <= 2.2e-51: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e+223) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -4.6e+155) tmp = Float64(-1.0 / Float64(tan(B) / x)); elseif (F <= -2.4e-5) tmp = Float64(-1.0 / sin(B)); elseif (F <= 2.2e-51) tmp = Float64(x / Float64(-tan(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 <= -4.8e+223) tmp = (-1.0 - x) / B; elseif (F <= -4.6e+155) tmp = -1.0 / (tan(B) / x); elseif (F <= -2.4e-5) tmp = -1.0 / sin(B); elseif (F <= 2.2e-51) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e+223], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -4.6e+155], N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -2.4e-5], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-51], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{+223}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -4.6 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}}\\
\mathbf{elif}\;F \leq -2.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.80000000000000022e223Initial program 5.3%
Simplified33.8%
Taylor expanded in F around -inf 99.9%
Taylor expanded in x around inf 86.5%
mul-1-neg86.5%
+-commutative86.5%
Simplified86.5%
Taylor expanded in B around 0 69.3%
associate-*r/69.3%
neg-mul-169.3%
distribute-rgt-in69.3%
*-lft-identity69.3%
lft-mult-inverse69.4%
+-commutative69.4%
distribute-neg-in69.4%
metadata-eval69.4%
unsub-neg69.4%
Simplified69.4%
if -4.80000000000000022e223 < F < -4.59999999999999996e155Initial program 52.7%
Simplified78.6%
clear-num78.6%
un-div-inv78.6%
fma-define78.6%
fma-undefine78.6%
*-commutative78.6%
fma-define78.6%
fma-define78.6%
Applied egg-rr78.6%
Taylor expanded in F around 0 78.5%
mul-1-neg78.5%
associate-/l*78.5%
Simplified78.5%
clear-num78.4%
tan-quot78.4%
div-inv78.6%
neg-mul-178.6%
clear-num78.6%
un-div-inv78.6%
Applied egg-rr78.6%
if -4.59999999999999996e155 < F < -2.4000000000000001e-5Initial program 80.8%
Simplified96.8%
Taylor expanded in F around -inf 97.3%
Taylor expanded in x around inf 81.2%
mul-1-neg81.2%
+-commutative81.2%
Simplified81.2%
Taylor expanded in x around 0 63.5%
if -2.4000000000000001e-5 < F < 2.2e-51Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 66.5%
mul-1-neg66.5%
associate-/l*66.5%
Simplified66.5%
distribute-lft-neg-in66.5%
clear-num66.4%
tan-quot66.4%
un-div-inv66.5%
Applied egg-rr66.5%
if 2.2e-51 < F Initial program 58.1%
Simplified77.8%
Taylor expanded in F around inf 94.4%
Taylor expanded in B around 0 61.9%
Final simplification65.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- (tan B)))))
(if (<= F -1.6e+221)
(/ (- -1.0 x) B)
(if (<= F -4.8e+155)
t_0
(if (<= F -6e-5)
(/ -1.0 (sin B))
(if (<= F 2.2e-51) t_0 (/ (- 1.0 x) B)))))))
double code(double F, double B, double x) {
double t_0 = x / -tan(B);
double tmp;
if (F <= -1.6e+221) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.8e+155) {
tmp = t_0;
} else if (F <= -6e-5) {
tmp = -1.0 / sin(B);
} else if (F <= 2.2e-51) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x / -tan(b)
if (f <= (-1.6d+221)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-4.8d+155)) then
tmp = t_0
else if (f <= (-6d-5)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 2.2d-51) then
tmp = t_0
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / -Math.tan(B);
double tmp;
if (F <= -1.6e+221) {
tmp = (-1.0 - x) / B;
} else if (F <= -4.8e+155) {
tmp = t_0;
} else if (F <= -6e-5) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 2.2e-51) {
tmp = t_0;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = x / -math.tan(B) tmp = 0 if F <= -1.6e+221: tmp = (-1.0 - x) / B elif F <= -4.8e+155: tmp = t_0 elif F <= -6e-5: tmp = -1.0 / math.sin(B) elif F <= 2.2e-51: tmp = t_0 else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) t_0 = Float64(x / Float64(-tan(B))) tmp = 0.0 if (F <= -1.6e+221) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -4.8e+155) tmp = t_0; elseif (F <= -6e-5) tmp = Float64(-1.0 / sin(B)); elseif (F <= 2.2e-51) tmp = t_0; else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / -tan(B); tmp = 0.0; if (F <= -1.6e+221) tmp = (-1.0 - x) / B; elseif (F <= -4.8e+155) tmp = t_0; elseif (F <= -6e-5) tmp = -1.0 / sin(B); elseif (F <= 2.2e-51) tmp = t_0; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision]}, If[LessEqual[F, -1.6e+221], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -4.8e+155], t$95$0, If[LessEqual[F, -6e-5], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-51], t$95$0, N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{-\tan B}\\
\mathbf{if}\;F \leq -1.6 \cdot 10^{+221}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -4.8 \cdot 10^{+155}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-51}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.6e221Initial program 5.3%
Simplified33.8%
Taylor expanded in F around -inf 99.9%
Taylor expanded in x around inf 86.5%
mul-1-neg86.5%
+-commutative86.5%
Simplified86.5%
Taylor expanded in B around 0 69.3%
associate-*r/69.3%
neg-mul-169.3%
distribute-rgt-in69.3%
*-lft-identity69.3%
lft-mult-inverse69.4%
+-commutative69.4%
distribute-neg-in69.4%
metadata-eval69.4%
unsub-neg69.4%
Simplified69.4%
if -1.6e221 < F < -4.80000000000000042e155 or -6.00000000000000015e-5 < F < 2.2e-51Initial program 94.7%
Simplified97.5%
clear-num97.5%
un-div-inv97.5%
fma-define97.5%
fma-undefine97.5%
*-commutative97.5%
fma-define97.5%
fma-define97.5%
Applied egg-rr97.5%
Taylor expanded in F around 0 67.7%
mul-1-neg67.7%
associate-/l*67.7%
Simplified67.7%
distribute-lft-neg-in67.7%
clear-num67.6%
tan-quot67.6%
un-div-inv67.7%
Applied egg-rr67.7%
if -4.80000000000000042e155 < F < -6.00000000000000015e-5Initial program 80.8%
Simplified96.8%
Taylor expanded in F around -inf 97.3%
Taylor expanded in x around inf 81.2%
mul-1-neg81.2%
+-commutative81.2%
Simplified81.2%
Taylor expanded in x around 0 63.5%
if 2.2e-51 < F Initial program 58.1%
Simplified77.8%
Taylor expanded in F around inf 94.4%
Taylor expanded in B around 0 61.9%
Final simplification65.4%
(FPCore (F B x)
:precision binary64
(if (<= F -3.9e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 2.9e-111)
(/ x (- (tan B)))
(if (<= F 1e-6)
(/ (- (* F (sqrt 0.5)) x) B)
(- (/ 1.0 (sin B)) (/ x B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.9e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.9e-111) {
tmp = x / -tan(B);
} else if (F <= 1e-6) {
tmp = ((F * sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.9d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.9d-111) then
tmp = x / -tan(b)
else if (f <= 1d-6) then
tmp = ((f * sqrt(0.5d0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.9e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.9e-111) {
tmp = x / -Math.tan(B);
} else if (F <= 1e-6) {
tmp = ((F * Math.sqrt(0.5)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.9e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.9e-111: tmp = x / -math.tan(B) elif F <= 1e-6: tmp = ((F * math.sqrt(0.5)) - x) / B else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.9e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.9e-111) tmp = Float64(x / Float64(-tan(B))); elseif (F <= 1e-6) tmp = Float64(Float64(Float64(F * sqrt(0.5)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.9e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.9e-111) tmp = x / -tan(B); elseif (F <= 1e-6) tmp = ((F * sqrt(0.5)) - x) / B; else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.9e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e-111], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 1e-6], N[(N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.9 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{-111}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{elif}\;F \leq 10^{-6}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.8999999999999999e-5Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 74.7%
if -3.8999999999999999e-5 < F < 2.90000000000000002e-111Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 68.4%
mul-1-neg68.4%
associate-/l*68.4%
Simplified68.4%
distribute-lft-neg-in68.4%
clear-num68.3%
tan-quot68.3%
un-div-inv68.4%
Applied egg-rr68.4%
if 2.90000000000000002e-111 < F < 9.99999999999999955e-7Initial program 99.3%
Simplified99.5%
Taylor expanded in F around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around 0 99.3%
Taylor expanded in B around 0 73.6%
if 9.99999999999999955e-7 < F Initial program 56.1%
Taylor expanded in B around 0 42.2%
associate-*r/42.2%
neg-mul-142.2%
Simplified42.2%
Taylor expanded in F around inf 85.2%
neg-mul-185.2%
+-commutative85.2%
unsub-neg85.2%
Simplified85.2%
Final simplification75.7%
(FPCore (F B x) :precision binary64 (if (<= F -6e-5) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 2.2e-51) (/ x (- (tan B))) (- (/ 1.0 (sin B)) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.2e-51) {
tmp = x / -tan(B);
} else {
tmp = (1.0 / sin(B)) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.2d-51) then
tmp = x / -tan(b)
else
tmp = (1.0d0 / sin(b)) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.2e-51) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 / Math.sin(B)) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.2e-51: tmp = x / -math.tan(B) else: tmp = (1.0 / math.sin(B)) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.2e-51) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 / sin(B)) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.2e-51) tmp = x / -tan(B); else tmp = (1.0 / sin(B)) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-51], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -6.00000000000000015e-5Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 74.7%
if -6.00000000000000015e-5 < F < 2.2e-51Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 66.5%
mul-1-neg66.5%
associate-/l*66.5%
Simplified66.5%
distribute-lft-neg-in66.5%
clear-num66.4%
tan-quot66.4%
un-div-inv66.5%
Applied egg-rr66.5%
if 2.2e-51 < F Initial program 58.1%
Taylor expanded in B around 0 44.9%
associate-*r/44.9%
neg-mul-144.9%
Simplified44.9%
Taylor expanded in F around inf 81.5%
neg-mul-181.5%
+-commutative81.5%
unsub-neg81.5%
Simplified81.5%
Final simplification73.6%
(FPCore (F B x) :precision binary64 (if (<= F -3.1e-10) (- (/ -1.0 (sin B)) (/ x B)) (if (<= F 2.2e-51) (/ x (- (tan B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-10) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 2.2e-51) {
tmp = x / -tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-3.1d-10)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 2.2d-51) then
tmp = x / -tan(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -3.1e-10) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 2.2e-51) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.1e-10: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 2.2e-51: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.1e-10) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 2.2e-51) tmp = Float64(x / Float64(-tan(B))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -3.1e-10) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 2.2e-51) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.1e-10], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-51], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.1 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -3.10000000000000015e-10Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 74.7%
if -3.10000000000000015e-10 < F < 2.2e-51Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 66.5%
mul-1-neg66.5%
associate-/l*66.5%
Simplified66.5%
distribute-lft-neg-in66.5%
clear-num66.4%
tan-quot66.4%
un-div-inv66.5%
Applied egg-rr66.5%
if 2.2e-51 < F Initial program 58.1%
Simplified77.8%
Taylor expanded in F around inf 94.4%
Taylor expanded in B around 0 61.9%
Final simplification67.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.4e-11) (- (/ -1.0 B) (/ x (tan B))) (if (<= F 2.2e-51) (/ x (- (tan B))) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.4e-11) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 2.2e-51) {
tmp = x / -tan(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.4d-11)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 2.2d-51) then
tmp = x / -tan(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.4e-11) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 2.2e-51) {
tmp = x / -Math.tan(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.4e-11: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 2.2e-51: tmp = x / -math.tan(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.4e-11) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 2.2e-51) tmp = Float64(x / Float64(-tan(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.4e-11) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 2.2e-51) tmp = x / -tan(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.4e-11], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.2e-51], N[(x / (-N[Tan[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.4e-11Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in B around 0 69.3%
if -1.4e-11 < F < 2.2e-51Initial program 99.5%
Simplified99.7%
clear-num99.7%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
Taylor expanded in F around 0 66.5%
mul-1-neg66.5%
associate-/l*66.5%
Simplified66.5%
distribute-lft-neg-in66.5%
clear-num66.4%
tan-quot66.4%
un-div-inv66.5%
Applied egg-rr66.5%
if 2.2e-51 < F Initial program 58.1%
Simplified77.8%
Taylor expanded in F around inf 94.4%
Taylor expanded in B around 0 61.9%
Final simplification65.7%
(FPCore (F B x)
:precision binary64
(if (<= F -4.2e+155)
(/ (- -1.0 x) B)
(if (<= F -1.05e-11)
(/ -1.0 (sin B))
(if (<= F 4.5e-55) (/ x (- B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.2e+155) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.05e-11) {
tmp = -1.0 / sin(B);
} else if (F <= 4.5e-55) {
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 <= (-4.2d+155)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-1.05d-11)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 4.5d-55) 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 <= -4.2e+155) {
tmp = (-1.0 - x) / B;
} else if (F <= -1.05e-11) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 4.5e-55) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.2e+155: tmp = (-1.0 - x) / B elif F <= -1.05e-11: tmp = -1.0 / math.sin(B) elif F <= 4.5e-55: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.2e+155) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -1.05e-11) tmp = Float64(-1.0 / sin(B)); elseif (F <= 4.5e-55) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.2e+155) tmp = (-1.0 - x) / B; elseif (F <= -1.05e-11) tmp = -1.0 / sin(B); elseif (F <= 4.5e-55) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.2e+155], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -1.05e-11], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.5e-55], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.2 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -1.05 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.2e155Initial program 22.0%
Simplified49.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around inf 91.1%
mul-1-neg91.1%
+-commutative91.1%
Simplified91.1%
Taylor expanded in B around 0 60.5%
associate-*r/60.5%
neg-mul-160.5%
distribute-rgt-in60.5%
*-lft-identity60.5%
lft-mult-inverse60.6%
+-commutative60.6%
distribute-neg-in60.6%
metadata-eval60.6%
unsub-neg60.6%
Simplified60.6%
if -4.2e155 < F < -1.0499999999999999e-11Initial program 81.3%
Simplified96.9%
Taylor expanded in F around -inf 95.0%
Taylor expanded in x around inf 79.3%
mul-1-neg79.3%
+-commutative79.3%
Simplified79.3%
Taylor expanded in x around 0 62.1%
if -1.0499999999999999e-11 < F < 4.4999999999999997e-55Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 20.6%
Taylor expanded in B around 0 22.5%
Taylor expanded in x around inf 40.1%
neg-mul-140.1%
Simplified40.1%
if 4.4999999999999997e-55 < F Initial program 58.1%
Simplified77.8%
Taylor expanded in F around inf 94.4%
Taylor expanded in B around 0 61.9%
Final simplification53.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.36e-11) (/ (- -1.0 x) B) (if (<= F 2.05e-51) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.36e-11) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.05e-51) {
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.36d-11)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 2.05d-51) 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.36e-11) {
tmp = (-1.0 - x) / B;
} else if (F <= 2.05e-51) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.36e-11: tmp = (-1.0 - x) / B elif F <= 2.05e-51: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.36e-11) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 2.05e-51) tmp = Float64(x / Float64(-B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.36e-11) tmp = (-1.0 - x) / B; elseif (F <= 2.05e-51) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.36e-11], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.05e-51], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.36 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-51}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.36e-11Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in x around inf 86.1%
mul-1-neg86.1%
+-commutative86.1%
Simplified86.1%
Taylor expanded in B around 0 47.1%
associate-*r/47.1%
neg-mul-147.1%
distribute-rgt-in47.1%
*-lft-identity47.1%
lft-mult-inverse47.1%
+-commutative47.1%
distribute-neg-in47.1%
metadata-eval47.1%
unsub-neg47.1%
Simplified47.1%
if -1.36e-11 < F < 2.04999999999999987e-51Initial program 99.5%
Simplified99.7%
Taylor expanded in F around inf 20.4%
Taylor expanded in B around 0 22.3%
Taylor expanded in x around inf 39.8%
neg-mul-139.8%
Simplified39.8%
if 2.04999999999999987e-51 < F Initial program 58.1%
Simplified77.8%
Taylor expanded in F around inf 94.4%
Taylor expanded in B around 0 61.9%
Final simplification48.9%
(FPCore (F B x) :precision binary64 (if (or (<= x -3.3e-187) (not (<= x 5.2e-110))) (/ x (- B)) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-187) || !(x <= 5.2e-110)) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if ((x <= (-3.3d-187)) .or. (.not. (x <= 5.2d-110))) then
tmp = x / -b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if ((x <= -3.3e-187) || !(x <= 5.2e-110)) {
tmp = x / -B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if (x <= -3.3e-187) or not (x <= 5.2e-110): tmp = x / -B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if ((x <= -3.3e-187) || !(x <= 5.2e-110)) tmp = Float64(x / Float64(-B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if ((x <= -3.3e-187) || ~((x <= 5.2e-110))) tmp = x / -B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[Or[LessEqual[x, -3.3e-187], N[Not[LessEqual[x, 5.2e-110]], $MachinePrecision]], N[(x / (-B)), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{-187} \lor \neg \left(x \leq 5.2 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if x < -3.3e-187 or 5.19999999999999979e-110 < x Initial program 73.6%
Simplified89.1%
Taylor expanded in F around inf 57.0%
Taylor expanded in B around 0 39.5%
Taylor expanded in x around inf 43.9%
neg-mul-143.9%
Simplified43.9%
if -3.3e-187 < x < 5.19999999999999979e-110Initial program 72.4%
Simplified77.6%
Taylor expanded in F around inf 34.9%
Taylor expanded in B around 0 23.3%
Taylor expanded in x around 0 23.3%
Final simplification37.5%
(FPCore (F B x) :precision binary64 (if (<= F -1.36e-11) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.36e-11) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.36d-11)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / -b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.36e-11) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.36e-11: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.36e-11) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(-B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.36e-11) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.36e-11], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.36 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -1.36e-11Initial program 51.8%
Simplified73.5%
Taylor expanded in F around -inf 98.5%
Taylor expanded in x around inf 86.1%
mul-1-neg86.1%
+-commutative86.1%
Simplified86.1%
Taylor expanded in B around 0 47.1%
associate-*r/47.1%
neg-mul-147.1%
distribute-rgt-in47.1%
*-lft-identity47.1%
lft-mult-inverse47.1%
+-commutative47.1%
distribute-neg-in47.1%
metadata-eval47.1%
unsub-neg47.1%
Simplified47.1%
if -1.36e-11 < F Initial program 81.1%
Simplified90.0%
Taylor expanded in F around inf 53.3%
Taylor expanded in B around 0 39.9%
Taylor expanded in x around inf 37.2%
neg-mul-137.2%
Simplified37.2%
Final simplification39.9%
(FPCore (F B x) :precision binary64 (/ 1.0 B))
double code(double F, double B, double x) {
return 1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = 1.0d0 / b
end function
public static double code(double F, double B, double x) {
return 1.0 / B;
}
def code(F, B, x): return 1.0 / B
function code(F, B, x) return Float64(1.0 / B) end
function tmp = code(F, B, x) tmp = 1.0 / B; end
code[F_, B_, x_] := N[(1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{B}
\end{array}
Initial program 73.2%
Simplified85.5%
Taylor expanded in F around inf 50.1%
Taylor expanded in B around 0 34.5%
Taylor expanded in x around 0 11.4%
herbie shell --seed 2024125
(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))))))