
(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 23 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 -8.5e+153)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 135000000.0)
(- (/ F (/ (sin B) (pow (fma 2.0 x (fma F F 2.0)) -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 <= -8.5e+153) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 135000000.0) {
tmp = (F / (sin(B) / pow(fma(2.0, x, fma(F, F, 2.0)), -0.5))) - 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 <= -8.5e+153) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 135000000.0) tmp = Float64(Float64(F / Float64(sin(B) / (fma(2.0, x, fma(F, F, 2.0)) ^ -0.5))) - 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, -8.5e+153], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 135000000.0], N[(N[(F / N[(N[Sin[B], $MachinePrecision] / N[Power[N[(2.0 * x + N[(F * F + 2.0), $MachinePrecision]), $MachinePrecision], -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 -8.5 \cdot 10^{+153}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 135000000:\\
\;\;\;\;\frac{F}{\frac{\sin B}{{\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{-0.5}}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -8.49999999999999935e153Initial program 39.0%
Simplified59.5%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -8.49999999999999935e153 < F < 1.35e8Initial program 99.3%
Simplified99.6%
clear-num99.6%
un-div-inv99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
Applied egg-rr99.7%
if 1.35e8 < F Initial program 63.1%
Simplified77.0%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e+145)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 500000000000.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 <= -2.4e+145) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 500000000000.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 <= -2.4e+145) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 500000000000.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, -2.4e+145], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 500000000000.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 -2.4 \cdot 10^{+145}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 500000000000:\\
\;\;\;\;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 < -2.39999999999999992e145Initial program 39.0%
Simplified59.5%
Taylor expanded in F around -inf 99.7%
div-inv99.8%
Applied egg-rr99.8%
if -2.39999999999999992e145 < F < 5e11Initial program 99.3%
Simplified99.6%
if 5e11 < F Initial program 62.6%
Simplified76.7%
Taylor expanded in F around inf 99.8%
(FPCore (F B x)
:precision binary64
(if (<= F -6.2e+124)
(- (/ -1.0 (sin B)) (* x (/ 1.0 (tan B))))
(if (<= F 1.95e+35)
(+
(/ -1.0 (/ (tan B) x))
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5)))
(- (/ 1.0 (sin B)) (/ x (tan B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+124) {
tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B)));
} else if (F <= 1.95e+35) {
tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / sin(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 <= (-6.2d+124)) then
tmp = ((-1.0d0) / sin(b)) - (x * (1.0d0 / tan(b)))
else if (f <= 1.95d+35) then
tmp = ((-1.0d0) / (tan(b) / x)) + ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)))
else
tmp = (1.0d0 / sin(b)) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.2e+124) {
tmp = (-1.0 / Math.sin(B)) - (x * (1.0 / Math.tan(B)));
} else if (F <= 1.95e+35) {
tmp = (-1.0 / (Math.tan(B) / x)) + ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5));
} else {
tmp = (1.0 / Math.sin(B)) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.2e+124: tmp = (-1.0 / math.sin(B)) - (x * (1.0 / math.tan(B))) elif F <= 1.95e+35: tmp = (-1.0 / (math.tan(B) / x)) + ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) else: tmp = (1.0 / math.sin(B)) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.2e+124) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x * Float64(1.0 / tan(B)))); elseif (F <= 1.95e+35) tmp = Float64(Float64(-1.0 / Float64(tan(B) / x)) + 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)) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.2e+124) tmp = (-1.0 / sin(B)) - (x * (1.0 / tan(B))); elseif (F <= 1.95e+35) tmp = (-1.0 / (tan(B) / x)) + ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)); else tmp = (1.0 / sin(B)) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.2e+124], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.95e+35], N[(N[(-1.0 / N[(N[Tan[B], $MachinePrecision] / x), $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] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.2 \cdot 10^{+124}:\\
\;\;\;\;\frac{-1}{\sin B} - x \cdot \frac{1}{\tan B}\\
\mathbf{elif}\;F \leq 1.95 \cdot 10^{+35}:\\
\;\;\;\;\frac{-1}{\frac{\tan B}{x}} + \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -6.2000000000000004e124Initial program 46.1%
Simplified64.3%
Taylor expanded in F around -inf 99.8%
div-inv99.8%
Applied egg-rr99.8%
if -6.2000000000000004e124 < F < 1.95e35Initial program 99.4%
div-inv99.6%
neg-mul-199.6%
clear-num99.5%
un-div-inv99.5%
Applied egg-rr99.5%
if 1.95e35 < F Initial program 59.9%
Simplified75.0%
Taylor expanded in F around inf 99.8%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ 1.0 (sin B))) (t_1 (/ x (tan B))))
(if (<= F -170.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 1.42)
(- (* F (* t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))))) t_1)
(- t_0 t_1)))))
double code(double F, double B, double x) {
double t_0 = 1.0 / sin(B);
double t_1 = x / tan(B);
double tmp;
if (F <= -170.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 1.42) {
tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - 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 = 1.0d0 / sin(b)
t_1 = x / tan(b)
if (f <= (-170.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 1.42d0) then
tmp = (f * (t_0 * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))))) - t_1
else
tmp = t_0 - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 1.0 / Math.sin(B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -170.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 1.42) {
tmp = (F * (t_0 * Math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1;
} else {
tmp = t_0 - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 1.0 / math.sin(B) t_1 = x / math.tan(B) tmp = 0 if F <= -170.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 1.42: tmp = (F * (t_0 * math.sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1 else: tmp = t_0 - t_1 return tmp
function code(F, B, x) t_0 = Float64(1.0 / sin(B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -170.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(t_0 * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))))) - t_1); else tmp = Float64(t_0 - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 1.0 / sin(B); t_1 = x / tan(B); tmp = 0.0; if (F <= -170.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 1.42) tmp = (F * (t_0 * sqrt((1.0 / (2.0 + (x * 2.0)))))) - t_1; else tmp = t_0 - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -170.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(t$95$0 * N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t$95$0 - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -170:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \left(t\_0 \cdot \sqrt{\frac{1}{2 + x \cdot 2}}\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - t\_1\\
\end{array}
\end{array}
if F < -170Initial program 65.1%
Simplified76.9%
Taylor expanded in F around -inf 99.7%
if -170 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 98.8%
if 1.4199999999999999 < F Initial program 63.6%
Simplified77.3%
Taylor expanded in F around inf 99.2%
Final simplification99.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -170.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* F (/ (/ 1.0 (sqrt (+ 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 <= -170.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * ((1.0 / sqrt((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 <= (-170.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = (f * ((1.0d0 / sqrt((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 <= -170.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * ((1.0 / Math.sqrt((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 <= -170.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = (F * ((1.0 / math.sqrt((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 <= -170.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(Float64(1.0 / sqrt(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 <= -170.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = (F * ((1.0 / sqrt((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, -170.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[(1.0 / N[Sqrt[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 -170:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\frac{1}{\sqrt{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -170Initial program 65.1%
Simplified76.9%
Taylor expanded in F around -inf 99.7%
if -170 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
fma-define99.6%
fma-undefine99.6%
*-commutative99.6%
+-commutative99.6%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
metadata-eval99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
Applied egg-rr99.7%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 98.8%
*-commutative98.8%
Simplified98.8%
if 1.4199999999999999 < F Initial program 63.6%
Simplified77.3%
Taylor expanded in F around inf 99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -170.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.42)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -170.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-170.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.42d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -170.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.42) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -170.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.42: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -170.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.42) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -170.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.42) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -170.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -170:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -170Initial program 65.1%
Simplified76.9%
Taylor expanded in F around -inf 99.7%
if -170 < F < 1.4199999999999999Initial program 99.4%
Simplified99.6%
Taylor expanded in F around 0 98.8%
*-commutative98.8%
Simplified98.8%
if 1.4199999999999999 < F Initial program 63.6%
Simplified77.3%
Taylor expanded in F around inf 99.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* (/ F (sin B)) (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -165.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.25e-239)
t_0
(if (<= F 1e-85)
(* (cos B) (/ x (- (sin B))))
(if (<= F 700000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) * pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -165.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.25e-239) {
tmp = t_0;
} else if (F <= 1e-85) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 700000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f / sin(b)) * (((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0))) - (x / b)
t_1 = x / tan(b)
if (f <= (-165.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.25d-239)) then
tmp = t_0
else if (f <= 1d-85) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 700000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sin(B)) * Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -165.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.25e-239) {
tmp = t_0;
} else if (F <= 1e-85) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 700000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sin(B)) * math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -165.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.25e-239: tmp = t_0 elif F <= 1e-85: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 700000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) * (Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -165.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.25e-239) tmp = t_0; elseif (F <= 1e-85) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 700000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sin(B)) * (((2.0 + (F * F)) + (x * 2.0)) ^ -0.5)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -165.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.25e-239) tmp = t_0; elseif (F <= 1e-85) tmp = cos(B) * (x / -sin(B)); elseif (F <= 700000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -165.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.25e-239], t$95$0, If[LessEqual[F, 1e-85], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 700000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -165:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-239}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 10^{-85}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 700000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -165Initial program 65.7%
Simplified77.3%
Taylor expanded in F around -inf 99.7%
if -165 < F < -1.25e-239 or 9.9999999999999998e-86 < F < 7e5Initial program 99.3%
Taylor expanded in B around 0 79.7%
associate-*r/79.7%
neg-mul-179.7%
Simplified79.7%
if -1.25e-239 < F < 9.9999999999999998e-86Initial program 99.5%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.7%
metadata-eval99.7%
metadata-eval99.7%
unpow-prod-down99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
metadata-eval99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
Applied egg-rr99.7%
pow-sqr99.7%
metadata-eval99.7%
unpow-199.7%
fma-undefine99.7%
*-commutative99.7%
fma-undefine99.7%
unpow299.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 86.3%
mul-1-neg86.3%
*-commutative86.3%
associate-*r/86.4%
distribute-rgt-neg-in86.4%
distribute-neg-frac86.4%
Simplified86.4%
if 7e5 < F Initial program 63.1%
Simplified77.0%
Taylor expanded in F around inf 99.8%
Final simplification91.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -13000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 9000.0)
(+
(* x (/ -1.0 (tan B)))
(* (pow (+ (+ 2.0 (* F F)) (* x 2.0)) -0.5) (/ F B)))
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -13000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 9000.0) {
tmp = (x * (-1.0 / tan(B))) + (pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-13000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 9000.0d0) then
tmp = (x * ((-1.0d0) / tan(b))) + ((((2.0d0 + (f * f)) + (x * 2.0d0)) ** (-0.5d0)) * (f / b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -13000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 9000.0) {
tmp = (x * (-1.0 / Math.tan(B))) + (Math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -13000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 9000.0: tmp = (x * (-1.0 / math.tan(B))) + (math.pow(((2.0 + (F * F)) + (x * 2.0)), -0.5) * (F / B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -13000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 9000.0) tmp = Float64(Float64(x * Float64(-1.0 / tan(B))) + Float64((Float64(Float64(2.0 + Float64(F * F)) + Float64(x * 2.0)) ^ -0.5) * Float64(F / B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -13000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 9000.0) tmp = (x * (-1.0 / tan(B))) + ((((2.0 + (F * F)) + (x * 2.0)) ^ -0.5) * (F / B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -13000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 9000.0], N[(N[(x * N[(-1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[N[(N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -13000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 9000:\\
\;\;\;\;x \cdot \frac{-1}{\tan B} + {\left(\left(2 + F \cdot F\right) + x \cdot 2\right)}^{-0.5} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -13000Initial program 65.1%
Simplified76.9%
Taylor expanded in F around -inf 99.7%
if -13000 < F < 9e3Initial program 99.4%
Taylor expanded in B around 0 85.5%
if 9e3 < F Initial program 63.1%
Simplified77.0%
Taylor expanded in F around inf 99.8%
Final simplification92.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.018)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -1.76e-106)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* x 2.0) (pow F 2.0)))))) x) B)
(if (<= F 1e-86)
(* (cos B) (/ x (- (sin B))))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.018) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -1.76e-106) {
tmp = ((F * sqrt((1.0 / (2.0 + ((x * 2.0) + pow(F, 2.0)))))) - x) / B;
} else if (F <= 1e-86) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.018d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-1.76d-106)) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((x * 2.0d0) + (f ** 2.0d0)))))) - x) / b
else if (f <= 1d-86) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.018) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -1.76e-106) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((x * 2.0) + Math.pow(F, 2.0)))))) - x) / B;
} else if (F <= 1e-86) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.018: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -1.76e-106: tmp = ((F * math.sqrt((1.0 / (2.0 + ((x * 2.0) + math.pow(F, 2.0)))))) - x) / B elif F <= 1e-86: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.018) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -1.76e-106) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(x * 2.0) + (F ^ 2.0)))))) - x) / B); elseif (F <= 1e-86) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.018) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -1.76e-106) tmp = ((F * sqrt((1.0 / (2.0 + ((x * 2.0) + (F ^ 2.0)))))) - x) / B; elseif (F <= 1e-86) tmp = cos(B) * (x / -sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.018], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -1.76e-106], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(x * 2.0), $MachinePrecision] + N[Power[F, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1e-86], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.018:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -1.76 \cdot 10^{-106}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(x \cdot 2 + {F}^{2}\right)}} - x}{B}\\
\mathbf{elif}\;F \leq 10^{-86}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.0179999999999999986Initial program 65.7%
Simplified77.3%
Taylor expanded in F around -inf 99.7%
if -0.0179999999999999986 < F < -1.7600000000000001e-106Initial program 99.3%
Simplified99.5%
Taylor expanded in B around 0 74.3%
if -1.7600000000000001e-106 < F < 1.00000000000000008e-86Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.7%
metadata-eval99.7%
metadata-eval99.7%
unpow-prod-down99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
metadata-eval99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
Applied egg-rr99.7%
pow-sqr99.7%
metadata-eval99.7%
unpow-199.7%
fma-undefine99.7%
*-commutative99.7%
fma-undefine99.7%
unpow299.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 79.1%
mul-1-neg79.1%
*-commutative79.1%
associate-*r/79.2%
distribute-rgt-neg-in79.2%
distribute-neg-frac79.2%
Simplified79.2%
if 1.00000000000000008e-86 < F Initial program 69.6%
Simplified81.0%
Taylor expanded in F around inf 90.2%
Final simplification86.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.6e+182)
(- (/ -1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) t_0)
(if (<= F -10500.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6e-27)
(* (cos B) (/ x (- (sin B))))
(if (<= F 1.25e+155)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.6e+182) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
} else if (F <= -10500.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6e-27) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 1.25e+155) {
tmp = (F * ((1.0 / F) / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.6d+182)) then
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - t_0
else if (f <= (-10500.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 6d-27) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 1.25d+155) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.6e+182) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
} else if (F <= -10500.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 6e-27) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 1.25e+155) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.6e+182: tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0 elif F <= -10500.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 6e-27: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 1.25e+155: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.6e+182) tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - t_0); elseif (F <= -10500.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6e-27) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 1.25e+155) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.6e+182) tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0; elseif (F <= -10500.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 6e-27) tmp = cos(B) * (x / -sin(B)); elseif (F <= 1.25e+155) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.6e+182], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -10500.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-27], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e+155], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.6 \cdot 10^{+182}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - t\_0\\
\mathbf{elif}\;F \leq -10500:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-27}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{+155}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -2.6e182Initial program 42.7%
Simplified63.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 88.5%
*-commutative88.5%
Simplified88.5%
unpow288.5%
Applied egg-rr88.5%
if -2.6e182 < F < -10500Initial program 85.1%
Simplified89.2%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 81.8%
if -10500 < F < 6.0000000000000002e-27Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 71.1%
mul-1-neg71.1%
*-commutative71.1%
associate-*r/71.1%
distribute-rgt-neg-in71.1%
distribute-neg-frac71.1%
Simplified71.1%
if 6.0000000000000002e-27 < F < 1.25e155Initial program 94.2%
Simplified96.8%
Taylor expanded in F around inf 91.1%
Taylor expanded in B around 0 76.4%
if 1.25e155 < F Initial program 42.6%
Simplified63.8%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 83.8%
Final simplification76.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.2e+184)
(- (/ -1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) t_0)
(if (<= F -170.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 6e-27)
(* x (/ (cos B) (- (sin B))))
(if (<= F 1.5e+155)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) t_0)))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3.2e+184) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
} else if (F <= -170.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 6e-27) {
tmp = x * (cos(B) / -sin(B));
} else if (F <= 1.5e+155) {
tmp = (F * ((1.0 / F) / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3.2d+184)) then
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - t_0
else if (f <= (-170.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 6d-27) then
tmp = x * (cos(b) / -sin(b))
else if (f <= 1.5d+155) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3.2e+184) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
} else if (F <= -170.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 6e-27) {
tmp = x * (Math.cos(B) / -Math.sin(B));
} else if (F <= 1.5e+155) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3.2e+184: tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0 elif F <= -170.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 6e-27: tmp = x * (math.cos(B) / -math.sin(B)) elif F <= 1.5e+155: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3.2e+184) tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - t_0); elseif (F <= -170.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 6e-27) tmp = Float64(x * Float64(cos(B) / Float64(-sin(B)))); elseif (F <= 1.5e+155) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3.2e+184) tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0; elseif (F <= -170.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 6e-27) tmp = x * (cos(B) / -sin(B)); elseif (F <= 1.5e+155) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.2e+184], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -170.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6e-27], N[(x * N[(N[Cos[B], $MachinePrecision] / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e+155], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.2 \cdot 10^{+184}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - t\_0\\
\mathbf{elif}\;F \leq -170:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-27}:\\
\;\;\;\;x \cdot \frac{\cos B}{-\sin B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{+155}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -3.19999999999999983e184Initial program 42.7%
Simplified63.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 88.5%
*-commutative88.5%
Simplified88.5%
unpow288.5%
Applied egg-rr88.5%
if -3.19999999999999983e184 < F < -170Initial program 85.1%
Simplified89.2%
Taylor expanded in F around -inf 99.6%
Taylor expanded in B around 0 81.8%
if -170 < F < 6.0000000000000002e-27Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 71.1%
mul-1-neg71.1%
associate-/l*71.0%
distribute-rgt-neg-in71.0%
distribute-neg-frac271.0%
Simplified71.0%
if 6.0000000000000002e-27 < F < 1.5000000000000001e155Initial program 94.2%
Simplified96.8%
Taylor expanded in F around inf 91.1%
Taylor expanded in B around 0 76.4%
if 1.5000000000000001e155 < F Initial program 42.6%
Simplified63.8%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 83.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1e-86) (* (cos B) (/ x (- (sin B)))) (- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.4e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1e-86) {
tmp = cos(B) * (x / -sin(B));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.4d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1d-86) then
tmp = cos(b) * (x / -sin(b))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.4e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1e-86) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.4e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1e-86: tmp = math.cos(B) * (x / -math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.4e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1e-86) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.4e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1e-86) tmp = cos(B) * (x / -sin(B)); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.4e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1e-86], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10^{-86}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.3999999999999999e-13Initial program 69.6%
Simplified79.9%
Taylor expanded in F around -inf 92.5%
if -2.3999999999999999e-13 < F < 1.00000000000000008e-86Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 76.2%
mul-1-neg76.2%
*-commutative76.2%
associate-*r/76.3%
distribute-rgt-neg-in76.3%
distribute-neg-frac76.3%
Simplified76.3%
if 1.00000000000000008e-86 < F Initial program 69.6%
Simplified81.0%
Taylor expanded in F around inf 90.2%
Final simplification85.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3e-13)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6e-27)
(* (cos B) (/ x (- (sin B))))
(if (<= F 7.2e+154)
(- (* F (/ (/ 1.0 F) (sin B))) (/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -3e-13) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6e-27) {
tmp = cos(B) * (x / -sin(B));
} else if (F <= 7.2e+154) {
tmp = (F * ((1.0 / F) / sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-3d-13)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6d-27) then
tmp = cos(b) * (x / -sin(b))
else if (f <= 7.2d+154) then
tmp = (f * ((1.0d0 / f) / sin(b))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -3e-13) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6e-27) {
tmp = Math.cos(B) * (x / -Math.sin(B));
} else if (F <= 7.2e+154) {
tmp = (F * ((1.0 / F) / Math.sin(B))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -3e-13: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6e-27: tmp = math.cos(B) * (x / -math.sin(B)) elif F <= 7.2e+154: tmp = (F * ((1.0 / F) / math.sin(B))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -3e-13) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6e-27) tmp = Float64(cos(B) * Float64(x / Float64(-sin(B)))); elseif (F <= 7.2e+154) tmp = Float64(Float64(F * Float64(Float64(1.0 / F) / sin(B))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -3e-13) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6e-27) tmp = cos(B) * (x / -sin(B)); elseif (F <= 7.2e+154) tmp = (F * ((1.0 / F) / sin(B))) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6e-27], N[(N[Cos[B], $MachinePrecision] * N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7.2e+154], N[(N[(F * N[(N[(1.0 / F), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-27}:\\
\;\;\;\;\cos B \cdot \frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 7.2 \cdot 10^{+154}:\\
\;\;\;\;F \cdot \frac{\frac{1}{F}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -2.99999999999999984e-13Initial program 69.6%
Simplified79.9%
Taylor expanded in F around -inf 92.5%
if -2.99999999999999984e-13 < F < 6.0000000000000002e-27Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 73.2%
mul-1-neg73.2%
*-commutative73.2%
associate-*r/73.3%
distribute-rgt-neg-in73.3%
distribute-neg-frac73.3%
Simplified73.3%
if 6.0000000000000002e-27 < F < 7.2000000000000001e154Initial program 94.2%
Simplified96.8%
Taylor expanded in F around inf 91.1%
Taylor expanded in B around 0 76.4%
if 7.2000000000000001e154 < F Initial program 42.6%
Simplified63.8%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 83.8%
Final simplification80.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= x -7e-31)
t_0
(if (<= x -6.2e-275)
(* (/ x B) (- (cos B)))
(if (<= x 6e-74)
(/ 1.0 (sin B))
(if (<= x 3.9e-9) (/ -1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -7e-31) {
tmp = t_0;
} else if (x <= -6.2e-275) {
tmp = (x / B) * -cos(B);
} else if (x <= 6e-74) {
tmp = 1.0 / sin(B);
} else if (x <= 3.9e-9) {
tmp = -1.0 / sin(B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-7d-31)) then
tmp = t_0
else if (x <= (-6.2d-275)) then
tmp = (x / b) * -cos(b)
else if (x <= 6d-74) then
tmp = 1.0d0 / sin(b)
else if (x <= 3.9d-9) then
tmp = (-1.0d0) / sin(b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -7e-31) {
tmp = t_0;
} else if (x <= -6.2e-275) {
tmp = (x / B) * -Math.cos(B);
} else if (x <= 6e-74) {
tmp = 1.0 / Math.sin(B);
} else if (x <= 3.9e-9) {
tmp = -1.0 / Math.sin(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -7e-31: tmp = t_0 elif x <= -6.2e-275: tmp = (x / B) * -math.cos(B) elif x <= 6e-74: tmp = 1.0 / math.sin(B) elif x <= 3.9e-9: tmp = -1.0 / math.sin(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -7e-31) tmp = t_0; elseif (x <= -6.2e-275) tmp = Float64(Float64(x / B) * Float64(-cos(B))); elseif (x <= 6e-74) tmp = Float64(1.0 / sin(B)); elseif (x <= 3.9e-9) tmp = Float64(-1.0 / sin(B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -7e-31) tmp = t_0; elseif (x <= -6.2e-275) tmp = (x / B) * -cos(B); elseif (x <= 6e-74) tmp = 1.0 / sin(B); elseif (x <= 3.9e-9) tmp = -1.0 / sin(B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7e-31], t$95$0, If[LessEqual[x, -6.2e-275], N[(N[(x / B), $MachinePrecision] * (-N[Cos[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[x, 6e-74], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e-9], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -7 \cdot 10^{-31}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-275}:\\
\;\;\;\;\frac{x}{B} \cdot \left(-\cos B\right)\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-74}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.99999999999999971e-31 or 3.9000000000000002e-9 < x Initial program 83.7%
Simplified96.0%
Taylor expanded in F around -inf 91.5%
Taylor expanded in B around 0 92.2%
if -6.99999999999999971e-31 < x < -6.200000000000001e-275Initial program 88.6%
Simplified90.4%
fma-define90.4%
fma-undefine90.4%
*-commutative90.4%
+-commutative90.4%
add-sqr-sqrt90.5%
metadata-eval90.5%
metadata-eval90.5%
unpow-prod-down90.5%
+-commutative90.5%
fma-define90.5%
fma-define90.5%
metadata-eval90.5%
metadata-eval90.5%
+-commutative90.5%
fma-define90.5%
fma-define90.5%
metadata-eval90.5%
Applied egg-rr90.5%
pow-sqr90.5%
metadata-eval90.5%
unpow-190.5%
fma-undefine90.5%
*-commutative90.5%
fma-undefine90.5%
unpow290.5%
+-commutative90.5%
fma-define90.5%
+-commutative90.5%
unpow290.5%
fma-undefine90.5%
Simplified90.5%
Taylor expanded in F around 0 45.6%
mul-1-neg45.6%
*-commutative45.6%
associate-*r/45.7%
distribute-rgt-neg-in45.7%
distribute-neg-frac45.7%
Simplified45.7%
Taylor expanded in B around 0 38.4%
if -6.200000000000001e-275 < x < 6.00000000000000014e-74Initial program 73.8%
Simplified74.2%
Taylor expanded in F around inf 35.6%
Taylor expanded in B around 0 35.6%
Taylor expanded in B around inf 35.7%
if 6.00000000000000014e-74 < x < 3.9000000000000002e-9Initial program 76.2%
Simplified77.5%
Taylor expanded in F around -inf 57.2%
Taylor expanded in x around inf 49.7%
mul-1-neg49.7%
*-commutative49.7%
distribute-rgt-neg-in49.7%
+-commutative49.7%
associate-/r*49.9%
Simplified49.9%
Taylor expanded in x around 0 57.2%
Final simplification65.0%
(FPCore (F B x)
:precision binary64
(if (<= F -9.5e+175)
(/ (- -1.0 x) B)
(if (<= F -180.0)
(/ -1.0 (sin B))
(if (<= F 1.35e-10)
(/ x (- (sin B)))
(if (<= F 9.5e+154) (/ 1.0 (sin B)) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e+175) {
tmp = (-1.0 - x) / B;
} else if (F <= -180.0) {
tmp = -1.0 / sin(B);
} else if (F <= 1.35e-10) {
tmp = x / -sin(B);
} else if (F <= 9.5e+154) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-9.5d+175)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-180.0d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.35d-10) then
tmp = x / -sin(b)
else if (f <= 9.5d+154) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -9.5e+175) {
tmp = (-1.0 - x) / B;
} else if (F <= -180.0) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.35e-10) {
tmp = x / -Math.sin(B);
} else if (F <= 9.5e+154) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -9.5e+175: tmp = (-1.0 - x) / B elif F <= -180.0: tmp = -1.0 / math.sin(B) elif F <= 1.35e-10: tmp = x / -math.sin(B) elif F <= 9.5e+154: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -9.5e+175) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -180.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.35e-10) tmp = Float64(x / Float64(-sin(B))); elseif (F <= 9.5e+154) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -9.5e+175) tmp = (-1.0 - x) / B; elseif (F <= -180.0) tmp = -1.0 / sin(B); elseif (F <= 1.35e-10) tmp = x / -sin(B); elseif (F <= 9.5e+154) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -9.5e+175], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -180.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-10], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], If[LessEqual[F, 9.5e+154], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -9.5 \cdot 10^{+175}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -180:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -9.5000000000000006e175Initial program 41.7%
Simplified63.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around inf 89.5%
mul-1-neg89.5%
*-commutative89.5%
distribute-rgt-neg-in89.5%
+-commutative89.5%
associate-/r*89.5%
Simplified89.5%
Taylor expanded in B around 0 54.9%
associate-*r/54.9%
mul-1-neg54.9%
neg-sub054.9%
+-commutative54.9%
distribute-lft-in54.9%
rgt-mult-inverse54.9%
*-rgt-identity54.9%
associate--r+54.9%
metadata-eval54.9%
Simplified54.9%
if -9.5000000000000006e175 < F < -180Initial program 91.2%
Simplified91.8%
Taylor expanded in F around -inf 99.6%
Taylor expanded in x around inf 87.8%
mul-1-neg87.8%
*-commutative87.8%
distribute-rgt-neg-in87.8%
+-commutative87.8%
associate-/r*87.8%
Simplified87.8%
Taylor expanded in x around 0 63.7%
if -180 < F < 1.35e-10Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*r/70.5%
distribute-rgt-neg-in70.5%
distribute-neg-frac70.5%
Simplified70.5%
Taylor expanded in B around inf 70.5%
associate-*r/70.5%
*-commutative70.5%
neg-mul-170.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
Taylor expanded in B around 0 45.4%
mul-1-neg45.4%
Simplified45.4%
if 1.35e-10 < F < 9.5000000000000001e154Initial program 93.6%
Simplified96.5%
Taylor expanded in F around inf 95.7%
Taylor expanded in B around 0 79.1%
Taylor expanded in B around inf 59.6%
if 9.5000000000000001e154 < F Initial program 42.6%
Simplified63.8%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 50.6%
Final simplification50.9%
(FPCore (F B x)
:precision binary64
(if (<= F -1.2e+176)
(/ (- -1.0 x) B)
(if (<= F -175.0)
(/ -1.0 (sin B))
(if (<= F 1.35e-10)
(/ x (- B))
(if (<= F 7.5e+154) (/ 1.0 (sin B)) (/ (- 1.0 x) B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e+176) {
tmp = (-1.0 - x) / B;
} else if (F <= -175.0) {
tmp = -1.0 / sin(B);
} else if (F <= 1.35e-10) {
tmp = x / -B;
} else if (F <= 7.5e+154) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.2d+176)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-175.0d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.35d-10) then
tmp = x / -b
else if (f <= 7.5d+154) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.2e+176) {
tmp = (-1.0 - x) / B;
} else if (F <= -175.0) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.35e-10) {
tmp = x / -B;
} else if (F <= 7.5e+154) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.2e+176: tmp = (-1.0 - x) / B elif F <= -175.0: tmp = -1.0 / math.sin(B) elif F <= 1.35e-10: tmp = x / -B elif F <= 7.5e+154: tmp = 1.0 / math.sin(B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.2e+176) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -175.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.35e-10) tmp = Float64(x / Float64(-B)); elseif (F <= 7.5e+154) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.2e+176) tmp = (-1.0 - x) / B; elseif (F <= -175.0) tmp = -1.0 / sin(B); elseif (F <= 1.35e-10) tmp = x / -B; elseif (F <= 7.5e+154) tmp = 1.0 / sin(B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.2e+176], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -175.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.35e-10], N[(x / (-B)), $MachinePrecision], If[LessEqual[F, 7.5e+154], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.2 \cdot 10^{+176}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -175:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.35 \cdot 10^{-10}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{elif}\;F \leq 7.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.2000000000000001e176Initial program 41.7%
Simplified63.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around inf 89.5%
mul-1-neg89.5%
*-commutative89.5%
distribute-rgt-neg-in89.5%
+-commutative89.5%
associate-/r*89.5%
Simplified89.5%
Taylor expanded in B around 0 54.9%
associate-*r/54.9%
mul-1-neg54.9%
neg-sub054.9%
+-commutative54.9%
distribute-lft-in54.9%
rgt-mult-inverse54.9%
*-rgt-identity54.9%
associate--r+54.9%
metadata-eval54.9%
Simplified54.9%
if -1.2000000000000001e176 < F < -175Initial program 91.2%
Simplified91.8%
Taylor expanded in F around -inf 99.6%
Taylor expanded in x around inf 87.8%
mul-1-neg87.8%
*-commutative87.8%
distribute-rgt-neg-in87.8%
+-commutative87.8%
associate-/r*87.8%
Simplified87.8%
Taylor expanded in x around 0 63.7%
if -175 < F < 1.35e-10Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 70.5%
mul-1-neg70.5%
*-commutative70.5%
associate-*r/70.5%
distribute-rgt-neg-in70.5%
distribute-neg-frac70.5%
Simplified70.5%
Taylor expanded in B around 0 42.9%
neg-mul-142.9%
distribute-neg-frac42.9%
Simplified42.9%
if 1.35e-10 < F < 7.5000000000000004e154Initial program 93.6%
Simplified96.5%
Taylor expanded in F around inf 95.7%
Taylor expanded in B around 0 79.1%
Taylor expanded in B around inf 59.6%
if 7.5000000000000004e154 < F Initial program 42.6%
Simplified63.8%
Taylor expanded in F around inf 99.6%
Taylor expanded in B around 0 50.6%
Final simplification49.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.9e+182)
(- (/ -1.0 B) t_0)
(if (<= F -2.9e-13)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.5e-245) (/ x (- (sin B))) (- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.9e+182) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2.9e-13) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.5e-245) {
tmp = x / -sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.9d+182)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-2.9d-13)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.5d-245) then
tmp = x / -sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.9e+182) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2.9e-13) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.5e-245) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.9e+182: tmp = (-1.0 / B) - t_0 elif F <= -2.9e-13: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.5e-245: tmp = x / -math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.9e+182) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -2.9e-13) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.5e-245) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.9e+182) tmp = (-1.0 / B) - t_0; elseif (F <= -2.9e-13) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.5e-245) tmp = x / -sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.9e+182], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.9e-13], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e-245], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.9 \cdot 10^{+182}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -2.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-245}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.90000000000000006e182Initial program 42.7%
Simplified63.1%
Taylor expanded in F around -inf 99.8%
Taylor expanded in B around 0 88.1%
if -1.90000000000000006e182 < F < -2.8999999999999998e-13Initial program 88.2%
Simplified91.5%
Taylor expanded in F around -inf 87.5%
Taylor expanded in B around 0 70.9%
if -2.8999999999999998e-13 < F < 1.5000000000000001e-245Initial program 99.4%
Simplified99.8%
fma-define99.8%
fma-undefine99.8%
*-commutative99.8%
+-commutative99.8%
add-sqr-sqrt99.7%
metadata-eval99.7%
metadata-eval99.7%
unpow-prod-down99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
metadata-eval99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
Applied egg-rr99.7%
pow-sqr99.7%
metadata-eval99.7%
unpow-199.7%
fma-undefine99.7%
*-commutative99.7%
fma-undefine99.7%
unpow299.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 73.0%
mul-1-neg73.0%
*-commutative73.0%
associate-*r/73.0%
distribute-rgt-neg-in73.0%
distribute-neg-frac73.0%
Simplified73.0%
Taylor expanded in B around inf 73.0%
associate-*r/73.0%
*-commutative73.0%
neg-mul-173.0%
distribute-rgt-neg-in73.0%
Simplified73.0%
Taylor expanded in B around 0 53.3%
mul-1-neg53.3%
Simplified53.3%
if 1.5000000000000001e-245 < F Initial program 77.8%
Simplified86.1%
Taylor expanded in F around inf 74.0%
Taylor expanded in B around 0 66.5%
Final simplification65.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.6e-180)
(- (/ -1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) t_0)
(if (<= F 2.65e-247) (/ x (- (sin B))) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.6e-180) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
} else if (F <= 2.65e-247) {
tmp = x / -sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.6d-180)) then
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - t_0
else if (f <= 2.65d-247) then
tmp = x / -sin(b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.6e-180) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0;
} else if (F <= 2.65e-247) {
tmp = x / -Math.sin(B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.6e-180: tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0 elif F <= 2.65e-247: tmp = x / -math.sin(B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.6e-180) tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - t_0); elseif (F <= 2.65e-247) tmp = Float64(x / Float64(-sin(B))); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.6e-180) tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - t_0; elseif (F <= 2.65e-247) tmp = x / -sin(B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.6e-180], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.65e-247], N[(x / (-N[Sin[B], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.6 \cdot 10^{-180}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - t\_0\\
\mathbf{elif}\;F \leq 2.65 \cdot 10^{-247}:\\
\;\;\;\;\frac{x}{-\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -4.59999999999999992e-180Initial program 79.8%
Simplified86.7%
Taylor expanded in F around -inf 75.7%
Taylor expanded in B around 0 62.0%
*-commutative62.0%
Simplified62.0%
unpow262.0%
Applied egg-rr62.0%
if -4.59999999999999992e-180 < F < 2.6499999999999999e-247Initial program 99.5%
Simplified99.9%
fma-define99.9%
fma-undefine99.9%
*-commutative99.9%
+-commutative99.9%
add-sqr-sqrt99.7%
metadata-eval99.7%
metadata-eval99.7%
unpow-prod-down99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
metadata-eval99.7%
+-commutative99.7%
fma-define99.7%
fma-define99.7%
metadata-eval99.7%
Applied egg-rr99.7%
pow-sqr99.7%
metadata-eval99.7%
unpow-199.7%
fma-undefine99.7%
*-commutative99.7%
fma-undefine99.7%
unpow299.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
unpow299.7%
fma-undefine99.7%
Simplified99.7%
Taylor expanded in F around 0 80.5%
mul-1-neg80.5%
*-commutative80.5%
associate-*r/80.6%
distribute-rgt-neg-in80.6%
distribute-neg-frac80.6%
Simplified80.6%
Taylor expanded in B around inf 80.5%
associate-*r/80.5%
*-commutative80.5%
neg-mul-180.5%
distribute-rgt-neg-in80.5%
Simplified80.5%
Taylor expanded in B around 0 62.8%
mul-1-neg62.8%
Simplified62.8%
if 2.6499999999999999e-247 < F Initial program 77.8%
Simplified86.1%
Taylor expanded in F around inf 74.0%
Taylor expanded in B around 0 66.5%
Final simplification64.3%
(FPCore (F B x)
:precision binary64
(if (<= F -7.5e+174)
(/ (- -1.0 x) B)
(if (<= F -410.0)
(/ -1.0 (sin B))
(if (<= F 1.05e-80) (/ x (- B)) (/ (- 1.0 x) B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e+174) {
tmp = (-1.0 - x) / B;
} else if (F <= -410.0) {
tmp = -1.0 / sin(B);
} else if (F <= 1.05e-80) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-7.5d+174)) then
tmp = ((-1.0d0) - x) / b
else if (f <= (-410.0d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.05d-80) then
tmp = x / -b
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.5e+174) {
tmp = (-1.0 - x) / B;
} else if (F <= -410.0) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.05e-80) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.5e+174: tmp = (-1.0 - x) / B elif F <= -410.0: tmp = -1.0 / math.sin(B) elif F <= 1.05e-80: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.5e+174) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= -410.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.05e-80) 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 <= -7.5e+174) tmp = (-1.0 - x) / B; elseif (F <= -410.0) tmp = -1.0 / sin(B); elseif (F <= 1.05e-80) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.5e+174], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, -410.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-80], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.5 \cdot 10^{+174}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq -410:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.5000000000000004e174Initial program 41.7%
Simplified63.6%
Taylor expanded in F around -inf 99.8%
Taylor expanded in x around inf 89.5%
mul-1-neg89.5%
*-commutative89.5%
distribute-rgt-neg-in89.5%
+-commutative89.5%
associate-/r*89.5%
Simplified89.5%
Taylor expanded in B around 0 54.9%
associate-*r/54.9%
mul-1-neg54.9%
neg-sub054.9%
+-commutative54.9%
distribute-lft-in54.9%
rgt-mult-inverse54.9%
*-rgt-identity54.9%
associate--r+54.9%
metadata-eval54.9%
Simplified54.9%
if -7.5000000000000004e174 < F < -410Initial program 91.2%
Simplified91.8%
Taylor expanded in F around -inf 99.6%
Taylor expanded in x around inf 87.8%
mul-1-neg87.8%
*-commutative87.8%
distribute-rgt-neg-in87.8%
+-commutative87.8%
associate-/r*87.8%
Simplified87.8%
Taylor expanded in x around 0 63.7%
if -410 < F < 1.05000000000000001e-80Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 73.9%
mul-1-neg73.9%
*-commutative73.9%
associate-*r/74.0%
distribute-rgt-neg-in74.0%
distribute-neg-frac74.0%
Simplified74.0%
Taylor expanded in B around 0 44.9%
neg-mul-144.9%
distribute-neg-frac44.9%
Simplified44.9%
if 1.05000000000000001e-80 < F Initial program 69.2%
Simplified80.7%
Taylor expanded in F around inf 90.0%
Taylor expanded in B around 0 44.5%
Final simplification47.7%
(FPCore (F B x) :precision binary64 (if (<= F -4.8e-9) (/ (- -1.0 x) B) (if (<= F 1.05e-82) (/ x (- B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-9) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-82) {
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.8d-9)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.05d-82) 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.8e-9) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.05e-82) {
tmp = x / -B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-9: tmp = (-1.0 - x) / B elif F <= 1.05e-82: tmp = x / -B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-9) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.05e-82) 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.8e-9) tmp = (-1.0 - x) / B; elseif (F <= 1.05e-82) tmp = x / -B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-9], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.05e-82], N[(x / (-B)), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-82}:\\
\;\;\;\;\frac{x}{-B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -4.8e-9Initial program 68.1%
Simplified78.9%
Taylor expanded in F around -inf 95.2%
Taylor expanded in x around inf 85.2%
mul-1-neg85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
+-commutative85.2%
associate-/r*85.1%
Simplified85.1%
Taylor expanded in B around 0 45.7%
associate-*r/45.7%
mul-1-neg45.7%
neg-sub045.7%
+-commutative45.7%
distribute-lft-in45.7%
rgt-mult-inverse45.8%
*-rgt-identity45.8%
associate--r+45.8%
metadata-eval45.8%
Simplified45.8%
if -4.8e-9 < F < 1.05e-82Initial program 99.4%
Simplified99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
+-commutative99.7%
add-sqr-sqrt99.6%
metadata-eval99.6%
metadata-eval99.6%
unpow-prod-down99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
metadata-eval99.6%
+-commutative99.6%
fma-define99.6%
fma-define99.6%
metadata-eval99.6%
Applied egg-rr99.6%
pow-sqr99.6%
metadata-eval99.6%
unpow-199.6%
fma-undefine99.6%
*-commutative99.6%
fma-undefine99.6%
unpow299.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
unpow299.6%
fma-undefine99.6%
Simplified99.6%
Taylor expanded in F around 0 75.4%
mul-1-neg75.4%
*-commutative75.4%
associate-*r/75.4%
distribute-rgt-neg-in75.4%
distribute-neg-frac75.4%
Simplified75.4%
Taylor expanded in B around 0 45.9%
neg-mul-145.9%
distribute-neg-frac45.9%
Simplified45.9%
if 1.05e-82 < F Initial program 69.2%
Simplified80.7%
Taylor expanded in F around inf 90.0%
Taylor expanded in B around 0 44.5%
Final simplification45.4%
(FPCore (F B x) :precision binary64 (if (<= F -3.4e-9) (/ (- -1.0 x) B) (/ x (- B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -3.4e-9) {
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 <= (-3.4d-9)) 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 <= -3.4e-9) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / -B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -3.4e-9: tmp = (-1.0 - x) / B else: tmp = x / -B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -3.4e-9) 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 <= -3.4e-9) tmp = (-1.0 - x) / B; else tmp = x / -B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -3.4e-9], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / (-B)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -3.4 \cdot 10^{-9}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{-B}\\
\end{array}
\end{array}
if F < -3.3999999999999998e-9Initial program 68.1%
Simplified78.9%
Taylor expanded in F around -inf 95.2%
Taylor expanded in x around inf 85.2%
mul-1-neg85.2%
*-commutative85.2%
distribute-rgt-neg-in85.2%
+-commutative85.2%
associate-/r*85.1%
Simplified85.1%
Taylor expanded in B around 0 45.7%
associate-*r/45.7%
mul-1-neg45.7%
neg-sub045.7%
+-commutative45.7%
distribute-lft-in45.7%
rgt-mult-inverse45.8%
*-rgt-identity45.8%
associate--r+45.8%
metadata-eval45.8%
Simplified45.8%
if -3.3999999999999998e-9 < F Initial program 85.8%
Simplified91.2%
fma-define91.2%
fma-undefine91.2%
*-commutative91.2%
+-commutative91.2%
add-sqr-sqrt91.2%
metadata-eval91.2%
metadata-eval91.2%
unpow-prod-down91.2%
+-commutative91.2%
fma-define91.2%
fma-define91.2%
metadata-eval91.2%
metadata-eval91.2%
+-commutative91.2%
fma-define91.2%
fma-define91.2%
metadata-eval91.2%
Applied egg-rr91.2%
pow-sqr91.2%
metadata-eval91.2%
unpow-191.2%
fma-undefine91.2%
*-commutative91.2%
fma-undefine91.2%
unpow291.2%
+-commutative91.2%
fma-define91.2%
+-commutative91.2%
unpow291.2%
fma-undefine91.2%
Simplified91.2%
Taylor expanded in F around 0 64.7%
mul-1-neg64.7%
*-commutative64.7%
associate-*r/64.7%
distribute-rgt-neg-in64.7%
distribute-neg-frac64.7%
Simplified64.7%
Taylor expanded in B around 0 37.4%
neg-mul-137.4%
distribute-neg-frac37.4%
Simplified37.4%
Final simplification39.3%
(FPCore (F B x) :precision binary64 (/ x (- B)))
double code(double F, double B, double x) {
return x / -B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = x / -b
end function
public static double code(double F, double B, double x) {
return x / -B;
}
def code(F, B, x): return x / -B
function code(F, B, x) return Float64(x / Float64(-B)) end
function tmp = code(F, B, x) tmp = x / -B; end
code[F_, B_, x_] := N[(x / (-B)), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{-B}
\end{array}
Initial program 81.8%
Simplified88.4%
fma-define88.4%
fma-undefine88.4%
*-commutative88.4%
+-commutative88.4%
add-sqr-sqrt88.4%
metadata-eval88.4%
metadata-eval88.4%
unpow-prod-down88.3%
+-commutative88.3%
fma-define88.3%
fma-define88.3%
metadata-eval88.3%
metadata-eval88.3%
+-commutative88.3%
fma-define88.3%
fma-define88.3%
metadata-eval88.3%
Applied egg-rr88.3%
pow-sqr88.4%
metadata-eval88.4%
unpow-188.4%
fma-undefine88.4%
*-commutative88.4%
fma-undefine88.4%
unpow288.4%
+-commutative88.4%
fma-define88.4%
+-commutative88.4%
unpow288.4%
fma-undefine88.4%
Simplified88.4%
Taylor expanded in F around 0 61.2%
mul-1-neg61.2%
*-commutative61.2%
associate-*r/61.2%
distribute-rgt-neg-in61.2%
distribute-neg-frac61.2%
Simplified61.2%
Taylor expanded in B around 0 34.4%
neg-mul-134.4%
distribute-neg-frac34.4%
Simplified34.4%
Final simplification34.4%
(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 81.8%
Simplified88.4%
Taylor expanded in F around inf 53.9%
Taylor expanded in B around 0 30.1%
Taylor expanded in x around 0 8.8%
herbie shell --seed 2024165
(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))))))