
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 29 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.32e+17)
(- (/ -1.0 (sin B)) (* (/ x (sin B)) (cos B)))
(if (<= F 0.14)
(-
(* (/ 1.0 (/ (sin B) F)) (pow (+ (* F F) (- 2.0 (* x -2.0))) -0.5))
t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.32e+17) {
tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B));
} else if (F <= 0.14) {
tmp = ((1.0 / (sin(B) / F)) * pow(((F * F) + (2.0 - (x * -2.0))), -0.5)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.32d+17)) then
tmp = ((-1.0d0) / sin(b)) - ((x / sin(b)) * cos(b))
else if (f <= 0.14d0) then
tmp = ((1.0d0 / (sin(b) / f)) * (((f * f) + (2.0d0 - (x * (-2.0d0)))) ** (-0.5d0))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.32e+17) {
tmp = (-1.0 / Math.sin(B)) - ((x / Math.sin(B)) * Math.cos(B));
} else if (F <= 0.14) {
tmp = ((1.0 / (Math.sin(B) / F)) * Math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.32e+17: tmp = (-1.0 / math.sin(B)) - ((x / math.sin(B)) * math.cos(B)) elif F <= 0.14: tmp = ((1.0 / (math.sin(B) / F)) * math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.32e+17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B))); elseif (F <= 0.14) tmp = Float64(Float64(Float64(1.0 / Float64(sin(B) / F)) * (Float64(Float64(F * F) + Float64(2.0 - Float64(x * -2.0))) ^ -0.5)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.32e+17) tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B)); elseif (F <= 0.14) tmp = ((1.0 / (sin(B) / F)) * (((F * F) + (2.0 - (x * -2.0))) ^ -0.5)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.32e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(N[(1.0 / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $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.32 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;\frac{1}{\frac{\sin B}{F}} \cdot {\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.32e17Initial program 65.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
div-invN/A
tan-quotN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
cos-lowering-cos.f6499.8%
Applied egg-rr99.8%
if -1.32e17 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f6499.6%
Applied egg-rr99.6%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.35e+17)
(- (/ -1.0 (sin B)) (* (/ x (sin B)) (cos B)))
(if (<= F 0.14)
(- (* 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 <= -1.35e+17) {
tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B));
} else if (F <= 0.14) {
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 <= (-1.35d+17)) then
tmp = ((-1.0d0) / sin(b)) - ((x / sin(b)) * cos(b))
else if (f <= 0.14d0) 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 <= -1.35e+17) {
tmp = (-1.0 / Math.sin(B)) - ((x / Math.sin(B)) * Math.cos(B));
} else if (F <= 0.14) {
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 <= -1.35e+17: tmp = (-1.0 / math.sin(B)) - ((x / math.sin(B)) * math.cos(B)) elif F <= 0.14: 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 <= -1.35e+17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B))); elseif (F <= 0.14) tmp = Float64(Float64(F * Float64((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 <= -1.35e+17) tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B)); elseif (F <= 0.14) 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, -1.35e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(F * N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.35 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;F \cdot \frac{{\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 < -1.35e17Initial program 65.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
div-invN/A
tan-quotN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
cos-lowering-cos.f6499.8%
Applied egg-rr99.8%
if -1.35e17 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4e+131)
(- (/ -1.0 (sin B)) (* (/ x (sin B)) (cos B)))
(if (<= F 0.14)
(- (/ (/ 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 <= -4e+131) {
tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B));
} else if (F <= 0.14) {
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 <= (-4d+131)) then
tmp = ((-1.0d0) / sin(b)) - ((x / sin(b)) * cos(b))
else if (f <= 0.14d0) 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 <= -4e+131) {
tmp = (-1.0 / Math.sin(B)) - ((x / Math.sin(B)) * Math.cos(B));
} else if (F <= 0.14) {
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 <= -4e+131: tmp = (-1.0 / math.sin(B)) - ((x / math.sin(B)) * math.cos(B)) elif F <= 0.14: 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 <= -4e+131) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(Float64(x / sin(B)) * cos(B))); elseif (F <= 0.14) 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 <= -4e+131) tmp = (-1.0 / sin(B)) - ((x / sin(B)) * cos(B)); elseif (F <= 0.14) 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, -4e+131], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(N[(x / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Cos[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.14], 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 -4 \cdot 10^{+131}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\sin B} \cdot \cos B\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;\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 < -3.9999999999999996e131Initial program 47.1%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
div-invN/A
tan-quotN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
cos-lowering-cos.f6499.8%
Applied egg-rr99.8%
if -3.9999999999999996e131 < F < 0.14000000000000001Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.95)
(-
(/ (/ F (* F (+ -1.0 (/ (- -1.0 (* (* x 2.0) 0.5)) (* F F))))) (sin B))
t_0)
(if (<= F 0.14)
(- (/ (* F (sqrt (/ 1.0 (+ 2.0 (* x 2.0))))) (sin B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.95) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) / sin(B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.95d0)) then
tmp = ((f / (f * ((-1.0d0) + (((-1.0d0) - ((x * 2.0d0) * 0.5d0)) / (f * f))))) / sin(b)) - t_0
else if (f <= 0.14d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (x * 2.0d0))))) / sin(b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.95) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / Math.sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (x * 2.0))))) / Math.sin(B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.95: tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / math.sin(B)) - t_0 elif F <= 0.14: tmp = ((F * math.sqrt((1.0 / (2.0 + (x * 2.0))))) / math.sin(B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.95) tmp = Float64(Float64(Float64(F / Float64(F * Float64(-1.0 + Float64(Float64(-1.0 - Float64(Float64(x * 2.0) * 0.5)) / Float64(F * F))))) / sin(B)) - t_0); elseif (F <= 0.14) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0))))) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.95) tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0; elseif (F <= 0.14) tmp = ((F * sqrt((1.0 / (2.0 + (x * 2.0))))) / sin(B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.95], N[(N[(N[(F / N[(F * N[(-1.0 + N[(N[(-1.0 - N[(N[(x * 2.0), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(N[(F * N[Sqrt[N[(1.0 / 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 -0.95:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(-1 + \frac{-1 - \left(x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.94999999999999996Initial program 66.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified66.5%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr78.5%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr78.6%
Taylor expanded in F around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified99.2%
if -0.94999999999999996 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in F around 0
cancel-sign-sub-invN/A
metadata-evalN/A
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
+-lowering-+.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6499.3%
Simplified99.3%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(-
(/ (/ F (* F (+ -1.0 (/ (- -1.0 (* (* x 2.0) 0.5)) (* F F))))) (sin B))
t_0)
(if (<= F 0.14)
(- (* F (/ (sqrt (/ 1.0 (+ 2.0 (* x 2.0)))) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.9d0)) then
tmp = ((f / (f * ((-1.0d0) + (((-1.0d0) - ((x * 2.0d0) * 0.5d0)) / (f * f))))) / sin(b)) - t_0
else if (f <= 0.14d0) then
tmp = (f * (sqrt((1.0d0 / (2.0d0 + (x * 2.0d0)))) / sin(b))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.9) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / Math.sin(B)) - t_0;
} else if (F <= 0.14) {
tmp = (F * (Math.sqrt((1.0 / (2.0 + (x * 2.0)))) / Math.sin(B))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.9: tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / math.sin(B)) - t_0 elif F <= 0.14: tmp = (F * (math.sqrt((1.0 / (2.0 + (x * 2.0)))) / math.sin(B))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.9) tmp = Float64(Float64(Float64(F / Float64(F * Float64(-1.0 + Float64(Float64(-1.0 - Float64(Float64(x * 2.0) * 0.5)) / Float64(F * F))))) / sin(B)) - t_0); elseif (F <= 0.14) tmp = Float64(Float64(F * Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(x * 2.0)))) / sin(B))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.9) tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0; elseif (F <= 0.14) tmp = (F * (sqrt((1.0 / (2.0 + (x * 2.0)))) / sin(B))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.9], N[(N[(N[(F / N[(F * N[(-1.0 + N[(N[(-1.0 - N[(N[(x * 2.0), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(F * N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.9:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(-1 + \frac{-1 - \left(x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;F \cdot \frac{\sqrt{\frac{1}{2 + x \cdot 2}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -0.900000000000000022Initial program 66.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified66.5%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr78.5%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr78.6%
Taylor expanded in F around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified99.2%
if -0.900000000000000022 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
+-lowering-+.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6499.3%
Simplified99.3%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.9)
(-
(/ (/ F (* F (+ -1.0 (/ (- -1.0 (* (* x 2.0) 0.5)) (* F F))))) (sin B))
t_0)
(if (<= F 0.14)
(- (/ (/ 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 <= -0.9) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0;
} else if (F <= 0.14) {
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 <= (-0.9d0)) then
tmp = ((f / (f * ((-1.0d0) + (((-1.0d0) - ((x * 2.0d0) * 0.5d0)) / (f * f))))) / sin(b)) - t_0
else if (f <= 0.14d0) 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 <= -0.9) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / Math.sin(B)) - t_0;
} else if (F <= 0.14) {
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 <= -0.9: tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / math.sin(B)) - t_0 elif F <= 0.14: 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 <= -0.9) tmp = Float64(Float64(Float64(F / Float64(F * Float64(-1.0 + Float64(Float64(-1.0 - Float64(Float64(x * 2.0) * 0.5)) / Float64(F * F))))) / sin(B)) - t_0); elseif (F <= 0.14) 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 <= -0.9) tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0; elseif (F <= 0.14) 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, -0.9], N[(N[(N[(F / N[(F * N[(-1.0 + N[(N[(-1.0 - N[(N[(x * 2.0), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 0.14], 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 -0.9:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(-1 + \frac{-1 - \left(x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;\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 < -0.900000000000000022Initial program 66.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified66.5%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr78.5%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr78.6%
Taylor expanded in F around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified99.2%
if -0.900000000000000022 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
+-lowering-+.f64N/A
distribute-lft-neg-inN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f6499.3%
Simplified99.3%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.4%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.7e-5)
(-
(/ (/ F (* F (+ -1.0 (/ (- -1.0 (* (* x 2.0) 0.5)) (* F F))))) (sin B))
t_0)
(if (<= F -4e-147)
(- (* F (/ (pow (+ (* F F) (+ 2.0 (* x 2.0))) -0.5) (sin B))) (/ x B))
(if (<= F 0.14)
(-
(*
(pow (+ (* F F) (- 2.0 (* x -2.0))) -0.5)
(/ F (* B (+ 1.0 (* B (* B -0.16666666666666666))))))
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.7e-5) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0;
} else if (F <= -4e-147) {
tmp = (F * (pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / sin(B))) - (x / B);
} else if (F <= 0.14) {
tmp = (pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - 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.7d-5)) then
tmp = ((f / (f * ((-1.0d0) + (((-1.0d0) - ((x * 2.0d0) * 0.5d0)) / (f * f))))) / sin(b)) - t_0
else if (f <= (-4d-147)) then
tmp = (f * ((((f * f) + (2.0d0 + (x * 2.0d0))) ** (-0.5d0)) / sin(b))) - (x / b)
else if (f <= 0.14d0) then
tmp = ((((f * f) + (2.0d0 - (x * (-2.0d0)))) ** (-0.5d0)) * (f / (b * (1.0d0 + (b * (b * (-0.16666666666666666d0))))))) - 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.7e-5) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / Math.sin(B)) - t_0;
} else if (F <= -4e-147) {
tmp = (F * (Math.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / Math.sin(B))) - (x / B);
} else if (F <= 0.14) {
tmp = (Math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - 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.7e-5: tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / math.sin(B)) - t_0 elif F <= -4e-147: tmp = (F * (math.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / math.sin(B))) - (x / B) elif F <= 0.14: tmp = (math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - 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.7e-5) tmp = Float64(Float64(Float64(F / Float64(F * Float64(-1.0 + Float64(Float64(-1.0 - Float64(Float64(x * 2.0) * 0.5)) / Float64(F * F))))) / sin(B)) - t_0); elseif (F <= -4e-147) tmp = Float64(Float64(F * Float64((Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) ^ -0.5) / sin(B))) - Float64(x / B)); elseif (F <= 0.14) tmp = Float64(Float64((Float64(Float64(F * F) + Float64(2.0 - Float64(x * -2.0))) ^ -0.5) * Float64(F / Float64(B * Float64(1.0 + Float64(B * Float64(B * -0.16666666666666666)))))) - 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.7e-5) tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0; elseif (F <= -4e-147) tmp = (F * ((((F * F) + (2.0 + (x * 2.0))) ^ -0.5) / sin(B))) - (x / B); elseif (F <= 0.14) tmp = ((((F * F) + (2.0 - (x * -2.0))) ^ -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - 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.7e-5], N[(N[(N[(F / N[(F * N[(-1.0 + N[(N[(-1.0 - N[(N[(x * 2.0), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4e-147], N[(N[(F * N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[(B * N[(1.0 + N[(B * N[(B * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.7 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(-1 + \frac{-1 - \left(x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-147}:\\
\;\;\;\;F \cdot \frac{{\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;{\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5} \cdot \frac{F}{B \cdot \left(1 + B \cdot \left(B \cdot -0.16666666666666666\right)\right)} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.7e-5Initial program 67.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.3%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.0%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr79.1%
Taylor expanded in F around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified99.2%
if -1.7e-5 < F < -3.9999999999999999e-147Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
Simplified79.3%
if -3.9999999999999999e-147 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6485.9%
Simplified85.9%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification92.2%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(* F (/ (pow (+ (* F F) (+ 2.0 (* x 2.0))) -0.5) (sin B)))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -2.15e-5)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -4e-151)
t_0
(if (<= F 1.25e-143)
(/ x (- 0.0 (tan B)))
(if (<= F 0.029) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F * (pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / sin(B))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -2.15e-5) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -4e-151) {
tmp = t_0;
} else if (F <= 1.25e-143) {
tmp = x / (0.0 - tan(B));
} else if (F <= 0.029) {
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 * ((((f * f) + (2.0d0 + (x * 2.0d0))) ** (-0.5d0)) / sin(b))) - (x / b)
t_1 = x / tan(b)
if (f <= (-2.15d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-4d-151)) then
tmp = t_0
else if (f <= 1.25d-143) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 0.029d0) 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.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / Math.sin(B))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -2.15e-5) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -4e-151) {
tmp = t_0;
} else if (F <= 1.25e-143) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 0.029) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F * (math.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / math.sin(B))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -2.15e-5: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -4e-151: tmp = t_0 elif F <= 1.25e-143: tmp = x / (0.0 - math.tan(B)) elif F <= 0.029: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F * Float64((Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) ^ -0.5) / sin(B))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.15e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -4e-151) tmp = t_0; elseif (F <= 1.25e-143) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 0.029) 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 * ((((F * F) + (2.0 + (x * 2.0))) ^ -0.5) / sin(B))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -2.15e-5) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -4e-151) tmp = t_0; elseif (F <= 1.25e-143) tmp = x / (0.0 - tan(B)); elseif (F <= 0.029) 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[(F * N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.15e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -4e-151], t$95$0, If[LessEqual[F, 1.25e-143], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.029], 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{{\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.15 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-151}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-143}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 0.029:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -2.1500000000000001e-5Initial program 67.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.7%
Simplified98.7%
if -2.1500000000000001e-5 < F < -3.9999999999999998e-151 or 1.2500000000000001e-143 < F < 0.0290000000000000015Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in B around 0
Simplified78.3%
if -3.9999999999999998e-151 < F < 1.2500000000000001e-143Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6488.3%
Simplified88.3%
distribute-frac-neg2N/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.f6488.4%
Applied egg-rr88.4%
if 0.0290000000000000015 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification91.6%
(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 -0.000104)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3.5e-151)
t_0
(if (<= F 2.2e-145)
(/ x (- 0.0 (tan B)))
(if (<= F 0.096) 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 <= -0.000104) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3.5e-151) {
tmp = t_0;
} else if (F <= 2.2e-145) {
tmp = x / (0.0 - tan(B));
} else if (F <= 0.096) {
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 <= (-0.000104d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3.5d-151)) then
tmp = t_0
else if (f <= 2.2d-145) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 0.096d0) 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 <= -0.000104) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3.5e-151) {
tmp = t_0;
} else if (F <= 2.2e-145) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 0.096) {
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 <= -0.000104: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3.5e-151: tmp = t_0 elif F <= 2.2e-145: tmp = x / (0.0 - math.tan(B)) elif F <= 0.096: 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 <= -0.000104) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3.5e-151) tmp = t_0; elseif (F <= 2.2e-145) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 0.096) 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 <= -0.000104) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3.5e-151) tmp = t_0; elseif (F <= 2.2e-145) tmp = x / (0.0 - tan(B)); elseif (F <= 0.096) 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, -0.000104], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.5e-151], t$95$0, If[LessEqual[F, 2.2e-145], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.096], 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 -0.000104:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-151}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-145}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 0.096:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.03999999999999994e-4Initial program 67.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.7%
Simplified98.7%
if -1.03999999999999994e-4 < F < -3.49999999999999995e-151 or 2.19999999999999999e-145 < F < 0.096000000000000002Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in B around 0
/-lowering-/.f6478.3%
Simplified78.3%
if -3.49999999999999995e-151 < F < 2.19999999999999999e-145Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6488.3%
Simplified88.3%
distribute-frac-neg2N/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.f6488.4%
Applied egg-rr88.4%
if 0.096000000000000002 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification91.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00049)
(-
(/ (/ F (* F (+ -1.0 (/ (- -1.0 (* (* x 2.0) 0.5)) (* F F))))) (sin B))
t_0)
(if (<= F -3.5e-147)
(- (* F (/ (pow (+ (* F F) (+ 2.0 (* x 2.0))) -0.5) (sin B))) (/ x B))
(if (<= F 0.14)
(- (* (pow (+ (* F F) (- 2.0 (* x -2.0))) -0.5) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.00049) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0;
} else if (F <= -3.5e-147) {
tmp = (F * (pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / sin(B))) - (x / B);
} else if (F <= 0.14) {
tmp = (pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.00049d0)) then
tmp = ((f / (f * ((-1.0d0) + (((-1.0d0) - ((x * 2.0d0) * 0.5d0)) / (f * f))))) / sin(b)) - t_0
else if (f <= (-3.5d-147)) then
tmp = (f * ((((f * f) + (2.0d0 + (x * 2.0d0))) ** (-0.5d0)) / sin(b))) - (x / b)
else if (f <= 0.14d0) then
tmp = ((((f * f) + (2.0d0 - (x * (-2.0d0)))) ** (-0.5d0)) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.00049) {
tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / Math.sin(B)) - t_0;
} else if (F <= -3.5e-147) {
tmp = (F * (Math.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / Math.sin(B))) - (x / B);
} else if (F <= 0.14) {
tmp = (Math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.00049: tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / math.sin(B)) - t_0 elif F <= -3.5e-147: tmp = (F * (math.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / math.sin(B))) - (x / B) elif F <= 0.14: tmp = (math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00049) tmp = Float64(Float64(Float64(F / Float64(F * Float64(-1.0 + Float64(Float64(-1.0 - Float64(Float64(x * 2.0) * 0.5)) / Float64(F * F))))) / sin(B)) - t_0); elseif (F <= -3.5e-147) tmp = Float64(Float64(F * Float64((Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) ^ -0.5) / sin(B))) - Float64(x / B)); elseif (F <= 0.14) tmp = Float64(Float64((Float64(Float64(F * F) + Float64(2.0 - Float64(x * -2.0))) ^ -0.5) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.00049) tmp = ((F / (F * (-1.0 + ((-1.0 - ((x * 2.0) * 0.5)) / (F * F))))) / sin(B)) - t_0; elseif (F <= -3.5e-147) tmp = (F * ((((F * F) + (2.0 + (x * 2.0))) ^ -0.5) / sin(B))) - (x / B); elseif (F <= 0.14) tmp = ((((F * F) + (2.0 - (x * -2.0))) ^ -0.5) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00049], N[(N[(N[(F / N[(F * N[(-1.0 + N[(N[(-1.0 - N[(N[(x * 2.0), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -3.5e-147], N[(N[(F * N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00049:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(-1 + \frac{-1 - \left(x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -3.5 \cdot 10^{-147}:\\
\;\;\;\;F \cdot \frac{{\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;{\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.8999999999999998e-4Initial program 67.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.3%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.0%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr79.1%
Taylor expanded in F around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified99.2%
if -4.8999999999999998e-4 < F < -3.50000000000000004e-147Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
Simplified79.3%
if -3.50000000000000004e-147 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
/-lowering-/.f6485.5%
Simplified85.5%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification92.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -0.00049)
(- (/ -1.0 (sin B)) t_0)
(if (<= F -4e-147)
(- (* F (/ (pow (+ (* F F) (+ 2.0 (* x 2.0))) -0.5) (sin B))) (/ x B))
(if (<= F 0.14)
(- (* (pow (+ (* F F) (- 2.0 (* x -2.0))) -0.5) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -0.00049) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= -4e-147) {
tmp = (F * (pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / sin(B))) - (x / B);
} else if (F <= 0.14) {
tmp = (pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-0.00049d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= (-4d-147)) then
tmp = (f * ((((f * f) + (2.0d0 + (x * 2.0d0))) ** (-0.5d0)) / sin(b))) - (x / b)
else if (f <= 0.14d0) then
tmp = ((((f * f) + (2.0d0 - (x * (-2.0d0)))) ** (-0.5d0)) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -0.00049) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= -4e-147) {
tmp = (F * (Math.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / Math.sin(B))) - (x / B);
} else if (F <= 0.14) {
tmp = (Math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -0.00049: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= -4e-147: tmp = (F * (math.pow(((F * F) + (2.0 + (x * 2.0))), -0.5) / math.sin(B))) - (x / B) elif F <= 0.14: tmp = (math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.00049) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= -4e-147) tmp = Float64(Float64(F * Float64((Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) ^ -0.5) / sin(B))) - Float64(x / B)); elseif (F <= 0.14) tmp = Float64(Float64((Float64(Float64(F * F) + Float64(2.0 - Float64(x * -2.0))) ^ -0.5) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -0.00049) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= -4e-147) tmp = (F * ((((F * F) + (2.0 + (x * 2.0))) ^ -0.5) / sin(B))) - (x / B); elseif (F <= 0.14) tmp = ((((F * F) + (2.0 - (x * -2.0))) ^ -0.5) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.00049], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -4e-147], N[(N[(F * N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.14], N[(N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.00049:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq -4 \cdot 10^{-147}:\\
\;\;\;\;F \cdot \frac{{\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;{\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.8999999999999998e-4Initial program 67.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.7%
Simplified98.7%
if -4.8999999999999998e-4 < F < -3.9999999999999999e-147Initial program 99.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in B around 0
Simplified79.3%
if -3.9999999999999999e-147 < F < 0.14000000000000001Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
/-lowering-/.f6485.5%
Simplified85.5%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification91.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* (/ F (sin B)) (sqrt (/ 1.0 (+ (* F F) 2.0)))))
(t_1 (/ x (tan B))))
(if (<= F -1.8e-5)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -3.3e-114)
t_0
(if (<= F 2.6e-135)
(/ x (- 0.0 (tan B)))
(if (<= F 0.14) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = (F / sin(B)) * sqrt((1.0 / ((F * F) + 2.0)));
double t_1 = x / tan(B);
double tmp;
if (F <= -1.8e-5) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -3.3e-114) {
tmp = t_0;
} else if (F <= 2.6e-135) {
tmp = x / (0.0 - tan(B));
} else if (F <= 0.14) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (f / sin(b)) * sqrt((1.0d0 / ((f * f) + 2.0d0)))
t_1 = x / tan(b)
if (f <= (-1.8d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-3.3d-114)) then
tmp = t_0
else if (f <= 2.6d-135) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 0.14d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (F / Math.sin(B)) * Math.sqrt((1.0 / ((F * F) + 2.0)));
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -1.8e-5) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -3.3e-114) {
tmp = t_0;
} else if (F <= 2.6e-135) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 0.14) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = (F / math.sin(B)) * math.sqrt((1.0 / ((F * F) + 2.0))) t_1 = x / math.tan(B) tmp = 0 if F <= -1.8e-5: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -3.3e-114: tmp = t_0 elif F <= 2.6e-135: tmp = x / (0.0 - math.tan(B)) elif F <= 0.14: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0)))) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.8e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -3.3e-114) tmp = t_0; elseif (F <= 2.6e-135) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 0.14) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = (F / sin(B)) * sqrt((1.0 / ((F * F) + 2.0))); t_1 = x / tan(B); tmp = 0.0; if (F <= -1.8e-5) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -3.3e-114) tmp = t_0; elseif (F <= 2.6e-135) tmp = x / (0.0 - tan(B)); elseif (F <= 0.14) 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[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.8e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -3.3e-114], t$95$0, If[LessEqual[F, 2.6e-135], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.14], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F}{\sin B} \cdot \sqrt{\frac{1}{F \cdot F + 2}}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.8 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -3.3 \cdot 10^{-114}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.6 \cdot 10^{-135}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 0.14:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.80000000000000005e-5Initial program 67.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6498.7%
Simplified98.7%
if -1.80000000000000005e-5 < F < -3.30000000000000035e-114 or 2.60000000000000004e-135 < F < 0.14000000000000001Initial program 99.4%
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-*.f6466.0%
Simplified66.0%
if -3.30000000000000035e-114 < F < 2.60000000000000004e-135Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6483.6%
Simplified83.6%
distribute-frac-neg2N/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.f6483.7%
Applied egg-rr83.7%
if 0.14000000000000001 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification88.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -8.8e-29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 1.1e-92)
(/ x (- 0.0 (tan B)))
(if (<= F 9.5e-7)
(-
(*
(pow (+ (* F F) (- 2.0 (* x -2.0))) -0.5)
(/ F (* B (+ 1.0 (* B (* B -0.16666666666666666))))))
(/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -8.8e-29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 1.1e-92) {
tmp = x / (0.0 - tan(B));
} else if (F <= 9.5e-7) {
tmp = (pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-8.8d-29)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 1.1d-92) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 9.5d-7) then
tmp = ((((f * f) + (2.0d0 - (x * (-2.0d0)))) ** (-0.5d0)) * (f / (b * (1.0d0 + (b * (b * (-0.16666666666666666d0))))))) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -8.8e-29) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 1.1e-92) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 9.5e-7) {
tmp = (Math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -8.8e-29: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 1.1e-92: tmp = x / (0.0 - math.tan(B)) elif F <= 9.5e-7: tmp = (math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -8.8e-29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 1.1e-92) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 9.5e-7) tmp = Float64(Float64((Float64(Float64(F * F) + Float64(2.0 - Float64(x * -2.0))) ^ -0.5) * Float64(F / Float64(B * Float64(1.0 + Float64(B * Float64(B * -0.16666666666666666)))))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -8.8e-29) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 1.1e-92) tmp = x / (0.0 - tan(B)); elseif (F <= 9.5e-7) tmp = ((((F * F) + (2.0 - (x * -2.0))) ^ -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -8.8e-29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.1e-92], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 9.5e-7], N[(N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[(B * N[(1.0 + N[(B * N[(B * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -8.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.1 \cdot 10^{-92}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 9.5 \cdot 10^{-7}:\\
\;\;\;\;{\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5} \cdot \frac{F}{B \cdot \left(1 + B \cdot \left(B \cdot -0.16666666666666666\right)\right)} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -8.79999999999999961e-29Initial program 70.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified70.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6492.4%
Simplified92.4%
if -8.79999999999999961e-29 < F < 1.09999999999999994e-92Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6472.4%
Simplified72.4%
distribute-frac-neg2N/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.5%
Applied egg-rr72.5%
if 1.09999999999999994e-92 < F < 9.5000000000000001e-7Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6473.2%
Simplified73.2%
Taylor expanded in B around 0
Simplified56.9%
if 9.5000000000000001e-7 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification84.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.5e-29)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 6e-93)
(/ x (- 0.0 (tan B)))
(if (<= F 0.0088)
(-
(*
(pow (+ (* F F) (- 2.0 (* x -2.0))) -0.5)
(/ F (* B (+ 1.0 (* B (* B -0.16666666666666666))))))
(/ x B))
(- (/ 1.0 B) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.5e-29) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 6e-93) {
tmp = x / (0.0 - tan(B));
} else if (F <= 0.0088) {
tmp = (pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-2.5d-29)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 6d-93) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 0.0088d0) then
tmp = ((((f * f) + (2.0d0 - (x * (-2.0d0)))) ** (-0.5d0)) * (f / (b * (1.0d0 + (b * (b * (-0.16666666666666666d0))))))) - (x / b)
else
tmp = (1.0d0 / b) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -2.5e-29) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 6e-93) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 0.0088) {
tmp = (Math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B);
} else {
tmp = (1.0 / B) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -2.5e-29: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 6e-93: tmp = x / (0.0 - math.tan(B)) elif F <= 0.0088: tmp = (math.pow(((F * F) + (2.0 - (x * -2.0))), -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B) else: tmp = (1.0 / B) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -2.5e-29) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 6e-93) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 0.0088) tmp = Float64(Float64((Float64(Float64(F * F) + Float64(2.0 - Float64(x * -2.0))) ^ -0.5) * Float64(F / Float64(B * Float64(1.0 + Float64(B * Float64(B * -0.16666666666666666)))))) - Float64(x / B)); else tmp = Float64(Float64(1.0 / B) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -2.5e-29) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 6e-93) tmp = x / (0.0 - tan(B)); elseif (F <= 0.0088) tmp = ((((F * F) + (2.0 - (x * -2.0))) ^ -0.5) * (F / (B * (1.0 + (B * (B * -0.16666666666666666)))))) - (x / B); else tmp = (1.0 / B) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -2.5e-29], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 6e-93], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 0.0088], N[(N[(N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 - N[(x * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] * N[(F / N[(B * N[(1.0 + N[(B * N[(B * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 6 \cdot 10^{-93}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 0.0088:\\
\;\;\;\;{\left(F \cdot F + \left(2 - x \cdot -2\right)\right)}^{-0.5} \cdot \frac{F}{B \cdot \left(1 + B \cdot \left(B \cdot -0.16666666666666666\right)\right)} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -2.49999999999999993e-29Initial program 70.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified70.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6492.4%
Simplified92.4%
if -2.49999999999999993e-29 < F < 6.0000000000000003e-93Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6472.4%
Simplified72.4%
distribute-frac-neg2N/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.5%
Applied egg-rr72.5%
if 6.0000000000000003e-93 < F < 0.00880000000000000053Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6473.2%
Simplified73.2%
Taylor expanded in B around 0
Simplified56.9%
if 0.00880000000000000053 < F Initial program 52.9%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified53.1%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr77.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in B around 0
/-lowering-/.f6478.3%
Simplified78.3%
Final simplification79.3%
(FPCore (F B x)
:precision binary64
(if (<= B 0.014)
(/
(-
(+
(*
(sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0)))))
(* F (+ 1.0 (* (* B B) 0.16666666666666666))))
(* 0.3333333333333333 (* x (* B B))))
x)
B)
(/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.014) {
tmp = (((sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F * (1.0 + ((B * B) * 0.16666666666666666)))) + (0.3333333333333333 * (x * (B * B)))) - 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.014d0) then
tmp = (((sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0))))) * (f * (1.0d0 + ((b * b) * 0.16666666666666666d0)))) + (0.3333333333333333d0 * (x * (b * b)))) - 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.014) {
tmp = (((Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F * (1.0 + ((B * B) * 0.16666666666666666)))) + (0.3333333333333333 * (x * (B * B)))) - x) / B;
} else {
tmp = x / (0.0 - Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 0.014: tmp = (((math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F * (1.0 + ((B * B) * 0.16666666666666666)))) + (0.3333333333333333 * (x * (B * B)))) - x) / B else: tmp = x / (0.0 - math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 0.014) tmp = Float64(Float64(Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0))))) * Float64(F * Float64(1.0 + Float64(Float64(B * B) * 0.16666666666666666)))) + Float64(0.3333333333333333 * Float64(x * Float64(B * B)))) - 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.014) tmp = (((sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F * (1.0 + ((B * B) * 0.16666666666666666)))) + (0.3333333333333333 * (x * (B * B)))) - x) / B; else tmp = x / (0.0 - tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 0.014], N[(N[(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 * N[(1.0 + N[(N[(B * B), $MachinePrecision] * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(x * N[(B * B), $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.014:\\
\;\;\;\;\frac{\left(\sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} \cdot \left(F \cdot \left(1 + \left(B \cdot B\right) \cdot 0.16666666666666666\right)\right) + 0.3333333333333333 \cdot \left(x \cdot \left(B \cdot B\right)\right)\right) - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\end{array}
\end{array}
if B < 0.0140000000000000003Initial program 75.6%
Taylor expanded in B around 0
Simplified52.6%
if 0.0140000000000000003 < B Initial program 87.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified87.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr87.7%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6463.9%
Simplified63.9%
distribute-frac-neg2N/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.1%
Applied egg-rr64.1%
Final simplification56.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -3.6e+131)
(- (/ (/ -1.0 B) (+ 1.0 (* -0.16666666666666666 (* B B)))) t_0)
(if (<= F -2.25e+17)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 4.4e-30) (/ 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 <= -3.6e+131) {
tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - t_0;
} else if (F <= -2.25e+17) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 4.4e-30) {
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 <= (-3.6d+131)) then
tmp = (((-1.0d0) / b) / (1.0d0 + ((-0.16666666666666666d0) * (b * b)))) - t_0
else if (f <= (-2.25d+17)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 4.4d-30) 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 <= -3.6e+131) {
tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - t_0;
} else if (F <= -2.25e+17) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 4.4e-30) {
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 <= -3.6e+131: tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - t_0 elif F <= -2.25e+17: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 4.4e-30: 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 <= -3.6e+131) tmp = Float64(Float64(Float64(-1.0 / B) / Float64(1.0 + Float64(-0.16666666666666666 * Float64(B * B)))) - t_0); elseif (F <= -2.25e+17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 4.4e-30) 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 <= -3.6e+131) tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - t_0; elseif (F <= -2.25e+17) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 4.4e-30) 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, -3.6e+131], N[(N[(N[(-1.0 / B), $MachinePrecision] / N[(1.0 + N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.25e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.4e-30], 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 -3.6 \cdot 10^{+131}:\\
\;\;\;\;\frac{\frac{-1}{B}}{1 + -0.16666666666666666 \cdot \left(B \cdot B\right)} - t\_0\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -3.60000000000000031e131Initial program 47.1%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified47.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
Taylor expanded in F around -inf
associate-/r*N/A
metadata-evalN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.3%
Simplified84.3%
if -3.60000000000000031e131 < F < -2.25e17Initial program 99.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Taylor expanded in B around 0
/-lowering-/.f6475.9%
Simplified75.9%
if -2.25e17 < F < 4.39999999999999967e-30Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6465.3%
Simplified65.3%
distribute-frac-neg2N/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 4.39999999999999967e-30 < F Initial program 56.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified56.8%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6493.9%
Simplified93.9%
Taylor expanded in B around 0
/-lowering-/.f6474.3%
Simplified74.3%
Final simplification72.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.7e+131)
(- (/ -1.0 B) t_0)
(if (<= F -2.25e+17)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 3.8e-30) (/ 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 <= -1.7e+131) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2.25e+17) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 3.8e-30) {
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 <= (-1.7d+131)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= (-2.25d+17)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 3.8d-30) 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 <= -1.7e+131) {
tmp = (-1.0 / B) - t_0;
} else if (F <= -2.25e+17) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 3.8e-30) {
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 <= -1.7e+131: tmp = (-1.0 / B) - t_0 elif F <= -2.25e+17: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 3.8e-30: 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 <= -1.7e+131) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= -2.25e+17) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 3.8e-30) 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 <= -1.7e+131) tmp = (-1.0 / B) - t_0; elseif (F <= -2.25e+17) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 3.8e-30) 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, -1.7e+131], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, -2.25e+17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 3.8e-30], 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 -1.7 \cdot 10^{+131}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq -2.25 \cdot 10^{+17}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 3.8 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -1.69999999999999993e131Initial program 47.1%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified47.2%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6447.2%
Simplified47.2%
Taylor expanded in F around -inf
associate-/r*N/A
metadata-evalN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6484.3%
Simplified84.3%
Taylor expanded in B around 0
/-lowering-/.f6483.9%
Simplified83.9%
if -1.69999999999999993e131 < F < -2.25e17Initial program 99.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
Taylor expanded in B around 0
/-lowering-/.f6475.9%
Simplified75.9%
if -2.25e17 < F < 3.8000000000000003e-30Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6465.3%
Simplified65.3%
distribute-frac-neg2N/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 3.8000000000000003e-30 < F Initial program 56.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified56.8%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6493.9%
Simplified93.9%
Taylor expanded in B around 0
/-lowering-/.f6474.3%
Simplified74.3%
Final simplification72.0%
(FPCore (F B x) :precision binary64 (if (<= B 5e-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 <= 5e-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 <= 5d-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 <= 5e-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 <= 5e-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 <= 5e-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 <= 5e-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, 5e-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 5 \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 < 5.00000000000000024e-5Initial program 75.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified52.8%
/-lowering-/.f64N/A
Applied egg-rr52.8%
if 5.00000000000000024e-5 < B Initial program 87.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified87.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr87.7%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6463.9%
Simplified63.9%
distribute-frac-neg2N/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.1%
Applied egg-rr64.1%
Final simplification56.3%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -6.5e-47)
(- (/ -1.0 B) t_0)
(if (<= F 1.3e-27) (/ 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 <= -6.5e-47) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.3e-27) {
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 <= (-6.5d-47)) then
tmp = ((-1.0d0) / b) - t_0
else if (f <= 1.3d-27) 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 <= -6.5e-47) {
tmp = (-1.0 / B) - t_0;
} else if (F <= 1.3e-27) {
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 <= -6.5e-47: tmp = (-1.0 / B) - t_0 elif F <= 1.3e-27: 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 <= -6.5e-47) tmp = Float64(Float64(-1.0 / B) - t_0); elseif (F <= 1.3e-27) 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 <= -6.5e-47) tmp = (-1.0 / B) - t_0; elseif (F <= 1.3e-27) 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, -6.5e-47], N[(N[(-1.0 / B), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.3e-27], 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 -6.5 \cdot 10^{-47}:\\
\;\;\;\;\frac{-1}{B} - t\_0\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{-27}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B} - t\_0\\
\end{array}
\end{array}
if F < -6.5000000000000004e-47Initial program 71.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified71.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.3%
Simplified53.3%
Taylor expanded in F around -inf
associate-/r*N/A
metadata-evalN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.3%
Simplified69.3%
Taylor expanded in B around 0
/-lowering-/.f6468.7%
Simplified68.7%
if -6.5000000000000004e-47 < F < 1.30000000000000009e-27Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6468.4%
Simplified68.4%
distribute-frac-neg2N/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.f6468.5%
Applied egg-rr68.5%
if 1.30000000000000009e-27 < F Initial program 56.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified56.8%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6493.9%
Simplified93.9%
Taylor expanded in B around 0
/-lowering-/.f6474.3%
Simplified74.3%
Final simplification70.0%
(FPCore (F B x) :precision binary64 (if (<= F -5.8e-49) (- (/ -1.0 B) (/ x (tan B))) (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.8e-49) {
tmp = (-1.0 / B) - (x / tan(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 (f <= (-5.8d-49)) then
tmp = ((-1.0d0) / b) - (x / tan(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 (F <= -5.8e-49) {
tmp = (-1.0 / B) - (x / Math.tan(B));
} else {
tmp = x / (0.0 - Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.8e-49: tmp = (-1.0 / B) - (x / math.tan(B)) else: tmp = x / (0.0 - math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.8e-49) tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(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 (F <= -5.8e-49) tmp = (-1.0 / B) - (x / tan(B)); else tmp = x / (0.0 - tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.8e-49], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\end{array}
\end{array}
if F < -5.8e-49Initial program 71.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified71.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.3%
Simplified53.3%
Taylor expanded in F around -inf
associate-/r*N/A
metadata-evalN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.3%
Simplified69.3%
Taylor expanded in B around 0
/-lowering-/.f6468.7%
Simplified68.7%
if -5.8e-49 < F Initial program 83.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified83.7%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr92.1%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6465.2%
Simplified65.2%
distribute-frac-neg2N/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.3%
Applied egg-rr65.3%
Final simplification66.5%
(FPCore (F B x) :precision binary64 (if (<= B 1.803e-6) (/ (- (/ -1.0 (+ (/ 1.0 (* F F)) (+ 1.0 (/ x (* F F))))) x) B) (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.803e-6) {
tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - 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 <= 1.803d-6) then
tmp = (((-1.0d0) / ((1.0d0 / (f * f)) + (1.0d0 + (x / (f * f))))) - 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 <= 1.803e-6) {
tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - x) / B;
} else {
tmp = x / (0.0 - Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 1.803e-6: tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - x) / B else: tmp = x / (0.0 - math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 1.803e-6) tmp = Float64(Float64(Float64(-1.0 / Float64(Float64(1.0 / Float64(F * F)) + Float64(1.0 + Float64(x / Float64(F * F))))) - 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 <= 1.803e-6) tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - x) / B; else tmp = x / (0.0 - tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 1.803e-6], N[(N[(N[(-1.0 / N[(N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(x / N[(F * F), $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 1.803 \cdot 10^{-6}:\\
\;\;\;\;\frac{\frac{-1}{\frac{1}{F \cdot F} + \left(1 + \frac{x}{F \cdot F}\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\end{array}
\end{array}
if B < 1.8029999999999999e-6Initial program 75.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.3%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr88.6%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr88.6%
Taylor expanded in F around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified71.6%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
Simplified40.9%
if 1.8029999999999999e-6 < B Initial program 88.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified88.1%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr88.1%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6462.8%
Simplified62.8%
distribute-frac-neg2N/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.f6463.0%
Applied egg-rr63.0%
Final simplification48.0%
(FPCore (F B x) :precision binary64 (if (<= B 9.2e-10) (/ (- (/ -1.0 (+ (/ 1.0 (* F F)) (+ 1.0 (/ x (* F F))))) x) B) (/ -1.0 (sin B))))
double code(double F, double B, double x) {
double tmp;
if (B <= 9.2e-10) {
tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - x) / B;
} else {
tmp = -1.0 / sin(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 <= 9.2d-10) then
tmp = (((-1.0d0) / ((1.0d0 / (f * f)) + (1.0d0 + (x / (f * f))))) - x) / b
else
tmp = (-1.0d0) / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 9.2e-10) {
tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - x) / B;
} else {
tmp = -1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 9.2e-10: tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - x) / B else: tmp = -1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 9.2e-10) tmp = Float64(Float64(Float64(-1.0 / Float64(Float64(1.0 / Float64(F * F)) + Float64(1.0 + Float64(x / Float64(F * F))))) - x) / B); else tmp = Float64(-1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 9.2e-10) tmp = ((-1.0 / ((1.0 / (F * F)) + (1.0 + (x / (F * F))))) - x) / B; else tmp = -1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 9.2e-10], N[(N[(N[(-1.0 / N[(N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision] + N[(1.0 + N[(x / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 9.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{-1}{\frac{1}{F \cdot F} + \left(1 + \frac{x}{F \cdot F}\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\end{array}
\end{array}
if B < 9.20000000000000028e-10Initial program 76.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified76.1%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr89.6%
associate-*r/N/A
*-commutativeN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
sqrt-pow1N/A
inv-powN/A
*-commutativeN/A
/-lowering-/.f64N/A
Applied egg-rr89.6%
Taylor expanded in F around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified71.2%
Taylor expanded in B around 0
mul-1-negN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
Simplified40.3%
if 9.20000000000000028e-10 < B Initial program 86.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6463.4%
Simplified63.4%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6420.6%
Simplified20.6%
(FPCore (F B x)
:precision binary64
(if (<= F -4.8e-39)
(- (/ (/ -1.0 B) (+ 1.0 (* -0.16666666666666666 (* B B)))) (/ x B))
(if (<= F 4.2e-26)
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(/
(+
(* (* B B) (+ 0.16666666666666666 (* x 0.3333333333333333)))
(- 1.0 x))
B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-39) {
tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B);
} else if (F <= 4.2e-26) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (((B * B) * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 - x)) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-4.8d-39)) then
tmp = (((-1.0d0) / b) / (1.0d0 + ((-0.16666666666666666d0) * (b * b)))) - (x / b)
else if (f <= 4.2d-26) then
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
else
tmp = (((b * b) * (0.16666666666666666d0 + (x * 0.3333333333333333d0))) + (1.0d0 - x)) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -4.8e-39) {
tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B);
} else if (F <= 4.2e-26) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (((B * B) * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 - x)) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -4.8e-39: tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B) elif F <= 4.2e-26: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) else: tmp = (((B * B) * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 - x)) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -4.8e-39) tmp = Float64(Float64(Float64(-1.0 / B) / Float64(1.0 + Float64(-0.16666666666666666 * Float64(B * B)))) - Float64(x / B)); elseif (F <= 4.2e-26) tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); else tmp = Float64(Float64(Float64(Float64(B * B) * Float64(0.16666666666666666 + Float64(x * 0.3333333333333333))) + Float64(1.0 - x)) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -4.8e-39) tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B); elseif (F <= 4.2e-26) tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); else tmp = (((B * B) * (0.16666666666666666 + (x * 0.3333333333333333))) + (1.0 - x)) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -4.8e-39], N[(N[(N[(-1.0 / B), $MachinePrecision] / N[(1.0 + N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.2e-26], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(B * B), $MachinePrecision] * N[(0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -4.8 \cdot 10^{-39}:\\
\;\;\;\;\frac{\frac{-1}{B}}{1 + -0.16666666666666666 \cdot \left(B \cdot B\right)} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.2 \cdot 10^{-26}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(B \cdot B\right) \cdot \left(0.16666666666666666 + x \cdot 0.3333333333333333\right) + \left(1 - x\right)}{B}\\
\end{array}
\end{array}
if F < -4.80000000000000031e-39Initial program 70.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified70.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.3%
Simplified53.3%
Taylor expanded in F around -inf
associate-/r*N/A
metadata-evalN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.7%
Simplified70.7%
Taylor expanded in B around 0
/-lowering-/.f6437.9%
Simplified37.9%
if -4.80000000000000031e-39 < F < 4.20000000000000016e-26Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6480.1%
Simplified80.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6439.5%
Simplified39.5%
Taylor expanded in x around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
distribute-neg-fracN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6426.4%
Simplified26.4%
if 4.20000000000000016e-26 < F Initial program 56.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified56.1%
associate-*l/N/A
associate-/l*N/A
metadata-evalN/A
metadata-evalN/A
associate-+r-N/A
*-commutativeN/A
cancel-sign-sub-invN/A
metadata-evalN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Applied egg-rr79.2%
Taylor expanded in F around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
sin-lowering-sin.f6495.3%
Simplified95.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
sub-negN/A
+-commutativeN/A
associate-+l+N/A
sub-negN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
--lowering--.f6448.0%
Simplified48.0%
Final simplification35.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.25e-37)
(- (/ (/ -1.0 B) (+ 1.0 (* -0.16666666666666666 (* B B)))) (/ x B))
(if (<= F 4.65e-45)
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-37) {
tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B);
} else if (F <= 4.65e-45) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.25d-37)) then
tmp = (((-1.0d0) / b) / (1.0d0 + ((-0.16666666666666666d0) * (b * b)))) - (x / b)
else if (f <= 4.65d-45) then
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.25e-37) {
tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B);
} else if (F <= 4.65e-45) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.25e-37: tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B) elif F <= 4.65e-45: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.25e-37) tmp = Float64(Float64(Float64(-1.0 / B) / Float64(1.0 + Float64(-0.16666666666666666 * Float64(B * B)))) - Float64(x / B)); elseif (F <= 4.65e-45) tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.25e-37) tmp = ((-1.0 / B) / (1.0 + (-0.16666666666666666 * (B * B)))) - (x / B); elseif (F <= 4.65e-45) tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.25e-37], N[(N[(N[(-1.0 / B), $MachinePrecision] / N[(1.0 + N[(-0.16666666666666666 * N[(B * B), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4.65e-45], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.25 \cdot 10^{-37}:\\
\;\;\;\;\frac{\frac{-1}{B}}{1 + -0.16666666666666666 \cdot \left(B \cdot B\right)} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 4.65 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.2499999999999999e-37Initial program 70.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified70.7%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.3%
Simplified53.3%
Taylor expanded in F around -inf
associate-/r*N/A
metadata-evalN/A
distribute-neg-fracN/A
/-lowering-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6470.7%
Simplified70.7%
Taylor expanded in B around 0
/-lowering-/.f6437.9%
Simplified37.9%
if -1.2499999999999999e-37 < F < 4.65000000000000014e-45Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.1%
Simplified82.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.9%
Simplified40.9%
Taylor expanded in x around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
distribute-neg-fracN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6427.3%
Simplified27.3%
if 4.65000000000000014e-45 < F Initial program 58.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified41.2%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6445.1%
Simplified45.1%
Final simplification35.4%
(FPCore (F B x)
:precision binary64
(if (<= F -2.3e-40)
(/ (- -1.0 x) B)
(if (<= F 1.12e-45)
(* x (- (/ -1.0 B) (* B -0.3333333333333333)))
(/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.12e-45) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-2.3d-40)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.12d-45) then
tmp = x * (((-1.0d0) / b) - (b * (-0.3333333333333333d0)))
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -2.3e-40) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.12e-45) {
tmp = x * ((-1.0 / B) - (B * -0.3333333333333333));
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.3e-40: tmp = (-1.0 - x) / B elif F <= 1.12e-45: tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.3e-40) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.12e-45) tmp = Float64(x * Float64(Float64(-1.0 / B) - Float64(B * -0.3333333333333333))); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.3e-40) tmp = (-1.0 - x) / B; elseif (F <= 1.12e-45) tmp = x * ((-1.0 / B) - (B * -0.3333333333333333)); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.3e-40], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.12e-45], N[(x * N[(N[(-1.0 / B), $MachinePrecision] - N[(B * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.3 \cdot 10^{-40}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.12 \cdot 10^{-45}:\\
\;\;\;\;x \cdot \left(\frac{-1}{B} - B \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.3e-40Initial program 70.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified30.6%
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--.f6437.4%
Simplified37.4%
if -2.3e-40 < F < 1.1199999999999999e-45Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f6482.1%
Simplified82.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6440.9%
Simplified40.9%
Taylor expanded in x around inf
mul-1-negN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-neg-inN/A
distribute-neg-fracN/A
metadata-evalN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
neg-lowering-neg.f64N/A
*-commutativeN/A
*-lowering-*.f6427.3%
Simplified27.3%
if 1.1199999999999999e-45 < F Initial program 58.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified41.2%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6445.1%
Simplified45.1%
Final simplification35.2%
(FPCore (F B x) :precision binary64 (if (<= F -8.5e-55) (/ (- -1.0 x) B) (if (<= F 1.7e-23) (- 0.0 (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-55) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.7e-23) {
tmp = 0.0 - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-8.5d-55)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.7d-23) then
tmp = 0.0d0 - (x / b)
else
tmp = (1.0d0 - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -8.5e-55) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.7e-23) {
tmp = 0.0 - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -8.5e-55: tmp = (-1.0 - x) / B elif F <= 1.7e-23: tmp = 0.0 - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -8.5e-55) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.7e-23) tmp = Float64(0.0 - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -8.5e-55) tmp = (-1.0 - x) / B; elseif (F <= 1.7e-23) tmp = 0.0 - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -8.5e-55], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.7e-23], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -8.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-23}:\\
\;\;\;\;0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -8.49999999999999968e-55Initial program 71.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified30.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--.f6436.3%
Simplified36.3%
if -8.49999999999999968e-55 < F < 1.7e-23Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified39.5%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6426.8%
Simplified26.8%
if 1.7e-23 < F Initial program 56.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified43.7%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6447.9%
Simplified47.9%
Final simplification35.2%
(FPCore (F B x) :precision binary64 (if (<= F -1.45e-54) (/ (- -1.0 x) B) (- 0.0 (/ x B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-54) {
tmp = (-1.0 - x) / B;
} else {
tmp = 0.0 - (x / B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.45d-54)) then
tmp = ((-1.0d0) - x) / b
else
tmp = 0.0d0 - (x / b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.45e-54) {
tmp = (-1.0 - x) / B;
} else {
tmp = 0.0 - (x / B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.45e-54: tmp = (-1.0 - x) / B else: tmp = 0.0 - (x / B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.45e-54) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(0.0 - Float64(x / B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.45e-54) tmp = (-1.0 - x) / B; else tmp = 0.0 - (x / B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.45e-54], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.45 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;0 - \frac{x}{B}\\
\end{array}
\end{array}
if F < -1.45000000000000007e-54Initial program 71.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified30.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--.f6436.3%
Simplified36.3%
if -1.45000000000000007e-54 < F Initial program 83.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified41.0%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6429.2%
Simplified29.2%
Final simplification31.7%
(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 79.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified37.4%
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--.f6426.6%
Simplified26.6%
(FPCore (F B x) :precision binary64 (/ -1.0 B))
double code(double F, double B, double x) {
return -1.0 / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = (-1.0d0) / b
end function
public static double code(double F, double B, double x) {
return -1.0 / B;
}
def code(F, B, x): return -1.0 / B
function code(F, B, x) return Float64(-1.0 / B) end
function tmp = code(F, B, x) tmp = -1.0 / B; end
code[F_, B_, x_] := N[(-1.0 / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1}{B}
\end{array}
Initial program 79.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
Simplified37.4%
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--.f6426.6%
Simplified26.6%
Taylor expanded in x around 0
/-lowering-/.f649.3%
Simplified9.3%
herbie shell --seed 2024192
(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))))))