
(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 32 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 -1000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(- (/ (* F (pow (+ (* F F) (+ 2.0 (* x 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 <= -1000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F * pow(((F * F) + (2.0 + (x * 2.0))), -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 <= (-1000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((f * (((f * f) + (2.0d0 + (x * 2.0d0))) ** (-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 <= -1000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F * Math.pow(((F * F) + (2.0 + (x * 2.0))), -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 <= -1000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = ((F * math.pow(((F * F) + (2.0 + (x * 2.0))), -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 <= -1000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F * (Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) ^ -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 <= -1000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = ((F * (((F * F) + (2.0 + (x * 2.0))) ^ -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, -1000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F * N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -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 -1000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1e9Initial program 60.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -1e9 < F < 1e8Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
if 1e8 < F Initial program 63.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1e+155)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 10000000.0)
(- (/ (/ F (sqrt (+ (* F F) (+ 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 <= -1e+155) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 10000000.0) {
tmp = ((F / sqrt(((F * F) + (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 <= (-1d+155)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 10000000.0d0) then
tmp = ((f / sqrt(((f * f) + (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 <= -1e+155) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 10000000.0) {
tmp = ((F / Math.sqrt(((F * F) + (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 <= -1e+155: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 10000000.0: tmp = ((F / math.sqrt(((F * F) + (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 <= -1e+155) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 10000000.0) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + 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 <= -1e+155) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 10000000.0) tmp = ((F / sqrt(((F * F) + (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, -1e+155], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 10000000.0], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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 \cdot 10^{+155}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 10000000:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.00000000000000001e155Initial program 36.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -1.00000000000000001e155 < F < 1e7Initial program 97.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
if 1e7 < F Initial program 63.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Final simplification99.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -50000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 100000000.0)
(- (/ (* F (sqrt (/ 1.0 (+ (* F F) 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 <= -50000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F * sqrt((1.0 / ((F * F) + 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 <= (-50000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 100000000.0d0) then
tmp = ((f * sqrt((1.0d0 / ((f * f) + 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 <= -50000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 100000000.0) {
tmp = ((F * Math.sqrt((1.0 / ((F * F) + 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 <= -50000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 100000000.0: tmp = ((F * math.sqrt((1.0 / ((F * F) + 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 <= -50000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 100000000.0) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(Float64(F * F) + 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 <= -50000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 100000000.0) tmp = ((F * sqrt((1.0 / ((F * F) + 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, -50000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 100000000.0], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $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 -50000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 100000000:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5e10Initial program 60.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -5e10 < F < 1e8Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.2%
Simplified99.2%
if 1e8 < F Initial program 63.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -112000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 120000000.0)
(- (/ (pow (+ (* F F) 2.0) -0.5) (/ (sin B) F)) 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 <= -112000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = (pow(((F * F) + 2.0), -0.5) / (sin(B) / F)) - 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 <= (-112000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 120000000.0d0) then
tmp = ((((f * f) + 2.0d0) ** (-0.5d0)) / (sin(b) / f)) - 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 <= -112000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 120000000.0) {
tmp = (Math.pow(((F * F) + 2.0), -0.5) / (Math.sin(B) / F)) - 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 <= -112000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 120000000.0: tmp = (math.pow(((F * F) + 2.0), -0.5) / (math.sin(B) / F)) - 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 <= -112000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 120000000.0) tmp = Float64(Float64((Float64(Float64(F * F) + 2.0) ^ -0.5) / Float64(sin(B) / F)) - 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 <= -112000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 120000000.0) tmp = ((((F * F) + 2.0) ^ -0.5) / (sin(B) / F)) - 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, -112000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 120000000.0], N[(N[(N[Power[N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $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 -112000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 120000000:\\
\;\;\;\;\frac{{\left(F \cdot F + 2\right)}^{-0.5}}{\frac{\sin B}{F}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.12e8Initial program 60.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -1.12e8 < F < 1.2e8Initial program 99.5%
+-commutativeN/A
div-invN/A
sub-negN/A
--lowering--.f64N/A
Applied egg-rr99.6%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.2%
Simplified99.2%
if 1.2e8 < F Initial program 63.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Final simplification99.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 0.00072)
(- (/ (/ F (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 <= -1.4) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 0.00072) {
tmp = ((F / 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 <= (-1.4d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 0.00072d0) then
tmp = ((f / 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 <= -1.4) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 0.00072) {
tmp = ((F / 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 <= -1.4: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 0.00072: tmp = ((F / 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 <= -1.4) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 0.00072) tmp = Float64(Float64(Float64(F / 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 <= -1.4) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 0.00072) tmp = ((F / 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, -1.4], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.00072], N[(N[(N[(F / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $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 0.00072:\\
\;\;\;\;\frac{\frac{F}{\sqrt{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.3999999999999999Initial program 61.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.8%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.8%
Simplified98.8%
if -1.3999999999999999 < F < 7.20000000000000045e-4Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.0%
Simplified99.0%
if 7.20000000000000045e-4 < F Initial program 65.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.5%
Simplified98.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ (* F F) (+ 2.0 (* x 2.0)))) (t_1 (/ x (tan B))))
(if (<= F -95000000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.1e-185)
(- (/ (/ F (sqrt t_0)) (sin B)) (/ x B))
(if (<= F 1.45e-270)
(/ x (- 0.0 (tan B)))
(if (<= F 7500000.0)
(- (/ (* F (pow t_0 -0.5)) (sin B)) (/ x B))
(- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F * F) + (2.0 + (x * 2.0));
double t_1 = x / tan(B);
double tmp;
if (F <= -95000000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.1e-185) {
tmp = ((F / sqrt(t_0)) / sin(B)) - (x / B);
} else if (F <= 1.45e-270) {
tmp = x / (0.0 - tan(B));
} else if (F <= 7500000.0) {
tmp = ((F * pow(t_0, -0.5)) / sin(B)) - (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 * f) + (2.0d0 + (x * 2.0d0))
t_1 = x / tan(b)
if (f <= (-95000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.1d-185)) then
tmp = ((f / sqrt(t_0)) / sin(b)) - (x / b)
else if (f <= 1.45d-270) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 7500000.0d0) then
tmp = ((f * (t_0 ** (-0.5d0))) / sin(b)) - (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 * F) + (2.0 + (x * 2.0));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -95000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.1e-185) {
tmp = ((F / Math.sqrt(t_0)) / Math.sin(B)) - (x / B);
} else if (F <= 1.45e-270) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 7500000.0) {
tmp = ((F * Math.pow(t_0, -0.5)) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * F) + (2.0 + (x * 2.0)) t_1 = x / math.tan(B) tmp = 0 if F <= -95000000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.1e-185: tmp = ((F / math.sqrt(t_0)) / math.sin(B)) - (x / B) elif F <= 1.45e-270: tmp = x / (0.0 - math.tan(B)) elif F <= 7500000.0: tmp = ((F * math.pow(t_0, -0.5)) / math.sin(B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -95000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.1e-185) tmp = Float64(Float64(Float64(F / sqrt(t_0)) / sin(B)) - Float64(x / B)); elseif (F <= 1.45e-270) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 7500000.0) tmp = Float64(Float64(Float64(F * (t_0 ^ -0.5)) / sin(B)) - 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 * F) + (2.0 + (x * 2.0)); t_1 = x / tan(B); tmp = 0.0; if (F <= -95000000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.1e-185) tmp = ((F / sqrt(t_0)) / sin(B)) - (x / B); elseif (F <= 1.45e-270) tmp = x / (0.0 - tan(B)); elseif (F <= 7500000.0) tmp = ((F * (t_0 ^ -0.5)) / sin(B)) - (x / B); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -95000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.1e-185], N[(N[(N[(F / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.45e-270], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 7500000.0], N[(N[(N[(F * N[Power[t$95$0, -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $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 F + \left(2 + x \cdot 2\right)\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -95000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.1 \cdot 10^{-185}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t\_0}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 7500000:\\
\;\;\;\;\frac{F \cdot {t\_0}^{-0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -9.5e10Initial program 58.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified74.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -9.5e10 < F < -2.1e-185Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in B around 0
/-lowering-/.f6487.3%
Simplified87.3%
if -2.1e-185 < F < 1.44999999999999991e-270Initial program 99.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.8%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6484.4%
Simplified84.4%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6484.7%
Applied egg-rr84.7%
if 1.44999999999999991e-270 < F < 7.5e6Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
/-lowering-/.f6476.9%
Simplified76.9%
if 7.5e6 < F Initial program 63.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(- (/ (/ F (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) (sin B)) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -95000000000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.55e-180)
t_0
(if (<= F 1.45e-270)
(/ x (- 0.0 (tan B)))
(if (<= F 8400000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) / sin(B)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -95000000000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.55e-180) {
tmp = t_0;
} else if (F <= 1.45e-270) {
tmp = x / (0.0 - tan(B));
} else if (F <= 8400000.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 / sqrt(((f * f) + (2.0d0 + (x * 2.0d0))))) / sin(b)) - (x / b)
t_1 = x / tan(b)
if (f <= (-95000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.55d-180)) then
tmp = t_0
else if (f <= 1.45d-270) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 8400000.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.sqrt(((F * F) + (2.0 + (x * 2.0))))) / Math.sin(B)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -95000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.55e-180) {
tmp = t_0;
} else if (F <= 1.45e-270) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 8400000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sqrt(((F * F) + (2.0 + (x * 2.0))))) / math.sin(B)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -95000000000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.55e-180: tmp = t_0 elif F <= 1.45e-270: tmp = x / (0.0 - math.tan(B)) elif F <= 8400000.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 / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) / sin(B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -95000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.55e-180) tmp = t_0; elseif (F <= 1.45e-270) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 8400000.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 / sqrt(((F * F) + (2.0 + (x * 2.0))))) / sin(B)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -95000000000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.55e-180) tmp = t_0; elseif (F <= 1.45e-270) tmp = x / (0.0 - tan(B)); elseif (F <= 8400000.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[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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, -95000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.55e-180], t$95$0, If[LessEqual[F, 1.45e-270], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8400000.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{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -95000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.55 \cdot 10^{-180}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.45 \cdot 10^{-270}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 8400000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -9.5e10Initial program 58.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified74.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -9.5e10 < F < -1.5499999999999999e-180 or 1.44999999999999991e-270 < F < 8.4e6Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in B around 0
/-lowering-/.f6481.5%
Simplified81.5%
if -1.5499999999999999e-180 < F < 1.44999999999999991e-270Initial program 99.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.8%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.9%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6484.4%
Simplified84.4%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6484.7%
Applied egg-rr84.7%
if 8.4e6 < F Initial program 63.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Final simplification91.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -200000000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -5e-66)
(- (/ (/ F (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) (sin B)) (/ x B))
(if (<= F 6400000.0)
(- (* (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* 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 <= -200000000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -5e-66) {
tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) / sin(B)) - (x / B);
} else if (F <= 6400000.0) {
tmp = (sqrt((1.0 / (2.0 + ((F * F) + (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 <= (-200000000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-5d-66)) then
tmp = ((f / sqrt(((f * f) + (2.0d0 + (x * 2.0d0))))) / sin(b)) - (x / b)
else if (f <= 6400000.0d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + ((f * f) + (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 <= -200000000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -5e-66) {
tmp = ((F / Math.sqrt(((F * F) + (2.0 + (x * 2.0))))) / Math.sin(B)) - (x / B);
} else if (F <= 6400000.0) {
tmp = (Math.sqrt((1.0 / (2.0 + ((F * F) + (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 <= -200000000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -5e-66: tmp = ((F / math.sqrt(((F * F) + (2.0 + (x * 2.0))))) / math.sin(B)) - (x / B) elif F <= 6400000.0: tmp = (math.sqrt((1.0 / (2.0 + ((F * F) + (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 <= -200000000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -5e-66) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) / sin(B)) - Float64(x / B)); elseif (F <= 6400000.0) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + 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 <= -200000000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -5e-66) tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) / sin(B)) - (x / B); elseif (F <= 6400000.0) tmp = (sqrt((1.0 / (2.0 + ((F * F) + (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, -200000000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -5e-66], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 6400000.0], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $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 -200000000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -5 \cdot 10^{-66}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 6400000:\\
\;\;\;\;\sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2e11Initial program 58.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified74.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -2e11 < F < -4.99999999999999962e-66Initial program 99.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.3%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.4%
associate-*l/N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
/-lowering-/.f6499.6%
Simplified99.6%
if -4.99999999999999962e-66 < F < 6.4e6Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6486.5%
Simplified86.5%
if 6.4e6 < F Initial program 63.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Final simplification94.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ (* F F) 2.0)))) (t_1 (/ x (tan B))))
(if (<= F -1.2)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.25e-67)
(* F (/ t_0 (sin B)))
(if (<= F 1.5e-61)
(/ x (- 0.0 (tan B)))
(if (<= F 0.00065) (* t_0 (/ F (sin B))) (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / ((F * F) + 2.0)));
double t_1 = x / tan(B);
double tmp;
if (F <= -1.2) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.25e-67) {
tmp = F * (t_0 / sin(B));
} else if (F <= 1.5e-61) {
tmp = x / (0.0 - tan(B));
} else if (F <= 0.00065) {
tmp = t_0 * (F / sin(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 = sqrt((1.0d0 / ((f * f) + 2.0d0)))
t_1 = x / tan(b)
if (f <= (-1.2d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.25d-67)) then
tmp = f * (t_0 / sin(b))
else if (f <= 1.5d-61) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 0.00065d0) then
tmp = t_0 * (f / sin(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 = Math.sqrt((1.0 / ((F * F) + 2.0)));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.2) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.25e-67) {
tmp = F * (t_0 / Math.sin(B));
} else if (F <= 1.5e-61) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 0.00065) {
tmp = t_0 * (F / Math.sin(B));
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / ((F * F) + 2.0))) t_1 = x / math.tan(B) tmp = 0 if F <= -1.2: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.25e-67: tmp = F * (t_0 / math.sin(B)) elif F <= 1.5e-61: tmp = x / (0.0 - math.tan(B)) elif F <= 0.00065: tmp = t_0 * (F / math.sin(B)) else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.2) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.25e-67) tmp = Float64(F * Float64(t_0 / sin(B))); elseif (F <= 1.5e-61) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 0.00065) tmp = Float64(t_0 * Float64(F / sin(B))); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / ((F * F) + 2.0))); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.2) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.25e-67) tmp = F * (t_0 / sin(B)); elseif (F <= 1.5e-61) tmp = x / (0.0 - tan(B)); elseif (F <= 0.00065) tmp = t_0 * (F / sin(B)); else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.25e-67], N[(F * N[(t$95$0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.5e-61], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.00065], N[(t$95$0 * N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{F \cdot F + 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.2:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.25 \cdot 10^{-67}:\\
\;\;\;\;F \cdot \frac{t\_0}{\sin B}\\
\mathbf{elif}\;F \leq 1.5 \cdot 10^{-61}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 0.00065:\\
\;\;\;\;t\_0 \cdot \frac{F}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.19999999999999996Initial program 61.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified76.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.9%
Simplified98.9%
if -1.19999999999999996 < F < -1.25e-67Initial program 99.0%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6477.4%
Simplified77.4%
if -1.25e-67 < F < 1.50000000000000006e-61Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6472.7%
Simplified72.7%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6472.8%
Applied egg-rr72.8%
if 1.50000000000000006e-61 < F < 6.4999999999999997e-4Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6490.6%
Simplified90.6%
if 6.4999999999999997e-4 < F Initial program 65.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.5%
Simplified98.5%
Final simplification88.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* F (/ (sqrt (/ 1.0 (+ (* F F) 2.0))) (sin B))))
(t_1 (/ x (tan B))))
(if (<= F -1.2)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.82e-68)
t_0
(if (<= F 8.8e-54)
(/ x (- 0.0 (tan B)))
(if (<= F 5.5e-5) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = F * (sqrt((1.0 / ((F * F) + 2.0))) / sin(B));
double t_1 = x / tan(B);
double tmp;
if (F <= -1.2) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.82e-68) {
tmp = t_0;
} else if (F <= 8.8e-54) {
tmp = x / (0.0 - tan(B));
} else if (F <= 5.5e-5) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = f * (sqrt((1.0d0 / ((f * f) + 2.0d0))) / sin(b))
t_1 = x / tan(b)
if (f <= (-1.2d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.82d-68)) then
tmp = t_0
else if (f <= 8.8d-54) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 5.5d-5) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = F * (Math.sqrt((1.0 / ((F * F) + 2.0))) / Math.sin(B));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.2) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.82e-68) {
tmp = t_0;
} else if (F <= 8.8e-54) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 5.5e-5) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = F * (math.sqrt((1.0 / ((F * F) + 2.0))) / math.sin(B)) t_1 = x / math.tan(B) tmp = 0 if F <= -1.2: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.82e-68: tmp = t_0 elif F <= 8.8e-54: tmp = x / (0.0 - math.tan(B)) elif F <= 5.5e-5: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(F * Float64(sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0))) / sin(B))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.2) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.82e-68) tmp = t_0; elseif (F <= 8.8e-54) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 5.5e-5) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = F * (sqrt((1.0 / ((F * F) + 2.0))) / sin(B)); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.2) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.82e-68) tmp = t_0; elseif (F <= 8.8e-54) tmp = x / (0.0 - tan(B)); elseif (F <= 5.5e-5) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(F * N[(N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.82e-68], t$95$0, If[LessEqual[F, 8.8e-54], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 5.5e-5], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := F \cdot \frac{\sqrt{\frac{1}{F \cdot F + 2}}}{\sin B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.2:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.82 \cdot 10^{-68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 8.8 \cdot 10^{-54}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 5.5 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.19999999999999996Initial program 61.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified76.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.9%
Simplified98.9%
if -1.19999999999999996 < F < -1.81999999999999994e-68 or 8.7999999999999998e-54 < F < 5.5000000000000002e-5Initial program 99.2%
Taylor expanded in x around 0
associate-*l/N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6483.4%
Simplified83.4%
if -1.81999999999999994e-68 < F < 8.7999999999999998e-54Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6472.7%
Simplified72.7%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6472.8%
Applied egg-rr72.8%
if 5.5000000000000002e-5 < F Initial program 65.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.5%
Simplified98.5%
Final simplification88.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -175.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.2e-185)
(/ (- (/ F (sqrt (+ (* F F) t_0))) x) B)
(if (<= F 1.12e-129)
(/ x (- 0.0 (tan B)))
(if (<= F 3.6e-29)
(/ (- (* F (sqrt (/ 1.0 t_0))) x) B)
(- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -175.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.2e-185) {
tmp = ((F / sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 1.12e-129) {
tmp = x / (0.0 - tan(B));
} else if (F <= 3.6e-29) {
tmp = ((F * sqrt((1.0 / 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 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-175.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.2d-185)) then
tmp = ((f / sqrt(((f * f) + t_0))) - x) / b
else if (f <= 1.12d-129) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 3.6d-29) then
tmp = ((f * sqrt((1.0d0 / 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 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -175.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.2e-185) {
tmp = ((F / Math.sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 1.12e-129) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 3.6e-29) {
tmp = ((F * Math.sqrt((1.0 / t_0))) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -175.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.2e-185: tmp = ((F / math.sqrt(((F * F) + t_0))) - x) / B elif F <= 1.12e-129: tmp = x / (0.0 - math.tan(B)) elif F <= 3.6e-29: tmp = ((F * math.sqrt((1.0 / t_0))) - x) / B else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -175.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.2e-185) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + t_0))) - x) / B); elseif (F <= 1.12e-129) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 3.6e-29) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_0))) - 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 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -175.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.2e-185) tmp = ((F / sqrt(((F * F) + t_0))) - x) / B; elseif (F <= 1.12e-129) tmp = x / (0.0 - tan(B)); elseif (F <= 3.6e-29) tmp = ((F * sqrt((1.0 / 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[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -175.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.2e-185], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.12e-129], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.6e-29], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -175:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-185}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + t\_0}} - x}{B}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{-129}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 3.6 \cdot 10^{-29}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_0}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -175Initial program 60.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
if -175 < F < -2.2e-185Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6466.9%
Simplified66.9%
/-lowering-/.f64N/A
Applied egg-rr67.0%
if -2.2e-185 < F < 1.12000000000000006e-129Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6477.4%
Simplified77.4%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6477.5%
Applied egg-rr77.5%
if 1.12000000000000006e-129 < F < 3.59999999999999974e-29Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
Taylor expanded in F around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
if 3.59999999999999974e-29 < F Initial program 68.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified83.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.3%
Simplified93.3%
Final simplification87.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -330.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.85e-180)
(/ (- (/ F (sqrt (+ (* F F) t_0))) x) B)
(if (<= F 2.8e-132)
(/ x (- 0.0 (tan B)))
(if (<= F 2e-29)
(/ (- (* F (sqrt (/ 1.0 t_0))) x) B)
(- (/ 1.0 B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -330.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.85e-180) {
tmp = ((F / sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 2.8e-132) {
tmp = x / (0.0 - tan(B));
} else if (F <= 2e-29) {
tmp = ((F * sqrt((1.0 / t_0))) - x) / B;
} else {
tmp = (1.0 / 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 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-330.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.85d-180)) then
tmp = ((f / sqrt(((f * f) + t_0))) - x) / b
else if (f <= 2.8d-132) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 2d-29) then
tmp = ((f * sqrt((1.0d0 / t_0))) - x) / b
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -330.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.85e-180) {
tmp = ((F / Math.sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 2.8e-132) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 2e-29) {
tmp = ((F * Math.sqrt((1.0 / t_0))) - x) / B;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -330.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.85e-180: tmp = ((F / math.sqrt(((F * F) + t_0))) - x) / B elif F <= 2.8e-132: tmp = x / (0.0 - math.tan(B)) elif F <= 2e-29: tmp = ((F * math.sqrt((1.0 / t_0))) - x) / B else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -330.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.85e-180) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + t_0))) - x) / B); elseif (F <= 2.8e-132) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 2e-29) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / t_0))) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -330.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.85e-180) tmp = ((F / sqrt(((F * F) + t_0))) - x) / B; elseif (F <= 2.8e-132) tmp = x / (0.0 - tan(B)); elseif (F <= 2e-29) tmp = ((F * sqrt((1.0 / t_0))) - x) / B; else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -330.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.85e-180], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.8e-132], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-29], N[(N[(N[(F * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -330:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.85 \cdot 10^{-180}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + t\_0}} - x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-132}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-29}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{t\_0}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\end{array}
\end{array}
if F < -330Initial program 60.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
if -330 < F < -1.85000000000000008e-180Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6466.9%
Simplified66.9%
/-lowering-/.f64N/A
Applied egg-rr67.0%
if -1.85000000000000008e-180 < F < 2.80000000000000002e-132Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6477.4%
Simplified77.4%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6477.5%
Applied egg-rr77.5%
if 2.80000000000000002e-132 < F < 1.99999999999999989e-29Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
Taylor expanded in F around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
if 1.99999999999999989e-29 < F Initial program 68.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified83.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.3%
Simplified93.3%
Taylor expanded in B around 0
/-lowering-/.f6467.8%
Simplified67.8%
Final simplification79.1%
(FPCore (F B x)
:precision binary64
(if (<= B 0.19)
(/
(+
(*
(* B B)
(+
(* x 0.3333333333333333)
(*
(* B B)
(+
(* x 0.022222222222222223)
(*
(* B B)
(+
(* (* x 0.022222222222222223) -0.3333333333333333)
(* x 0.009523809523809525)))))))
(- (* F (sqrt (/ 1.0 (+ (* x 2.0) (+ (* F F) 2.0))))) x))
B)
(/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.19) {
tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B;
} else {
tmp = x / (0.0 - tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 0.19d0) then
tmp = (((b * b) * ((x * 0.3333333333333333d0) + ((b * b) * ((x * 0.022222222222222223d0) + ((b * b) * (((x * 0.022222222222222223d0) * (-0.3333333333333333d0)) + (x * 0.009523809523809525d0))))))) + ((f * sqrt((1.0d0 / ((x * 2.0d0) + ((f * f) + 2.0d0))))) - x)) / b
else
tmp = x / (0.0d0 - tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 0.19) {
tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * Math.sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B;
} else {
tmp = x / (0.0 - Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 0.19: tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * math.sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B else: tmp = x / (0.0 - math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 0.19) tmp = Float64(Float64(Float64(Float64(B * B) * Float64(Float64(x * 0.3333333333333333) + Float64(Float64(B * B) * Float64(Float64(x * 0.022222222222222223) + Float64(Float64(B * B) * Float64(Float64(Float64(x * 0.022222222222222223) * -0.3333333333333333) + Float64(x * 0.009523809523809525))))))) + Float64(Float64(F * sqrt(Float64(1.0 / Float64(Float64(x * 2.0) + Float64(Float64(F * F) + 2.0))))) - x)) / B); else tmp = Float64(x / Float64(0.0 - tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 0.19) tmp = (((B * B) * ((x * 0.3333333333333333) + ((B * B) * ((x * 0.022222222222222223) + ((B * B) * (((x * 0.022222222222222223) * -0.3333333333333333) + (x * 0.009523809523809525))))))) + ((F * sqrt((1.0 / ((x * 2.0) + ((F * F) + 2.0))))) - x)) / B; else tmp = x / (0.0 - tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 0.19], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(N[(x * 0.3333333333333333), $MachinePrecision] + N[(N[(B * B), $MachinePrecision] * N[(N[(x * 0.022222222222222223), $MachinePrecision] + N[(N[(B * B), $MachinePrecision] * N[(N[(N[(x * 0.022222222222222223), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] + N[(x * 0.009523809523809525), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(F * N[Sqrt[N[(1.0 / N[(N[(x * 2.0), $MachinePrecision] + N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.19:\\
\;\;\;\;\frac{\left(B \cdot B\right) \cdot \left(x \cdot 0.3333333333333333 + \left(B \cdot B\right) \cdot \left(x \cdot 0.022222222222222223 + \left(B \cdot B\right) \cdot \left(\left(x \cdot 0.022222222222222223\right) \cdot -0.3333333333333333 + x \cdot 0.009523809523809525\right)\right)\right) + \left(F \cdot \sqrt{\frac{1}{x \cdot 2 + \left(F \cdot F + 2\right)}} - x\right)}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\end{array}
\end{array}
if B < 0.19Initial program 75.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified87.1%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6464.1%
Simplified64.1%
Taylor expanded in B around 0
Simplified60.0%
if 0.19 < B Initial program 89.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified90.0%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr89.9%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6453.3%
Simplified53.3%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6453.5%
Applied egg-rr53.5%
Final simplification58.5%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (t_1 (/ x (tan B))))
(if (<= F -1.25)
(- (/ -1.0 B) t_1)
(if (<= F -1.35e-180)
(- (* (/ F B) t_0) (/ x B))
(if (<= F 4.8e-133)
(/ x (- 0.0 (tan B)))
(if (<= F 3.2e-29) (/ (- (* F t_0) x) B) (- (/ 1.0 B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / tan(B);
double tmp;
if (F <= -1.25) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.35e-180) {
tmp = ((F / B) * t_0) - (x / B);
} else if (F <= 4.8e-133) {
tmp = x / (0.0 - tan(B));
} else if (F <= 3.2e-29) {
tmp = ((F * t_0) - x) / B;
} else {
tmp = (1.0 / 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 = sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))
t_1 = x / tan(b)
if (f <= (-1.25d0)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-1.35d-180)) then
tmp = ((f / b) * t_0) - (x / b)
else if (f <= 4.8d-133) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 3.2d-29) then
tmp = ((f * t_0) - x) / b
else
tmp = (1.0d0 / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = Math.sqrt((1.0 / (2.0 + (x * 2.0))));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.25) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.35e-180) {
tmp = ((F / B) * t_0) - (x / B);
} else if (F <= 4.8e-133) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 3.2e-29) {
tmp = ((F * t_0) - x) / B;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = math.sqrt((1.0 / (2.0 + (x * 2.0)))) t_1 = x / math.tan(B) tmp = 0 if F <= -1.25: tmp = (-1.0 / B) - t_1 elif F <= -1.35e-180: tmp = ((F / B) * t_0) - (x / B) elif F <= 4.8e-133: tmp = x / (0.0 - math.tan(B)) elif F <= 3.2e-29: tmp = ((F * t_0) - x) / B else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.25) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -1.35e-180) tmp = Float64(Float64(Float64(F / B) * t_0) - Float64(x / B)); elseif (F <= 4.8e-133) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 3.2e-29) tmp = Float64(Float64(Float64(F * t_0) - x) / B); else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = sqrt((1.0 / (2.0 + (x * 2.0)))); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.25) tmp = (-1.0 / B) - t_1; elseif (F <= -1.35e-180) tmp = ((F / B) * t_0) - (x / B); elseif (F <= 4.8e-133) tmp = x / (0.0 - tan(B)); elseif (F <= 3.2e-29) tmp = ((F * t_0) - x) / B; else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.25], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.35e-180], N[(N[(N[(F / B), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.8e-133], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.2e-29], N[(N[(N[(F * t$95$0), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{2 + x \cdot 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.25:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{-180}:\\
\;\;\;\;\frac{F}{B} \cdot t\_0 - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.8 \cdot 10^{-133}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{F \cdot t\_0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\end{array}
\end{array}
if F < -1.25Initial program 61.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.8%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6442.1%
Simplified42.1%
Taylor expanded in F around -inf
/-lowering-/.f6470.2%
Simplified70.2%
if -1.25 < F < -1.35000000000000007e-180Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.9%
Simplified65.9%
Taylor expanded in F around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6463.9%
Simplified63.9%
if -1.35000000000000007e-180 < F < 4.8e-133Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6477.4%
Simplified77.4%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6477.5%
Applied egg-rr77.5%
if 4.8e-133 < F < 3.2e-29Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
Taylor expanded in F around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
if 3.2e-29 < F Initial program 68.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified83.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.3%
Simplified93.3%
Taylor expanded in B around 0
/-lowering-/.f6467.8%
Simplified67.8%
Final simplification70.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) x) B))
(t_1 (/ x (tan B))))
(if (<= F -1.25)
(- (/ -1.0 B) t_1)
(if (<= F -1.35e-180)
t_0
(if (<= F 2.6e-132)
(/ x (- 0.0 (tan B)))
(if (<= F 2e-29) t_0 (- (/ 1.0 B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / tan(B);
double tmp;
if (F <= -1.25) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.35e-180) {
tmp = t_0;
} else if (F <= 2.6e-132) {
tmp = x / (0.0 - tan(B));
} else if (F <= 2e-29) {
tmp = t_0;
} else {
tmp = (1.0 / 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((1.0d0 / (2.0d0 + (x * 2.0d0))))) - x) / b
t_1 = x / tan(b)
if (f <= (-1.25d0)) then
tmp = ((-1.0d0) / b) - t_1
else if (f <= (-1.35d-180)) then
tmp = t_0
else if (f <= 2.6d-132) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 2d-29) then
tmp = t_0
else
tmp = (1.0d0 / 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((1.0 / (2.0 + (x * 2.0))))) - x) / B;
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.25) {
tmp = (-1.0 / B) - t_1;
} else if (F <= -1.35e-180) {
tmp = t_0;
} else if (F <= 2.6e-132) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 2e-29) {
tmp = t_0;
} else {
tmp = (1.0 / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B t_1 = x / math.tan(B) tmp = 0 if F <= -1.25: tmp = (-1.0 / B) - t_1 elif F <= -1.35e-180: tmp = t_0 elif F <= 2.6e-132: tmp = x / (0.0 - math.tan(B)) elif F <= 2e-29: tmp = t_0 else: tmp = (1.0 / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) - x) / B) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.25) tmp = Float64(Float64(-1.0 / B) - t_1); elseif (F <= -1.35e-180) tmp = t_0; elseif (F <= 2.6e-132) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 2e-29) tmp = t_0; else tmp = Float64(Float64(1.0 / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) - x) / B; t_1 = x / tan(B); tmp = 0.0; if (F <= -1.25) tmp = (-1.0 / B) - t_1; elseif (F <= -1.35e-180) tmp = t_0; elseif (F <= 2.6e-132) tmp = x / (0.0 - tan(B)); elseif (F <= 2e-29) tmp = t_0; else tmp = (1.0 / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = 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]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.25], N[(N[(-1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.35e-180], t$95$0, If[LessEqual[F, 2.6e-132], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2e-29], t$95$0, N[(N[(1.0 / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}} - x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.25:\\
\;\;\;\;\frac{-1}{B} - t\_1\\
\mathbf{elif}\;F \leq -1.35 \cdot 10^{-180}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-29}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_1\\
\end{array}
\end{array}
if F < -1.25Initial program 61.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.8%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6442.1%
Simplified42.1%
Taylor expanded in F around -inf
/-lowering-/.f6470.2%
Simplified70.2%
if -1.25 < F < -1.35000000000000007e-180 or 2.6000000000000001e-132 < F < 1.99999999999999989e-29Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6471.0%
Simplified71.0%
Taylor expanded in F around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6469.6%
Simplified69.6%
if -1.35000000000000007e-180 < F < 2.6000000000000001e-132Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6477.4%
Simplified77.4%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6477.5%
Applied egg-rr77.5%
if 1.99999999999999989e-29 < F Initial program 68.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified83.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.3%
Simplified93.3%
Taylor expanded in B around 0
/-lowering-/.f6467.8%
Simplified67.8%
Final simplification70.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8.4e-16)
(- (/ -1.0 B) t_0)
(if (<= F 3.4e-55)
(/ x (- 0.0 (tan B)))
(if (<= F 8.5e-30)
(/ (* F (sqrt (/ 1.0 (+ (* F F) 2.0)))) B)
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8.4e-16) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 3.4e-55) {
tmp = x / (0.0 - tan(B));
} else if (F <= 8.5e-30) {
tmp = (F * sqrt((1.0 / ((F * F) + 2.0)))) / 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 <= (-8.4d-16)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 3.4d-55) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 8.5d-30) then
tmp = (f * sqrt((1.0d0 / ((f * f) + 2.0d0)))) / 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 <= -8.4e-16) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 3.4e-55) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 8.5e-30) {
tmp = (F * Math.sqrt((1.0 / ((F * F) + 2.0)))) / 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 <= -8.4e-16: tmp = (-1.0 / B) - t_0 elif F <= 3.4e-55: tmp = x / (0.0 - math.tan(B)) elif F <= 8.5e-30: tmp = (F * math.sqrt((1.0 / ((F * F) + 2.0)))) / 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 <= -8.4e-16) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 3.4e-55) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 8.5e-30) tmp = Float64(Float64(F * sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0)))) / 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 <= -8.4e-16) tmp = (-1.0 / B) - t_0; elseif (F <= 3.4e-55) tmp = x / (0.0 - tan(B)); elseif (F <= 8.5e-30) tmp = (F * sqrt((1.0 / ((F * F) + 2.0)))) / 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, -8.4e-16], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.4e-55], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.5e-30], N[(N[(F * N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.4 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 3.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 8.5 \cdot 10^{-30}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{F \cdot F + 2}}}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -8.4000000000000004e-16Initial program 64.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified77.9%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6444.9%
Simplified44.9%
Taylor expanded in F around -inf
/-lowering-/.f6467.0%
Simplified67.0%
if -8.4000000000000004e-16 < F < 3.39999999999999973e-55Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6469.6%
Simplified69.6%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6469.7%
Applied egg-rr69.7%
if 3.39999999999999973e-55 < F < 8.49999999999999931e-30Initial program 99.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64100.0%
Simplified100.0%
if 8.49999999999999931e-30 < F Initial program 68.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified83.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.3%
Simplified93.3%
Taylor expanded in B around 0
/-lowering-/.f6467.8%
Simplified67.8%
Final simplification68.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8.5e-17)
(- (/ -1.0 B) t_0)
(if (<= F 2.5e-53)
(/ x (- 0.0 (tan B)))
(if (<= F 1.05e-29)
(* (sqrt (/ 1.0 (+ (* F F) 2.0))) (/ F B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8.5e-17) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-53) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.05e-29) {
tmp = sqrt((1.0 / ((F * F) + 2.0))) * (F / 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 <= (-8.5d-17)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 2.5d-53) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.05d-29) then
tmp = sqrt((1.0d0 / ((f * f) + 2.0d0))) * (f / 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 <= -8.5e-17) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 2.5e-53) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.05e-29) {
tmp = Math.sqrt((1.0 / ((F * F) + 2.0))) * (F / 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 <= -8.5e-17: tmp = (-1.0 / B) - t_0 elif F <= 2.5e-53: tmp = x / (0.0 - math.tan(B)) elif F <= 1.05e-29: tmp = math.sqrt((1.0 / ((F * F) + 2.0))) * (F / 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 <= -8.5e-17) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 2.5e-53) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.05e-29) tmp = Float64(sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0))) * Float64(F / 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 <= -8.5e-17) tmp = (-1.0 / B) - t_0; elseif (F <= 2.5e-53) tmp = x / (0.0 - tan(B)); elseif (F <= 1.05e-29) tmp = sqrt((1.0 / ((F * F) + 2.0))) * (F / 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, -8.5e-17], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.5e-53], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05e-29], N[(N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / 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 -8.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.05 \cdot 10^{-29}:\\
\;\;\;\;\sqrt{\frac{1}{F \cdot F + 2}} \cdot \frac{F}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -8.5e-17Initial program 64.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified77.9%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6444.9%
Simplified44.9%
Taylor expanded in F around -inf
/-lowering-/.f6467.0%
Simplified67.0%
if -8.5e-17 < F < 2.5e-53Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6469.6%
Simplified69.6%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6469.7%
Applied egg-rr69.7%
if 2.5e-53 < F < 1.04999999999999995e-29Initial program 99.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.1%
Simplified99.1%
if 1.04999999999999995e-29 < F Initial program 68.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified83.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.3%
Simplified93.3%
Taylor expanded in B around 0
/-lowering-/.f6467.8%
Simplified67.8%
Final simplification68.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- 0.0 (tan B)))) (t_1 (+ 2.0 (/ x 0.5))))
(if (<= F -6.3e+217)
t_0
(if (<= F -3.9e-13)
(/
(-
(+
-1.0
(*
0.5
(+
(/ (+ 2.0 (* x 2.0)) (* F F))
(* (/ t_1 (* F F)) (/ (* t_1 -0.75) (* F F))))))
x)
B)
(if (<= F 25.0) t_0 (if (<= F 2.5e+128) (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / (0.0 - tan(B));
double t_1 = 2.0 + (x / 0.5);
double tmp;
if (F <= -6.3e+217) {
tmp = t_0;
} else if (F <= -3.9e-13) {
tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_1 / (F * F)) * ((t_1 * -0.75) / (F * F)))))) - x) / B;
} else if (F <= 25.0) {
tmp = t_0;
} else if (F <= 2.5e+128) {
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) :: t_1
real(8) :: tmp
t_0 = x / (0.0d0 - tan(b))
t_1 = 2.0d0 + (x / 0.5d0)
if (f <= (-6.3d+217)) then
tmp = t_0
else if (f <= (-3.9d-13)) then
tmp = (((-1.0d0) + (0.5d0 * (((2.0d0 + (x * 2.0d0)) / (f * f)) + ((t_1 / (f * f)) * ((t_1 * (-0.75d0)) / (f * f)))))) - x) / b
else if (f <= 25.0d0) then
tmp = t_0
else if (f <= 2.5d+128) 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 = x / (0.0 - Math.tan(B));
double t_1 = 2.0 + (x / 0.5);
double tmp;
if (F <= -6.3e+217) {
tmp = t_0;
} else if (F <= -3.9e-13) {
tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_1 / (F * F)) * ((t_1 * -0.75) / (F * F)))))) - x) / B;
} else if (F <= 25.0) {
tmp = t_0;
} else if (F <= 2.5e+128) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / (0.0 - math.tan(B)) t_1 = 2.0 + (x / 0.5) tmp = 0 if F <= -6.3e+217: tmp = t_0 elif F <= -3.9e-13: tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_1 / (F * F)) * ((t_1 * -0.75) / (F * F)))))) - x) / B elif F <= 25.0: tmp = t_0 elif F <= 2.5e+128: tmp = 1.0 / math.sin(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(x / Float64(0.0 - tan(B))) t_1 = Float64(2.0 + Float64(x / 0.5)) tmp = 0.0 if (F <= -6.3e+217) tmp = t_0; elseif (F <= -3.9e-13) tmp = Float64(Float64(Float64(-1.0 + Float64(0.5 * Float64(Float64(Float64(2.0 + Float64(x * 2.0)) / Float64(F * F)) + Float64(Float64(t_1 / Float64(F * F)) * Float64(Float64(t_1 * -0.75) / Float64(F * F)))))) - x) / B); elseif (F <= 25.0) tmp = t_0; elseif (F <= 2.5e+128) tmp = Float64(1.0 / sin(B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / (0.0 - tan(B)); t_1 = 2.0 + (x / 0.5); tmp = 0.0; if (F <= -6.3e+217) tmp = t_0; elseif (F <= -3.9e-13) tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_1 / (F * F)) * ((t_1 * -0.75) / (F * F)))))) - x) / B; elseif (F <= 25.0) tmp = t_0; elseif (F <= 2.5e+128) tmp = 1.0 / sin(B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(x / 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -6.3e+217], t$95$0, If[LessEqual[F, -3.9e-13], N[(N[(N[(-1.0 + N[(0.5 * N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * -0.75), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 25.0], t$95$0, If[LessEqual[F, 2.5e+128], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{0 - \tan B}\\
t_1 := 2 + \frac{x}{0.5}\\
\mathbf{if}\;F \leq -6.3 \cdot 10^{+217}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -3.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{t\_1}{F \cdot F} \cdot \frac{t\_1 \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\
\mathbf{elif}\;F \leq 25:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+128}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -6.30000000000000023e217 or -3.90000000000000004e-13 < F < 25 or 2.5e128 < F Initial program 79.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified87.9%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr87.9%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6465.3%
Simplified65.3%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6465.4%
Applied egg-rr65.4%
if -6.30000000000000023e217 < F < -3.90000000000000004e-13Initial program 71.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6443.3%
Simplified43.3%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified45.4%
associate-*l*N/A
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f6451.0%
Applied egg-rr51.0%
if 25 < F < 2.5e128Initial program 87.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.9%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6496.6%
Simplified96.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6464.0%
Simplified64.0%
Final simplification62.1%
(FPCore (F B x) :precision binary64 (if (<= B 0.0013) (/ (- (* F (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))) x) B) (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.0013) {
tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = x / (0.0 - tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 0.0013d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0)))))) - x) / b
else
tmp = x / (0.0d0 - tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 0.0013) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B;
} else {
tmp = x / (0.0 - Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 0.0013: tmp = ((F * math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B else: tmp = x / (0.0 - math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 0.0013) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0)))))) - x) / B); else tmp = Float64(x / Float64(0.0 - tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 0.0013) tmp = ((F * sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0)))))) - x) / B; else tmp = x / (0.0 - tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 0.0013], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.0013:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\end{array}
\end{array}
if B < 0.0012999999999999999Initial program 75.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6460.1%
Simplified60.1%
if 0.0012999999999999999 < B Initial program 89.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified90.0%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr89.9%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6453.3%
Simplified53.3%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6453.5%
Applied egg-rr53.5%
Final simplification58.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (- 0.0 (tan B)))))
(if (<= F -1.35e-15)
(- (/ -1.0 B) (/ x (tan B)))
(if (<= F 53.0) t_0 (if (<= F 2.2e+128) (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / (0.0 - tan(B));
double tmp;
if (F <= -1.35e-15) {
tmp = (-1.0 / B) - (x / tan(B));
} else if (F <= 53.0) {
tmp = t_0;
} else if (F <= 2.2e+128) {
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 = x / (0.0d0 - tan(b))
if (f <= (-1.35d-15)) then
tmp = ((-1.0d0) / b) - (x / tan(b))
else if (f <= 53.0d0) then
tmp = t_0
else if (f <= 2.2d+128) 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 = x / (0.0 - Math.tan(B));
double tmp;
if (F <= -1.35e-15) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else if (F <= 53.0) {
tmp = t_0;
} else if (F <= 2.2e+128) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / (0.0 - math.tan(B)) tmp = 0 if F <= -1.35e-15: tmp = (-1.0 / B) - (x / math.tan(B)) elif F <= 53.0: tmp = t_0 elif F <= 2.2e+128: tmp = 1.0 / math.sin(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(x / Float64(0.0 - tan(B))) tmp = 0.0 if (F <= -1.35e-15) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); elseif (F <= 53.0) tmp = t_0; elseif (F <= 2.2e+128) tmp = Float64(1.0 / sin(B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / (0.0 - tan(B)); tmp = 0.0; if (F <= -1.35e-15) tmp = (-1.0 / B) - (x / tan(B)); elseif (F <= 53.0) tmp = t_0; elseif (F <= 2.2e+128) tmp = 1.0 / sin(B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.35e-15], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 53.0], t$95$0, If[LessEqual[F, 2.2e+128], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{0 - \tan B}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{-15}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 53:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{+128}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -1.35000000000000005e-15Initial program 64.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified77.9%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6444.9%
Simplified44.9%
Taylor expanded in F around -inf
/-lowering-/.f6467.0%
Simplified67.0%
if -1.35000000000000005e-15 < F < 53 or 2.20000000000000017e128 < F Initial program 84.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified90.1%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr90.1%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6464.3%
Simplified64.3%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6464.4%
Applied egg-rr64.4%
if 53 < F < 2.20000000000000017e128Initial program 87.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.9%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6496.6%
Simplified96.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6464.0%
Simplified64.0%
Final simplification65.1%
(FPCore (F B x) :precision binary64 (if (<= B 3.8e-5) (/ (- (/ F (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) x) B) (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 3.8e-5) {
tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = x / (0.0 - tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (b <= 3.8d-5) then
tmp = ((f / sqrt(((f * f) + (2.0d0 + (x * 2.0d0))))) - x) / b
else
tmp = x / (0.0d0 - tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 3.8e-5) {
tmp = ((F / Math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B;
} else {
tmp = x / (0.0 - Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 3.8e-5: tmp = ((F / math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B else: tmp = x / (0.0 - math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 3.8e-5) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) - x) / B); else tmp = Float64(x / Float64(0.0 - tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 3.8e-5) tmp = ((F / sqrt(((F * F) + (2.0 + (x * 2.0))))) - x) / B; else tmp = x / (0.0 - tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 3.8e-5], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 3.8 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\end{array}
\end{array}
if B < 3.8000000000000002e-5Initial program 75.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6460.1%
Simplified60.1%
/-lowering-/.f64N/A
Applied egg-rr60.1%
if 3.8000000000000002e-5 < B Initial program 89.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified90.0%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr89.9%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6453.3%
Simplified53.3%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6453.5%
Applied egg-rr53.5%
Final simplification58.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (/ x 0.5))))
(if (<= F -4.3e-16)
(/
(-
(+
-1.0
(*
0.5
(+
(/ (+ 2.0 (* x 2.0)) (* F F))
(* (/ t_0 (* F F)) (/ (* t_0 -0.75) (* F F))))))
x)
B)
(if (<= F 0.0032)
(/ x (- 0.0 B))
(if (<= F 3.3e+175)
(/ 1.0 (sin B))
(/ (+ 1.0 (* x (- -1.0 (* (* B B) -0.3333333333333333)))) B))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x / 0.5);
double tmp;
if (F <= -4.3e-16) {
tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B;
} else if (F <= 0.0032) {
tmp = x / (0.0 - B);
} else if (F <= 3.3e+175) {
tmp = 1.0 / sin(B);
} else {
tmp = (1.0 + (x * (-1.0 - ((B * B) * -0.3333333333333333)))) / 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 = 2.0d0 + (x / 0.5d0)
if (f <= (-4.3d-16)) then
tmp = (((-1.0d0) + (0.5d0 * (((2.0d0 + (x * 2.0d0)) / (f * f)) + ((t_0 / (f * f)) * ((t_0 * (-0.75d0)) / (f * f)))))) - x) / b
else if (f <= 0.0032d0) then
tmp = x / (0.0d0 - b)
else if (f <= 3.3d+175) then
tmp = 1.0d0 / sin(b)
else
tmp = (1.0d0 + (x * ((-1.0d0) - ((b * b) * (-0.3333333333333333d0))))) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x / 0.5);
double tmp;
if (F <= -4.3e-16) {
tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B;
} else if (F <= 0.0032) {
tmp = x / (0.0 - B);
} else if (F <= 3.3e+175) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = (1.0 + (x * (-1.0 - ((B * B) * -0.3333333333333333)))) / B;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x / 0.5) tmp = 0 if F <= -4.3e-16: tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B elif F <= 0.0032: tmp = x / (0.0 - B) elif F <= 3.3e+175: tmp = 1.0 / math.sin(B) else: tmp = (1.0 + (x * (-1.0 - ((B * B) * -0.3333333333333333)))) / B return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x / 0.5)) tmp = 0.0 if (F <= -4.3e-16) tmp = Float64(Float64(Float64(-1.0 + Float64(0.5 * Float64(Float64(Float64(2.0 + Float64(x * 2.0)) / Float64(F * F)) + Float64(Float64(t_0 / Float64(F * F)) * Float64(Float64(t_0 * -0.75) / Float64(F * F)))))) - x) / B); elseif (F <= 0.0032) tmp = Float64(x / Float64(0.0 - B)); elseif (F <= 3.3e+175) tmp = Float64(1.0 / sin(B)); else tmp = Float64(Float64(1.0 + Float64(x * Float64(-1.0 - Float64(Float64(B * B) * -0.3333333333333333)))) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x / 0.5); tmp = 0.0; if (F <= -4.3e-16) tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B; elseif (F <= 0.0032) tmp = x / (0.0 - B); elseif (F <= 3.3e+175) tmp = 1.0 / sin(B); else tmp = (1.0 + (x * (-1.0 - ((B * B) * -0.3333333333333333)))) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x / 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.3e-16], N[(N[(N[(-1.0 + N[(0.5 * N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 * -0.75), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0032], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.3e+175], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(x * N[(-1.0 - N[(N[(B * B), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + \frac{x}{0.5}\\
\mathbf{if}\;F \leq -4.3 \cdot 10^{-16}:\\
\;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{t\_0}{F \cdot F} \cdot \frac{t\_0 \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\
\mathbf{elif}\;F \leq 0.0032:\\
\;\;\;\;\frac{x}{0 - B}\\
\mathbf{elif}\;F \leq 3.3 \cdot 10^{+175}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + x \cdot \left(-1 - \left(B \cdot B\right) \cdot -0.3333333333333333\right)}{B}\\
\end{array}
\end{array}
if F < -4.2999999999999999e-16Initial program 64.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified39.8%
associate-*l*N/A
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f6451.2%
Applied egg-rr51.2%
if -4.2999999999999999e-16 < F < 0.00320000000000000015Initial program 99.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.2%
Simplified59.2%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6438.0%
Simplified38.0%
if 0.00320000000000000015 < F < 3.3000000000000002e175Initial program 79.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified89.9%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6497.6%
Simplified97.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6457.0%
Simplified57.0%
if 3.3000000000000002e175 < F Initial program 43.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified68.4%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Taylor expanded in B around 0
/-lowering-/.f6484.0%
Simplified84.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.3%
Final simplification47.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -7.2e-16)
(- (/ -1.0 B) t_0)
(if (<= F 1.8e-125) (/ x (- 0.0 (tan B))) (- (/ 1.0 B) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -7.2e-16) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.8e-125) {
tmp = x / (0.0 - tan(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 <= (-7.2d-16)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.8d-125) then
tmp = x / (0.0d0 - tan(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 <= -7.2e-16) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.8e-125) {
tmp = x / (0.0 - Math.tan(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 <= -7.2e-16: tmp = (-1.0 / B) - t_0 elif F <= 1.8e-125: tmp = x / (0.0 - math.tan(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 <= -7.2e-16) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.8e-125) tmp = Float64(x / Float64(0.0 - tan(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 <= -7.2e-16) tmp = (-1.0 / B) - t_0; elseif (F <= 1.8e-125) tmp = x / (0.0 - tan(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, -7.2e-16], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.8e-125], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $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 -7.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -7.19999999999999965e-16Initial program 64.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified77.9%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6444.9%
Simplified44.9%
Taylor expanded in F around -inf
/-lowering-/.f6467.0%
Simplified67.0%
if -7.19999999999999965e-16 < F < 1.8000000000000001e-125Initial program 99.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6469.4%
Simplified69.4%
mul-1-negN/A
distribute-frac-negN/A
clear-numN/A
associate-/l/N/A
tan-quotN/A
clear-numN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6469.5%
Applied egg-rr69.5%
if 1.8000000000000001e-125 < F Initial program 72.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified85.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6484.8%
Simplified84.8%
Taylor expanded in B around 0
/-lowering-/.f6465.2%
Simplified65.2%
Final simplification67.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (/ x 0.5))))
(if (<= F -3.9e-13)
(/
(-
(+
-1.0
(*
0.5
(+
(/ (+ 2.0 (* x 2.0)) (* F F))
(* (/ t_0 (* F F)) (/ (* t_0 -0.75) (* F F))))))
x)
B)
(if (<= F 0.00072)
(/ x (- 0.0 B))
(- (/ (+ 1.0 (/ (- -1.0 x) (* F F))) B) (/ x B))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x / 0.5);
double tmp;
if (F <= -3.9e-13) {
tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B;
} else if (F <= 0.00072) {
tmp = x / (0.0 - B);
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = 2.0d0 + (x / 0.5d0)
if (f <= (-3.9d-13)) then
tmp = (((-1.0d0) + (0.5d0 * (((2.0d0 + (x * 2.0d0)) / (f * f)) + ((t_0 / (f * f)) * ((t_0 * (-0.75d0)) / (f * f)))))) - x) / b
else if (f <= 0.00072d0) then
tmp = x / (0.0d0 - b)
else
tmp = ((1.0d0 + (((-1.0d0) - x) / (f * f))) / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x / 0.5);
double tmp;
if (F <= -3.9e-13) {
tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B;
} else if (F <= 0.00072) {
tmp = x / (0.0 - B);
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B);
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x / 0.5) tmp = 0 if F <= -3.9e-13: tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B elif F <= 0.00072: tmp = x / (0.0 - B) else: tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x / 0.5)) tmp = 0.0 if (F <= -3.9e-13) tmp = Float64(Float64(Float64(-1.0 + Float64(0.5 * Float64(Float64(Float64(2.0 + Float64(x * 2.0)) / Float64(F * F)) + Float64(Float64(t_0 / Float64(F * F)) * Float64(Float64(t_0 * -0.75) / Float64(F * F)))))) - x) / B); elseif (F <= 0.00072) tmp = Float64(x / Float64(0.0 - B)); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x / 0.5); tmp = 0.0; if (F <= -3.9e-13) tmp = ((-1.0 + (0.5 * (((2.0 + (x * 2.0)) / (F * F)) + ((t_0 / (F * F)) * ((t_0 * -0.75) / (F * F)))))) - x) / B; elseif (F <= 0.00072) tmp = x / (0.0 - B); else tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x / 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.9e-13], N[(N[(N[(-1.0 + N[(0.5 * N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$0 * -0.75), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.00072], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + \frac{x}{0.5}\\
\mathbf{if}\;F \leq -3.9 \cdot 10^{-13}:\\
\;\;\;\;\frac{\left(-1 + 0.5 \cdot \left(\frac{2 + x \cdot 2}{F \cdot F} + \frac{t\_0}{F \cdot F} \cdot \frac{t\_0 \cdot -0.75}{F \cdot F}\right)\right) - x}{B}\\
\mathbf{elif}\;F \leq 0.00072:\\
\;\;\;\;\frac{x}{0 - B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.90000000000000004e-13Initial program 64.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
Simplified39.8%
associate-*l*N/A
metadata-evalN/A
pow-prod-upN/A
pow2N/A
pow2N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
metadata-evalN/A
div-invN/A
/-lowering-/.f64N/A
*-lowering-*.f6451.2%
Applied egg-rr51.2%
if -3.90000000000000004e-13 < F < 7.20000000000000045e-4Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.8%
Simplified58.8%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6437.3%
Simplified37.3%
if 7.20000000000000045e-4 < F Initial program 65.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.8%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.7%
Simplified47.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f6445.5%
Simplified45.5%
associate-+r-N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r-N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6445.5%
Applied egg-rr45.5%
Final simplification43.9%
(FPCore (F B x)
:precision binary64
(if (<= F -4e-16)
(/ (- -1.0 x) B)
(if (<= F 0.0007)
(/ x (- 0.0 B))
(- (/ (+ 1.0 (/ (- -1.0 x) (* F F))) B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4e-16) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.0007) {
tmp = x / (0.0 - B);
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / 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 <= (-4d-16)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 0.0007d0) then
tmp = x / (0.0d0 - b)
else
tmp = ((1.0d0 + (((-1.0d0) - x) / (f * f))) / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4e-16) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.0007) {
tmp = x / (0.0 - B);
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4e-16: tmp = (-1.0 - x) / B elif F <= 0.0007: tmp = x / (0.0 - B) else: tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4e-16) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 0.0007) tmp = Float64(x / Float64(0.0 - B)); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4e-16) tmp = (-1.0 - x) / B; elseif (F <= 0.0007) tmp = x / (0.0 - B); else tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4e-16], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0007], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 0.0007:\\
\;\;\;\;\frac{x}{0 - B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -3.9999999999999999e-16Initial program 64.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.8%
Simplified50.8%
if -3.9999999999999999e-16 < F < 6.99999999999999993e-4Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.8%
Simplified58.8%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6437.3%
Simplified37.3%
if 6.99999999999999993e-4 < F Initial program 65.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.8%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.7%
Simplified47.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f6445.5%
Simplified45.5%
associate-+r-N/A
div-subN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-+r-N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6445.5%
Applied egg-rr45.5%
Final simplification43.8%
(FPCore (F B x)
:precision binary64
(if (<= F -7.2e-17)
(/ (- -1.0 x) B)
(if (<= F 0.0006)
(/ x (- 0.0 B))
(/ (+ (/ (/ (- -1.0 x) F) F) (- 1.0 x)) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.0006) {
tmp = x / (0.0 - B);
} else {
tmp = ((((-1.0 - x) / F) / F) + (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.2d-17)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 0.0006d0) then
tmp = x / (0.0d0 - b)
else
tmp = (((((-1.0d0) - x) / f) / f) + (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.2e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 0.0006) {
tmp = x / (0.0 - B);
} else {
tmp = ((((-1.0 - x) / F) / F) + (1.0 - x)) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-17: tmp = (-1.0 - x) / B elif F <= 0.0006: tmp = x / (0.0 - B) else: tmp = ((((-1.0 - x) / F) / F) + (1.0 - x)) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-17) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 0.0006) tmp = Float64(x / Float64(0.0 - B)); else tmp = Float64(Float64(Float64(Float64(Float64(-1.0 - x) / F) / F) + Float64(1.0 - x)) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-17) tmp = (-1.0 - x) / B; elseif (F <= 0.0006) tmp = x / (0.0 - B); else tmp = ((((-1.0 - x) / F) / F) + (1.0 - x)) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 0.0006], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(-1.0 - x), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision] + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 0.0006:\\
\;\;\;\;\frac{x}{0 - B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{-1 - x}{F}}{F} + \left(1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e-17Initial program 64.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.8%
Simplified50.8%
if -7.1999999999999999e-17 < F < 5.99999999999999947e-4Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.8%
Simplified58.8%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6437.3%
Simplified37.3%
if 5.99999999999999947e-4 < F Initial program 65.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.8%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6447.7%
Simplified47.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6454.7%
Simplified54.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-commutativeN/A
associate--l+N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
distribute-lft-inN/A
metadata-evalN/A
associate-*r*N/A
metadata-evalN/A
mul-1-negN/A
+-lowering-+.f64N/A
neg-sub0N/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f64N/A
--lowering--.f6445.5%
Simplified45.5%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
associate-+r-N/A
metadata-evalN/A
--lowering--.f6445.5%
Applied egg-rr45.5%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e-17) (/ (- -1.0 x) B) (if (<= F 1.75e-125) (/ x (- 0.0 B)) (- (/ 1.0 B) (/ x B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.75e-125) {
tmp = x / (0.0 - B);
} else {
tmp = (1.0 / 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 <= (-7.2d-17)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.75d-125) then
tmp = x / (0.0d0 - b)
else
tmp = (1.0d0 / b) - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.75e-125) {
tmp = x / (0.0 - B);
} else {
tmp = (1.0 / B) - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-17: tmp = (-1.0 - x) / B elif F <= 1.75e-125: tmp = x / (0.0 - B) else: tmp = (1.0 / B) - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-17) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.75e-125) tmp = Float64(x / Float64(0.0 - B)); else tmp = Float64(Float64(1.0 / B) - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -7.2e-17) tmp = (-1.0 - x) / B; elseif (F <= 1.75e-125) tmp = x / (0.0 - B); else tmp = (1.0 / B) - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.75e-125], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.75 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{0 - B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - \frac{x}{B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e-17Initial program 64.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.8%
Simplified50.8%
if -7.1999999999999999e-17 < F < 1.74999999999999999e-125Initial program 99.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6441.4%
Simplified41.4%
if 1.74999999999999999e-125 < F Initial program 72.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified85.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6484.8%
Simplified84.8%
Taylor expanded in B around 0
/-lowering-/.f6465.2%
Simplified65.2%
Taylor expanded in B around 0
/-lowering-/.f6440.5%
Simplified40.5%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F -7.2e-17) (/ (- -1.0 x) B) (if (<= F 1.8e-125) (/ x (- 0.0 B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -7.2e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.8e-125) {
tmp = x / (0.0 - 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.2d-17)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.8d-125) then
tmp = x / (0.0d0 - 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.2e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.8e-125) {
tmp = x / (0.0 - B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -7.2e-17: tmp = (-1.0 - x) / B elif F <= 1.8e-125: tmp = x / (0.0 - B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -7.2e-17) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.8e-125) tmp = Float64(x / Float64(0.0 - 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.2e-17) tmp = (-1.0 - x) / B; elseif (F <= 1.8e-125) tmp = x / (0.0 - B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -7.2e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.8e-125], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -7.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{x}{0 - B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -7.1999999999999999e-17Initial program 64.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.8%
Simplified50.8%
if -7.1999999999999999e-17 < F < 1.8000000000000001e-125Initial program 99.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6457.5%
Simplified57.5%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6441.4%
Simplified41.4%
if 1.8000000000000001e-125 < F Initial program 72.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6442.6%
Simplified42.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6440.4%
Simplified40.4%
Final simplification43.8%
(FPCore (F B x) :precision binary64 (if (<= F -2.3e-14) (/ (- -1.0 x) B) (/ x (- 0.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-14) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / (0.0 - B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.3d-14)) then
tmp = ((-1.0d0) - x) / b
else
tmp = x / (0.0d0 - b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-14) {
tmp = (-1.0 - x) / B;
} else {
tmp = x / (0.0 - B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-14: tmp = (-1.0 - x) / B else: tmp = x / (0.0 - B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-14) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(x / Float64(0.0 - B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-14) tmp = (-1.0 - x) / B; else tmp = x / (0.0 - B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-14], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(x / N[(0.0 - B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-14}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - B}\\
\end{array}
\end{array}
if F < -2.29999999999999998e-14Initial program 64.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6441.8%
Simplified41.8%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6450.8%
Simplified50.8%
if -2.29999999999999998e-14 < F Initial program 84.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.4%
Simplified49.4%
Taylor expanded in F around 0
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
neg-sub0N/A
--lowering--.f6433.0%
Simplified33.0%
Final simplification38.2%
(FPCore (F B x) :precision binary64 (if (<= F 1.45e-67) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 1.45e-67) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 1.45d-67) then
tmp = (-1.0d0) / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 1.45e-67) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 1.45e-67: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 1.45e-67) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 1.45e-67) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 1.45e-67], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 1.45 \cdot 10^{-67}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 1.45000000000000002e-67Initial program 83.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.2%
Simplified51.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6433.5%
Simplified33.5%
Taylor expanded in x around 0
/-lowering-/.f6415.9%
Simplified15.9%
if 1.45000000000000002e-67 < F Initial program 69.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified84.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6488.5%
Simplified88.5%
Taylor expanded in B around 0
/-lowering-/.f6464.4%
Simplified64.4%
Taylor expanded in x around 0
/-lowering-/.f6418.8%
Simplified18.8%
(FPCore (F B x) :precision binary64 (/ (- -1.0 x) B))
double code(double F, double B, double x) {
return (-1.0 - 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 = ((-1.0d0) - x) / b
end function
public static double code(double F, double B, double x) {
return (-1.0 - x) / B;
}
def code(F, B, x): return (-1.0 - x) / B
function code(F, B, x) return Float64(Float64(-1.0 - x) / B) end
function tmp = code(F, B, x) tmp = (-1.0 - x) / B; end
code[F_, B_, x_] := N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1 - x}{B}
\end{array}
Initial program 78.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6447.1%
Simplified47.1%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6429.9%
Simplified29.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 78.9%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6447.1%
Simplified47.1%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6429.9%
Simplified29.9%
Taylor expanded in x around 0
/-lowering-/.f6411.3%
Simplified11.3%
herbie shell --seed 2024163
(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))))))