
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+21)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4e+15)
(- (/ (* 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 <= -5e+21) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4e+15) {
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 <= (-5d+21)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4d+15) 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 <= -5e+21) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4e+15) {
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 <= -5e+21: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4e+15: 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 <= -5e+21) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4e+15) tmp = Float64(Float64(Float64(F * (Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))) ^ -0.5)) / sin(B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5e+21) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4e+15) 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, -5e+21], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4e+15], N[(N[(N[(F * N[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+21}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\frac{F \cdot {\left(F \cdot F + \left(2 + x \cdot 2\right)\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5e21Initial program 53.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified72.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
if -5e21 < F < 4e15Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
if 4e15 < F Initial program 55.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified79.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f64100.0%
Simplified100.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5e+18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 2.15e+15)
(- (/ (/ F (sin B)) (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5e+18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 2.15e+15) {
tmp = ((F / sin(B)) / sqrt(((F * F) + (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5d+18)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 2.15d+15) then
tmp = ((f / sin(b)) / sqrt(((f * f) + (2.0d0 + (x * 2.0d0))))) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5e+18) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 2.15e+15) {
tmp = ((F / Math.sin(B)) / Math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5e+18: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 2.15e+15: tmp = ((F / math.sin(B)) / math.sqrt(((F * F) + (2.0 + (x * 2.0))))) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5e+18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 2.15e+15) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5e+18) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 2.15e+15) tmp = ((F / sin(B)) / sqrt(((F * F) + (2.0 + (x * 2.0))))) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2.15e+15], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 2.15 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5e18Initial program 53.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified72.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
if -5e18 < F < 2.15e15Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
frac-timesN/A
div-invN/A
associate-*l/N/A
associate-/r/N/A
div-invN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr99.5%
if 2.15e15 < F Initial program 55.5%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified79.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f64100.0%
Simplified100.0%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (* 2.0 (+ x 1.0))) (t_1 (/ x (tan B))))
(if (<= F -27500000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F 11.0)
(- (* (/ F (sin B)) (sqrt (/ 1.0 t_0))) t_1)
(- (/ (+ 1.0 (/ (* -0.5 t_0) (* F F))) (sin B)) t_1)))))
double code(double F, double B, double x) {
double t_0 = 2.0 * (x + 1.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -27500000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= 11.0) {
tmp = ((F / sin(B)) * sqrt((1.0 / t_0))) - t_1;
} else {
tmp = ((1.0 + ((-0.5 * t_0) / (F * F))) / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 2.0d0 * (x + 1.0d0)
t_1 = x / tan(b)
if (f <= (-27500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= 11.0d0) then
tmp = ((f / sin(b)) * sqrt((1.0d0 / t_0))) - t_1
else
tmp = ((1.0d0 + (((-0.5d0) * t_0) / (f * f))) / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 * (x + 1.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -27500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= 11.0) {
tmp = ((F / Math.sin(B)) * Math.sqrt((1.0 / t_0))) - t_1;
} else {
tmp = ((1.0 + ((-0.5 * t_0) / (F * F))) / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 * (x + 1.0) t_1 = x / math.tan(B) tmp = 0 if F <= -27500000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= 11.0: tmp = ((F / math.sin(B)) * math.sqrt((1.0 / t_0))) - t_1 else: tmp = ((1.0 + ((-0.5 * t_0) / (F * F))) / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 * Float64(x + 1.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -27500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= 11.0) tmp = Float64(Float64(Float64(F / sin(B)) * sqrt(Float64(1.0 / t_0))) - t_1); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-0.5 * t_0) / Float64(F * F))) / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 * (x + 1.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -27500000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= 11.0) tmp = ((F / sin(B)) * sqrt((1.0 / t_0))) - t_1; else tmp = ((1.0 + ((-0.5 * t_0) / (F * F))) / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -27500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, 11.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-0.5 * t$95$0), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 \cdot \left(x + 1\right)\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -27500000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq 11:\\
\;\;\;\;\frac{F}{\sin B} \cdot \sqrt{\frac{1}{t\_0}} - t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-0.5 \cdot t\_0}{F \cdot F}}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -2.75e7Initial program 56.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified74.2%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -2.75e7 < F < 11Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in F around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f6498.2%
Simplified98.2%
if 11 < F Initial program 59.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.2%
Taylor expanded in F around inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -27500000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 24.0)
(- (/ (pow (+ 2.0 (* x 2.0)) -0.5) (/ (sin B) F)) t_0)
(- (/ (+ 1.0 (/ (* -0.5 (* 2.0 (+ x 1.0))) (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -27500000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 24.0) {
tmp = (pow((2.0 + (x * 2.0)), -0.5) / (sin(B) / F)) - t_0;
} else {
tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / 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 <= (-27500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 24.0d0) then
tmp = (((2.0d0 + (x * 2.0d0)) ** (-0.5d0)) / (sin(b) / f)) - t_0
else
tmp = ((1.0d0 + (((-0.5d0) * (2.0d0 * (x + 1.0d0))) / (f * f))) / 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 <= -27500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 24.0) {
tmp = (Math.pow((2.0 + (x * 2.0)), -0.5) / (Math.sin(B) / F)) - t_0;
} else {
tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -27500000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 24.0: tmp = (math.pow((2.0 + (x * 2.0)), -0.5) / (math.sin(B) / F)) - t_0 else: tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -27500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 24.0) tmp = Float64(Float64((Float64(2.0 + Float64(x * 2.0)) ^ -0.5) / Float64(sin(B) / F)) - t_0); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-0.5 * Float64(2.0 * Float64(x + 1.0))) / Float64(F * F))) / 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 <= -27500000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 24.0) tmp = (((2.0 + (x * 2.0)) ^ -0.5) / (sin(B) / F)) - t_0; else tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / 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, -27500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 24.0], N[(N[(N[Power[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-0.5 * N[(2.0 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -27500000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 24:\\
\;\;\;\;\frac{{\left(2 + x \cdot 2\right)}^{-0.5}}{\frac{\sin B}{F}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-0.5 \cdot \left(2 \cdot \left(x + 1\right)\right)}{F \cdot F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.75e7Initial program 56.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified74.2%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -2.75e7 < F < 24Initial program 99.3%
+-commutativeN/A
div-invN/A
sub-negN/A
--lowering--.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.2%
Simplified98.2%
if 24 < F Initial program 59.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.2%
Taylor expanded in F around inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification99.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -27500000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 90.0)
(- (/ (/ F (sin B)) (sqrt (+ 2.0 (* x 2.0)))) t_0)
(- (/ (+ 1.0 (/ (* -0.5 (* 2.0 (+ x 1.0))) (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -27500000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 90.0) {
tmp = ((F / sin(B)) / sqrt((2.0 + (x * 2.0)))) - t_0;
} else {
tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / 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 <= (-27500000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 90.0d0) then
tmp = ((f / sin(b)) / sqrt((2.0d0 + (x * 2.0d0)))) - t_0
else
tmp = ((1.0d0 + (((-0.5d0) * (2.0d0 * (x + 1.0d0))) / (f * f))) / 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 <= -27500000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 90.0) {
tmp = ((F / Math.sin(B)) / Math.sqrt((2.0 + (x * 2.0)))) - t_0;
} else {
tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -27500000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 90.0: tmp = ((F / math.sin(B)) / math.sqrt((2.0 + (x * 2.0)))) - t_0 else: tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -27500000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 90.0) tmp = Float64(Float64(Float64(F / sin(B)) / sqrt(Float64(2.0 + Float64(x * 2.0)))) - t_0); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-0.5 * Float64(2.0 * Float64(x + 1.0))) / Float64(F * F))) / 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 <= -27500000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 90.0) tmp = ((F / sin(B)) / sqrt((2.0 + (x * 2.0)))) - t_0; else tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / 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, -27500000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 90.0], N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-0.5 * N[(2.0 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -27500000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 90:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2 + x \cdot 2}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-0.5 \cdot \left(2 \cdot \left(x + 1\right)\right)}{F \cdot F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.75e7Initial program 56.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified74.2%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -2.75e7 < F < 90Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
frac-timesN/A
div-invN/A
associate-*l/N/A
associate-/r/N/A
div-invN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr99.5%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6498.2%
Simplified98.2%
if 90 < F Initial program 59.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.2%
Taylor expanded in F around inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification99.0%
(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 -5e+18)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -1.4e-253)
t_0
(if (<= F 3.2e-227)
(/ x (- 0.0 (tan B)))
(if (<= F 1.4e-10) 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 <= -5e+18) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -1.4e-253) {
tmp = t_0;
} else if (F <= 3.2e-227) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.4e-10) {
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 <= (-5d+18)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-1.4d-253)) then
tmp = t_0
else if (f <= 3.2d-227) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.4d-10) 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 <= -5e+18) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -1.4e-253) {
tmp = t_0;
} else if (F <= 3.2e-227) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.4e-10) {
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 <= -5e+18: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -1.4e-253: tmp = t_0 elif F <= 3.2e-227: tmp = x / (0.0 - math.tan(B)) elif F <= 1.4e-10: 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 * (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 <= -5e+18) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -1.4e-253) tmp = t_0; elseif (F <= 3.2e-227) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.4e-10) 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 <= -5e+18) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -1.4e-253) tmp = t_0; elseif (F <= 3.2e-227) tmp = x / (0.0 - tan(B)); elseif (F <= 1.4e-10) 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[Power[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5e+18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -1.4e-253], t$95$0, If[LessEqual[F, 3.2e-227], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot {\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 -5 \cdot 10^{+18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -1.4 \cdot 10^{-253}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 3.2 \cdot 10^{-227}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -5e18Initial program 53.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified72.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
if -5e18 < F < -1.40000000000000003e-253 or 3.2000000000000001e-227 < F < 1.40000000000000008e-10Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
Taylor expanded in B around 0
/-lowering-/.f6481.3%
Simplified81.3%
if -1.40000000000000003e-253 < F < 3.2000000000000001e-227Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
if 1.40000000000000008e-10 < F Initial program 59.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.1%
Simplified99.1%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(- (/ (/ F (sin B)) (sqrt (+ (* F F) (+ 2.0 (* x 2.0))))) (/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -4.3e+15)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -9.5e-253)
t_0
(if (<= F 2.3e-226)
(/ x (- 0.0 (tan B)))
(if (<= F 1.4e-10) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F / sin(B)) / sqrt(((F * F) + (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -4.3e+15) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -9.5e-253) {
tmp = t_0;
} else if (F <= 2.3e-226) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.4e-10) {
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(((f * f) + (2.0d0 + (x * 2.0d0))))) - (x / b)
t_1 = x / tan(b)
if (f <= (-4.3d+15)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-9.5d-253)) then
tmp = t_0
else if (f <= 2.3d-226) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.4d-10) 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(((F * F) + (2.0 + (x * 2.0))))) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -4.3e+15) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -9.5e-253) {
tmp = t_0;
} else if (F <= 2.3e-226) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.4e-10) {
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(((F * F) + (2.0 + (x * 2.0))))) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -4.3e+15: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -9.5e-253: tmp = t_0 elif F <= 2.3e-226: tmp = x / (0.0 - math.tan(B)) elif F <= 1.4e-10: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sin(B)) / sqrt(Float64(Float64(F * F) + Float64(2.0 + Float64(x * 2.0))))) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.3e+15) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -9.5e-253) tmp = t_0; elseif (F <= 2.3e-226) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.4e-10) 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(((F * F) + (2.0 + (x * 2.0))))) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -4.3e+15) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -9.5e-253) tmp = t_0; elseif (F <= 2.3e-226) tmp = x / (0.0 - tan(B)); elseif (F <= 1.4e-10) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[(F * F), $MachinePrecision] + N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.3e+15], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -9.5e-253], t$95$0, If[LessEqual[F, 2.3e-226], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], 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}{\sin B}}{\sqrt{F \cdot F + \left(2 + x \cdot 2\right)}} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -9.5 \cdot 10^{-253}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-226}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -4.3e15Initial program 53.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified72.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.9%
Simplified99.9%
if -4.3e15 < F < -9.5e-253 or 2.3e-226 < F < 1.40000000000000008e-10Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
frac-timesN/A
div-invN/A
associate-*l/N/A
associate-/r/N/A
div-invN/A
associate-/r*N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr99.5%
Taylor expanded in B around 0
/-lowering-/.f6481.2%
Simplified81.2%
if -9.5e-253 < F < 2.3e-226Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.7%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.4%
Simplified99.4%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
if 1.40000000000000008e-10 < F Initial program 59.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.1%
Simplified99.1%
Final simplification92.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -40000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 11000.0)
(- (* (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0))))) (/ F B)) t_0)
(- (/ (+ 1.0 (/ (* -0.5 (* 2.0 (+ x 1.0))) (* F F))) (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -40000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 11000.0) {
tmp = (sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0;
} else {
tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / 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 <= (-40000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 11000.0d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0))))) * (f / b)) - t_0
else
tmp = ((1.0d0 + (((-0.5d0) * (2.0d0 * (x + 1.0d0))) / (f * f))) / 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 <= -40000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 11000.0) {
tmp = (Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0;
} else {
tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -40000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 11000.0: tmp = (math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0 else: tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -40000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 11000.0) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0))))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-0.5 * Float64(2.0 * Float64(x + 1.0))) / Float64(F * F))) / 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 <= -40000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 11000.0) tmp = (sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0; else tmp = ((1.0 + ((-0.5 * (2.0 * (x + 1.0))) / (F * F))) / 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, -40000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 11000.0], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-0.5 * N[(2.0 * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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 -40000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 11000:\\
\;\;\;\;\sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-0.5 \cdot \left(2 \cdot \left(x + 1\right)\right)}{F \cdot F}}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4e7Initial program 55.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified73.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -4e7 < F < 11000Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6487.2%
Simplified87.2%
if 11000 < F Initial program 59.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.2%
Taylor expanded in F around inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.8%
Simplified99.8%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -40000000.0)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 130000.0)
(- (* (sqrt (/ 1.0 (+ 2.0 (+ (* F F) (* x 2.0))))) (/ F B)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -40000000.0) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 130000.0) {
tmp = (sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-40000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 130000.0d0) then
tmp = (sqrt((1.0d0 / (2.0d0 + ((f * f) + (x * 2.0d0))))) * (f / b)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -40000000.0) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 130000.0) {
tmp = (Math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -40000000.0: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 130000.0: tmp = (math.sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -40000000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 130000.0) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(F * F) + Float64(x * 2.0))))) * Float64(F / B)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -40000000.0) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 130000.0) tmp = (sqrt((1.0 / (2.0 + ((F * F) + (x * 2.0))))) * (F / B)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -40000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 130000.0], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(F * F), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -40000000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 130000:\\
\;\;\;\;\sqrt{\frac{1}{2 + \left(F \cdot F + x \cdot 2\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4e7Initial program 55.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified73.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
if -4e7 < F < 1.3e5Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6487.3%
Simplified87.3%
if 1.3e5 < F Initial program 58.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified80.9%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
Final simplification93.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -0.000115)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -5.9e-185)
(/ (- (/ F (sqrt (+ (* F F) t_0))) x) B)
(if (<= F 2e-226)
(/ x (- 0.0 (tan B)))
(if (<= F 1.4e-10)
(/ (- (/ F (sqrt t_0)) x) B)
(- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.000115) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -5.9e-185) {
tmp = ((F / sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 2e-226) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.4e-10) {
tmp = ((F / sqrt(t_0)) - x) / B;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-0.000115d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-5.9d-185)) then
tmp = ((f / sqrt(((f * f) + t_0))) - x) / b
else if (f <= 2d-226) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.4d-10) then
tmp = ((f / sqrt(t_0)) - x) / b
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.000115) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -5.9e-185) {
tmp = ((F / Math.sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 2e-226) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.4e-10) {
tmp = ((F / Math.sqrt(t_0)) - x) / B;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -0.000115: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -5.9e-185: tmp = ((F / math.sqrt(((F * F) + t_0))) - x) / B elif F <= 2e-226: tmp = x / (0.0 - math.tan(B)) elif F <= 1.4e-10: tmp = ((F / math.sqrt(t_0)) - x) / B else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000115) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -5.9e-185) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + t_0))) - x) / B); elseif (F <= 2e-226) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.4e-10) tmp = Float64(Float64(Float64(F / sqrt(t_0)) - x) / B); else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.000115) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -5.9e-185) tmp = ((F / sqrt(((F * F) + t_0))) - x) / B; elseif (F <= 2e-226) tmp = x / (0.0 - tan(B)); elseif (F <= 1.4e-10) tmp = ((F / sqrt(t_0)) - x) / B; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000115], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -5.9e-185], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2e-226], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], N[(N[(N[(F / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000115:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -5.9 \cdot 10^{-185}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + t\_0}} - x}{B}\\
\mathbf{elif}\;F \leq 2 \cdot 10^{-226}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t\_0}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -1.15e-4Initial program 59.1%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.8%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6497.7%
Simplified97.7%
if -1.15e-4 < F < -5.9000000000000006e-185Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.0%
Simplified68.0%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr68.1%
if -5.9000000000000006e-185 < F < 1.99999999999999984e-226Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6490.6%
Simplified90.6%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6490.9%
Applied egg-rr90.9%
if 1.99999999999999984e-226 < F < 1.40000000000000008e-10Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.2%
Simplified62.2%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr62.3%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.3%
Simplified62.3%
if 1.40000000000000008e-10 < F Initial program 59.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.1%
Simplified99.1%
Final simplification88.0%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ x (tan B))))
(if (<= F -0.000135)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -8.5e-188)
(/ (- (/ F (sqrt (+ (* F F) t_0))) x) B)
(if (<= F 2.8e-227)
(/ x (- 0.0 (tan B)))
(if (<= F 2.05e-11)
(/ (- (/ F (sqrt t_0)) x) B)
(- (/ (+ 1.0 (/ (- -1.0 x) (* F F))) B) t_1)))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / tan(B);
double tmp;
if (F <= -0.000135) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -8.5e-188) {
tmp = ((F / sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 2.8e-227) {
tmp = x / (0.0 - tan(B));
} else if (F <= 2.05e-11) {
tmp = ((F / sqrt(t_0)) - x) / B;
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
t_1 = x / tan(b)
if (f <= (-0.000135d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-8.5d-188)) then
tmp = ((f / sqrt(((f * f) + t_0))) - x) / b
else if (f <= 2.8d-227) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 2.05d-11) then
tmp = ((f / sqrt(t_0)) - x) / b
else
tmp = ((1.0d0 + (((-1.0d0) - x) / (f * f))) / b) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -0.000135) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -8.5e-188) {
tmp = ((F / Math.sqrt(((F * F) + t_0))) - x) / B;
} else if (F <= 2.8e-227) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 2.05e-11) {
tmp = ((F / Math.sqrt(t_0)) - x) / B;
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = x / math.tan(B) tmp = 0 if F <= -0.000135: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -8.5e-188: tmp = ((F / math.sqrt(((F * F) + t_0))) - x) / B elif F <= 2.8e-227: tmp = x / (0.0 - math.tan(B)) elif F <= 2.05e-11: tmp = ((F / math.sqrt(t_0)) - x) / B else: tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - t_1 return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -0.000135) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -8.5e-188) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(F * F) + t_0))) - x) / B); elseif (F <= 2.8e-227) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 2.05e-11) tmp = Float64(Float64(Float64(F / sqrt(t_0)) - x) / B); else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / B) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = x / tan(B); tmp = 0.0; if (F <= -0.000135) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -8.5e-188) tmp = ((F / sqrt(((F * F) + t_0))) - x) / B; elseif (F <= 2.8e-227) tmp = x / (0.0 - tan(B)); elseif (F <= 2.05e-11) tmp = ((F / sqrt(t_0)) - x) / B; else tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -0.000135], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -8.5e-188], N[(N[(N[(F / N[Sqrt[N[(N[(F * F), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 2.8e-227], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.05e-11], N[(N[(N[(F / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -0.000135:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -8.5 \cdot 10^{-188}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{F \cdot F + t\_0}} - x}{B}\\
\mathbf{elif}\;F \leq 2.8 \cdot 10^{-227}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 2.05 \cdot 10^{-11}:\\
\;\;\;\;\frac{\frac{F}{\sqrt{t\_0}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - t\_1\\
\end{array}
\end{array}
if F < -1.35000000000000002e-4Initial program 59.1%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified75.8%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6497.7%
Simplified97.7%
if -1.35000000000000002e-4 < F < -8.5000000000000004e-188Initial program 99.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.0%
Simplified68.0%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr68.1%
if -8.5000000000000004e-188 < F < 2.7999999999999998e-227Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6490.6%
Simplified90.6%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6490.9%
Applied egg-rr90.9%
if 2.7999999999999998e-227 < F < 2.05e-11Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.2%
Simplified62.2%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr62.3%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6462.3%
Simplified62.3%
if 2.05e-11 < F Initial program 59.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.5%
Taylor expanded in F around inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6481.7%
Simplified81.7%
Final simplification83.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (- (/ F (sqrt (+ 2.0 (* x 2.0)))) x) B)))
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -5.4e-188)
t_0
(if (<= F 2.3e-226)
(/ x (- 0.0 (tan B)))
(if (<= F 1.4e-10)
t_0
(- (/ (+ 1.0 (/ (- -1.0 x) (* F F))) B) (/ x (tan B)))))))))
double code(double F, double B, double x) {
double t_0 = ((F / sqrt((2.0 + (x * 2.0)))) - x) / B;
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -5.4e-188) {
tmp = t_0;
} else if (F <= 2.3e-226) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.4e-10) {
tmp = t_0;
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((f / sqrt((2.0d0 + (x * 2.0d0)))) - x) / b
if (f <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-5.4d-188)) then
tmp = t_0
else if (f <= 2.3d-226) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.4d-10) then
tmp = t_0
else
tmp = ((1.0d0 + (((-1.0d0) - x) / (f * f))) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F / Math.sqrt((2.0 + (x * 2.0)))) - x) / B;
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -5.4e-188) {
tmp = t_0;
} else if (F <= 2.3e-226) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.4e-10) {
tmp = t_0;
} else {
tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = ((F / math.sqrt((2.0 + (x * 2.0)))) - x) / B tmp = 0 if F <= -0.00098: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -5.4e-188: tmp = t_0 elif F <= 2.3e-226: tmp = x / (0.0 - math.tan(B)) elif F <= 1.4e-10: tmp = t_0 else: tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F / sqrt(Float64(2.0 + Float64(x * 2.0)))) - x) / B) tmp = 0.0 if (F <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -5.4e-188) tmp = t_0; elseif (F <= 2.3e-226) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.4e-10) tmp = t_0; else tmp = Float64(Float64(Float64(1.0 + Float64(Float64(-1.0 - x) / Float64(F * F))) / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F / sqrt((2.0 + (x * 2.0)))) - x) / B; tmp = 0.0; if (F <= -0.00098) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -5.4e-188) tmp = t_0; elseif (F <= 2.3e-226) tmp = x / (0.0 - tan(B)); elseif (F <= 1.4e-10) tmp = t_0; else tmp = ((1.0 + ((-1.0 - x) / (F * F))) / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F / N[Sqrt[N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -5.4e-188], t$95$0, If[LessEqual[F, 2.3e-226], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], t$95$0, N[(N[(N[(1.0 + N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{F}{\sqrt{2 + x \cdot 2}} - x}{B}\\
\mathbf{if}\;F \leq -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -5.4 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 2.3 \cdot 10^{-226}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1 - x}{F \cdot F}}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6497.6%
Simplified97.6%
Taylor expanded in B around 0
/-lowering-/.f6476.8%
Simplified76.8%
if -9.7999999999999997e-4 < F < -5.4000000000000002e-188 or 2.3e-226 < F < 1.40000000000000008e-10Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.6%
Simplified63.6%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr63.7%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6463.2%
Simplified63.2%
if -5.4000000000000002e-188 < F < 2.3e-226Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6490.6%
Simplified90.6%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6490.9%
Applied egg-rr90.9%
if 1.40000000000000008e-10 < F Initial program 59.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.5%
Taylor expanded in F around inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6498.3%
Simplified98.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6481.7%
Simplified81.7%
Final simplification76.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (+ 2.0 (* x 2.0))) (t_1 (/ (- (/ F (sqrt t_0)) x) B)))
(if (<= F -0.00098)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -1.2e-185)
t_1
(if (<= F 2.2e-226)
(/ x (- 0.0 (tan B)))
(if (<= F 1.4e-10)
t_1
(if (<= F 2.5e+247)
(/ (- (/ F (* F (+ 1.0 (/ (* t_0 0.5) (* F F))))) x) B)
(- (/ -1.0 B) (/ x (tan B))))))))))
double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = ((F / sqrt(t_0)) - x) / B;
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -1.2e-185) {
tmp = t_1;
} else if (F <= 2.2e-226) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.4e-10) {
tmp = t_1;
} else if (F <= 2.5e+247) {
tmp = ((F / (F * (1.0 + ((t_0 * 0.5) / (F * F))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 2.0d0 + (x * 2.0d0)
t_1 = ((f / sqrt(t_0)) - x) / b
if (f <= (-0.00098d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-1.2d-185)) then
tmp = t_1
else if (f <= 2.2d-226) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.4d-10) then
tmp = t_1
else if (f <= 2.5d+247) then
tmp = ((f / (f * (1.0d0 + ((t_0 * 0.5d0) / (f * f))))) - x) / b
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = 2.0 + (x * 2.0);
double t_1 = ((F / Math.sqrt(t_0)) - x) / B;
double tmp;
if (F <= -0.00098) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -1.2e-185) {
tmp = t_1;
} else if (F <= 2.2e-226) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.4e-10) {
tmp = t_1;
} else if (F <= 2.5e+247) {
tmp = ((F / (F * (1.0 + ((t_0 * 0.5) / (F * F))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): t_0 = 2.0 + (x * 2.0) t_1 = ((F / math.sqrt(t_0)) - x) / B tmp = 0 if F <= -0.00098: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -1.2e-185: tmp = t_1 elif F <= 2.2e-226: tmp = x / (0.0 - math.tan(B)) elif F <= 1.4e-10: tmp = t_1 elif F <= 2.5e+247: tmp = ((F / (F * (1.0 + ((t_0 * 0.5) / (F * F))))) - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) t_0 = Float64(2.0 + Float64(x * 2.0)) t_1 = Float64(Float64(Float64(F / sqrt(t_0)) - x) / B) tmp = 0.0 if (F <= -0.00098) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -1.2e-185) tmp = t_1; elseif (F <= 2.2e-226) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.4e-10) tmp = t_1; elseif (F <= 2.5e+247) tmp = Float64(Float64(Float64(F / Float64(F * Float64(1.0 + Float64(Float64(t_0 * 0.5) / Float64(F * F))))) - x) / B); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) t_0 = 2.0 + (x * 2.0); t_1 = ((F / sqrt(t_0)) - x) / B; tmp = 0.0; if (F <= -0.00098) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -1.2e-185) tmp = t_1; elseif (F <= 2.2e-226) tmp = x / (0.0 - tan(B)); elseif (F <= 1.4e-10) tmp = t_1; elseif (F <= 2.5e+247) tmp = ((F / (F * (1.0 + ((t_0 * 0.5) / (F * F))))) - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(F / N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]}, If[LessEqual[F, -0.00098], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -1.2e-185], t$95$1, If[LessEqual[F, 2.2e-226], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.4e-10], t$95$1, If[LessEqual[F, 2.5e+247], N[(N[(N[(F / N[(F * N[(1.0 + N[(N[(t$95$0 * 0.5), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 2 + x \cdot 2\\
t_1 := \frac{\frac{F}{\sqrt{t\_0}} - x}{B}\\
\mathbf{if}\;F \leq -0.00098:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -1.2 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 2.2 \cdot 10^{-226}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.4 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;F \leq 2.5 \cdot 10^{+247}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(1 + \frac{t\_0 \cdot 0.5}{F \cdot F}\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -9.7999999999999997e-4Initial program 58.6%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6497.6%
Simplified97.6%
Taylor expanded in B around 0
/-lowering-/.f6476.8%
Simplified76.8%
if -9.7999999999999997e-4 < F < -1.2000000000000001e-185 or 2.2e-226 < F < 1.40000000000000008e-10Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.6%
Simplified63.6%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr63.7%
Taylor expanded in F around 0
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6463.2%
Simplified63.2%
if -1.2000000000000001e-185 < F < 2.2e-226Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6490.6%
Simplified90.6%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6490.9%
Applied egg-rr90.9%
if 1.40000000000000008e-10 < F < 2.50000000000000011e247Initial program 60.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.1%
Simplified53.1%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr53.1%
Taylor expanded in F around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6468.5%
Simplified68.5%
if 2.50000000000000011e247 < F Initial program 54.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6483.9%
Simplified83.9%
Taylor expanded in B around 0
/-lowering-/.f6484.3%
Simplified84.3%
+-commutativeN/A
div-invN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6484.4%
Applied egg-rr84.4%
Final simplification74.3%
(FPCore (F B x)
:precision binary64
(if (<= F -120.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F -3.3e-74)
(* (/ F B) (sqrt (/ 1.0 (+ (* F F) 2.0))))
(if (<= F 27.0)
(/ x (- 0.0 (tan B)))
(if (<= F 1.3e+249)
(/ (- (/ F (* F (+ 1.0 (/ (* (+ 2.0 (* x 2.0)) 0.5) (* F F))))) x) B)
(- (/ -1.0 B) (/ x (tan B))))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -120.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= -3.3e-74) {
tmp = (F / B) * sqrt((1.0 / ((F * F) + 2.0)));
} else if (F <= 27.0) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.3e+249) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-120.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= (-3.3d-74)) then
tmp = (f / b) * sqrt((1.0d0 / ((f * f) + 2.0d0)))
else if (f <= 27.0d0) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.3d+249) then
tmp = ((f / (f * (1.0d0 + (((2.0d0 + (x * 2.0d0)) * 0.5d0) / (f * f))))) - x) / b
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -120.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= -3.3e-74) {
tmp = (F / B) * Math.sqrt((1.0 / ((F * F) + 2.0)));
} else if (F <= 27.0) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.3e+249) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -120.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= -3.3e-74: tmp = (F / B) * math.sqrt((1.0 / ((F * F) + 2.0))) elif F <= 27.0: tmp = x / (0.0 - math.tan(B)) elif F <= 1.3e+249: tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -120.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= -3.3e-74) tmp = Float64(Float64(F / B) * sqrt(Float64(1.0 / Float64(Float64(F * F) + 2.0)))); elseif (F <= 27.0) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.3e+249) tmp = Float64(Float64(Float64(F / Float64(F * Float64(1.0 + Float64(Float64(Float64(2.0 + Float64(x * 2.0)) * 0.5) / Float64(F * F))))) - x) / B); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -120.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= -3.3e-74) tmp = (F / B) * sqrt((1.0 / ((F * F) + 2.0))); elseif (F <= 27.0) tmp = x / (0.0 - tan(B)); elseif (F <= 1.3e+249) tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -120.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, -3.3e-74], N[(N[(F / B), $MachinePrecision] * N[Sqrt[N[(1.0 / N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 27.0], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.3e+249], N[(N[(N[(F / N[(F * N[(1.0 + N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -120:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq -3.3 \cdot 10^{-74}:\\
\;\;\;\;\frac{F}{B} \cdot \sqrt{\frac{1}{F \cdot F + 2}}\\
\mathbf{elif}\;F \leq 27:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.3 \cdot 10^{+249}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(1 + \frac{\left(2 + x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -120Initial program 57.5%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
Taylor expanded in B around 0
/-lowering-/.f6478.4%
Simplified78.4%
if -120 < F < -3.29999999999999996e-74Initial program 99.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6471.4%
Simplified71.4%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
/-lowering-/.f6459.7%
Simplified59.7%
if -3.29999999999999996e-74 < F < 27Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6467.9%
Simplified67.9%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6468.0%
Applied egg-rr68.0%
if 27 < F < 1.3000000000000001e249Initial program 60.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.1%
Simplified54.1%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr54.1%
Taylor expanded in F around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.8%
Simplified69.8%
if 1.3000000000000001e249 < F Initial program 54.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6483.9%
Simplified83.9%
Taylor expanded in B around 0
/-lowering-/.f6484.3%
Simplified84.3%
+-commutativeN/A
div-invN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6484.4%
Applied egg-rr84.4%
Final simplification71.6%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (- (/ -1.0 B) (/ x (tan B)))))
(if (<= F -3.7e+35)
t_0
(if (<= F -27500000.0)
(/ -1.0 (sin B))
(if (<= F 1.05)
(/ x (- 0.0 (tan B)))
(if (<= F 2.9e+246)
(/
(- (/ F (* F (+ 1.0 (/ (* (+ 2.0 (* x 2.0)) 0.5) (* F F))))) x)
B)
t_0))))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (F <= -3.7e+35) {
tmp = t_0;
} else if (F <= -27500000.0) {
tmp = -1.0 / sin(B);
} else if (F <= 1.05) {
tmp = x / (0.0 - tan(B));
} else if (F <= 2.9e+246) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (f <= (-3.7d+35)) then
tmp = t_0
else if (f <= (-27500000.0d0)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 1.05d0) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 2.9d+246) then
tmp = ((f / (f * (1.0d0 + (((2.0d0 + (x * 2.0d0)) * 0.5d0) / (f * f))))) - x) / b
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (F <= -3.7e+35) {
tmp = t_0;
} else if (F <= -27500000.0) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 1.05) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 2.9e+246) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if F <= -3.7e+35: tmp = t_0 elif F <= -27500000.0: tmp = -1.0 / math.sin(B) elif F <= 1.05: tmp = x / (0.0 - math.tan(B)) elif F <= 2.9e+246: tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (F <= -3.7e+35) tmp = t_0; elseif (F <= -27500000.0) tmp = Float64(-1.0 / sin(B)); elseif (F <= 1.05) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 2.9e+246) tmp = Float64(Float64(Float64(F / Float64(F * Float64(1.0 + Float64(Float64(Float64(2.0 + Float64(x * 2.0)) * 0.5) / Float64(F * F))))) - x) / B); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (F <= -3.7e+35) tmp = t_0; elseif (F <= -27500000.0) tmp = -1.0 / sin(B); elseif (F <= 1.05) tmp = x / (0.0 - tan(B)); elseif (F <= 2.9e+246) tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B; else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -3.7e+35], t$95$0, If[LessEqual[F, -27500000.0], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.05], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.9e+246], N[(N[(N[(F / N[(F * N[(1.0 + N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -3.7 \cdot 10^{+35}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq -27500000:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 1.05:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 2.9 \cdot 10^{+246}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(1 + \frac{\left(2 + x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if F < -3.7e35 or 2.90000000000000014e246 < F Initial program 51.6%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6497.5%
Simplified97.5%
Taylor expanded in B around 0
/-lowering-/.f6481.1%
Simplified81.1%
+-commutativeN/A
div-invN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6481.2%
Applied egg-rr81.2%
if -3.7e35 < F < -2.75e7Initial program 99.2%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.2%
Simplified99.2%
Taylor expanded in x around 0
/-lowering-/.f64N/A
sin-lowering-sin.f6499.2%
Simplified99.2%
if -2.75e7 < F < 1.05000000000000004Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6463.0%
Simplified63.0%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6463.2%
Applied egg-rr63.2%
if 1.05000000000000004 < F < 2.90000000000000014e246Initial program 60.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.1%
Simplified54.1%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr54.1%
Taylor expanded in F around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.8%
Simplified69.8%
Final simplification71.0%
(FPCore (F B x)
:precision binary64
(if (<= F -0.00082)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 59.0)
(/ x (- 0.0 (tan B)))
(if (<= F 1.8e+248)
(/ (- (/ F (* F (+ 1.0 (/ (* (+ 2.0 (* x 2.0)) 0.5) (* F F))))) x) B)
(- (/ -1.0 B) (/ x (tan B)))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -0.00082) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 59.0) {
tmp = x / (0.0 - tan(B));
} else if (F <= 1.8e+248) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / tan(B));
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-0.00082d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 59.0d0) then
tmp = x / (0.0d0 - tan(b))
else if (f <= 1.8d+248) then
tmp = ((f / (f * (1.0d0 + (((2.0d0 + (x * 2.0d0)) * 0.5d0) / (f * f))))) - x) / b
else
tmp = ((-1.0d0) / b) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -0.00082) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 59.0) {
tmp = x / (0.0 - Math.tan(B));
} else if (F <= 1.8e+248) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
} else {
tmp = (-1.0 / B) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -0.00082: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 59.0: tmp = x / (0.0 - math.tan(B)) elif F <= 1.8e+248: tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B else: tmp = (-1.0 / B) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -0.00082) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 59.0) tmp = Float64(x / Float64(0.0 - tan(B))); elseif (F <= 1.8e+248) tmp = Float64(Float64(Float64(F / Float64(F * Float64(1.0 + Float64(Float64(Float64(2.0 + Float64(x * 2.0)) * 0.5) / Float64(F * F))))) - x) / B); else tmp = Float64(Float64(-1.0 / B) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -0.00082) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 59.0) tmp = x / (0.0 - tan(B)); elseif (F <= 1.8e+248) tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B; else tmp = (-1.0 / B) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -0.00082], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 59.0], N[(x / N[(0.0 - N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.8e+248], N[(N[(N[(F / N[(F * N[(1.0 + N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -0.00082:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 59:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\mathbf{elif}\;F \leq 1.8 \cdot 10^{+248}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(1 + \frac{\left(2 + x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if F < -8.1999999999999998e-4Initial program 58.6%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6497.6%
Simplified97.6%
Taylor expanded in B around 0
/-lowering-/.f6476.8%
Simplified76.8%
if -8.1999999999999998e-4 < F < 59Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr99.5%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6463.5%
Simplified63.5%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6463.6%
Applied egg-rr63.6%
if 59 < F < 1.80000000000000001e248Initial program 60.0%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.1%
Simplified54.1%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr54.1%
Taylor expanded in F around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.8%
Simplified69.8%
if 1.80000000000000001e248 < F Initial program 54.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6483.9%
Simplified83.9%
Taylor expanded in B around 0
/-lowering-/.f6484.3%
Simplified84.3%
+-commutativeN/A
div-invN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6484.4%
Applied egg-rr84.4%
Final simplification69.8%
(FPCore (F B x) :precision binary64 (if (<= B 2.5e-20) (/ (- (/ 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 <= 2.5e-20) {
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 <= 2.5d-20) 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 <= 2.5e-20) {
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 <= 2.5e-20: 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 <= 2.5e-20) 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 <= 2.5e-20) 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, 2.5e-20], 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 2.5 \cdot 10^{-20}:\\
\;\;\;\;\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 < 2.4999999999999999e-20Initial program 71.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.0%
Simplified64.0%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr64.0%
if 2.4999999999999999e-20 < B Initial program 94.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified95.0%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr94.9%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6462.2%
Simplified62.2%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6462.3%
Applied egg-rr62.3%
Final simplification63.6%
(FPCore (F B x) :precision binary64 (if (<= B 1.56e-21) (/ (- (/ F (* F (+ 1.0 (/ (* (+ 2.0 (* x 2.0)) 0.5) (* F F))))) x) B) (/ x (- 0.0 (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 1.56e-21) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (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.56d-21) then
tmp = ((f / (f * (1.0d0 + (((2.0d0 + (x * 2.0d0)) * 0.5d0) / (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.56e-21) {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
} else {
tmp = x / (0.0 - Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 1.56e-21: tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (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.56e-21) tmp = Float64(Float64(Float64(F / Float64(F * Float64(1.0 + Float64(Float64(Float64(2.0 + Float64(x * 2.0)) * 0.5) / 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.56e-21) tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B; else tmp = x / (0.0 - tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 1.56e-21], N[(N[(N[(F / N[(F * N[(1.0 + N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / 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.56 \cdot 10^{-21}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(1 + \frac{\left(2 + x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{0 - \tan B}\\
\end{array}
\end{array}
if B < 1.55999999999999999e-21Initial program 71.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6463.8%
Simplified63.8%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr63.9%
Taylor expanded in F around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6450.0%
Simplified50.0%
if 1.55999999999999999e-21 < B Initial program 94.7%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified95.0%
associate-+r+N/A
*-commutativeN/A
metadata-evalN/A
metadata-evalN/A
associate-*l/N/A
clear-numN/A
associate-*l/N/A
div-invN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
Applied egg-rr95.0%
Taylor expanded in F around 0
mul-1-negN/A
associate-/l*N/A
distribute-lft-neg-inN/A
*-lowering-*.f64N/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6461.2%
Simplified61.2%
sub0-negN/A
clear-numN/A
tan-quotN/A
distribute-lft-neg-inN/A
div-invN/A
neg-lowering-neg.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6461.3%
Applied egg-rr61.3%
Final simplification52.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ (* (+ 2.0 (* x 2.0)) 0.5) (* F F))))
(if (<= F -4e-145)
(/ (- (/ F (* F (- -1.0 t_0))) x) B)
(/ (- (/ F (* F (+ 1.0 t_0))) x) B))))
double code(double F, double B, double x) {
double t_0 = ((2.0 + (x * 2.0)) * 0.5) / (F * F);
double tmp;
if (F <= -4e-145) {
tmp = ((F / (F * (-1.0 - t_0))) - x) / B;
} else {
tmp = ((F / (F * (1.0 + t_0))) - x) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((2.0d0 + (x * 2.0d0)) * 0.5d0) / (f * f)
if (f <= (-4d-145)) then
tmp = ((f / (f * ((-1.0d0) - t_0))) - x) / b
else
tmp = ((f / (f * (1.0d0 + t_0))) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((2.0 + (x * 2.0)) * 0.5) / (F * F);
double tmp;
if (F <= -4e-145) {
tmp = ((F / (F * (-1.0 - t_0))) - x) / B;
} else {
tmp = ((F / (F * (1.0 + t_0))) - x) / B;
}
return tmp;
}
def code(F, B, x): t_0 = ((2.0 + (x * 2.0)) * 0.5) / (F * F) tmp = 0 if F <= -4e-145: tmp = ((F / (F * (-1.0 - t_0))) - x) / B else: tmp = ((F / (F * (1.0 + t_0))) - x) / B return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(2.0 + Float64(x * 2.0)) * 0.5) / Float64(F * F)) tmp = 0.0 if (F <= -4e-145) tmp = Float64(Float64(Float64(F / Float64(F * Float64(-1.0 - t_0))) - x) / B); else tmp = Float64(Float64(Float64(F / Float64(F * Float64(1.0 + t_0))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((2.0 + (x * 2.0)) * 0.5) / (F * F); tmp = 0.0; if (F <= -4e-145) tmp = ((F / (F * (-1.0 - t_0))) - x) / B; else tmp = ((F / (F * (1.0 + t_0))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4e-145], N[(N[(N[(F / N[(F * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(F / N[(F * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(2 + x \cdot 2\right) \cdot 0.5}{F \cdot F}\\
\mathbf{if}\;F \leq -4 \cdot 10^{-145}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(-1 - t\_0\right)} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(1 + t\_0\right)} - x}{B}\\
\end{array}
\end{array}
if F < -3.99999999999999966e-145Initial program 67.5%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6448.0%
Simplified48.0%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr48.1%
Taylor expanded in F around -inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.6%
Simplified47.6%
if -3.99999999999999966e-145 < F Initial program 83.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6452.4%
Simplified52.4%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr52.4%
Taylor expanded in F around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6447.5%
Simplified47.5%
Final simplification47.5%
(FPCore (F B x) :precision binary64 (if (<= F -6.7e-50) (/ (- -1.0 x) B) (/ (- (/ F (* F (+ 1.0 (/ (* (+ 2.0 (* x 2.0)) 0.5) (* F F))))) x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.7e-50) {
tmp = (-1.0 - x) / B;
} else {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - 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 <= (-6.7d-50)) then
tmp = ((-1.0d0) - x) / b
else
tmp = ((f / (f * (1.0d0 + (((2.0d0 + (x * 2.0d0)) * 0.5d0) / (f * f))))) - x) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.7e-50) {
tmp = (-1.0 - x) / B;
} else {
tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.7e-50: tmp = (-1.0 - x) / B else: tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.7e-50) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(Float64(F / Float64(F * Float64(1.0 + Float64(Float64(Float64(2.0 + Float64(x * 2.0)) * 0.5) / Float64(F * F))))) - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.7e-50) tmp = (-1.0 - x) / B; else tmp = ((F / (F * (1.0 + (((2.0 + (x * 2.0)) * 0.5) / (F * F))))) - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.7e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(N[(F / N[(F * N[(1.0 + N[(N[(N[(2.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.7 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{F}{F \cdot \left(1 + \frac{\left(2 + x \cdot 2\right) \cdot 0.5}{F \cdot F}\right)} - x}{B}\\
\end{array}
\end{array}
if F < -6.7000000000000005e-50Initial program 62.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6445.2%
Simplified45.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6451.3%
Simplified51.3%
if -6.7000000000000005e-50 < F Initial program 84.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.5%
Simplified53.5%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
pow1/2N/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
+-commutativeN/A
metadata-evalN/A
pow-flipN/A
/-lowering-/.f64N/A
pow-flipN/A
+-commutativeN/A
*-commutativeN/A
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
pow1/2N/A
sqrt-lowering-sqrt.f64N/A
Applied egg-rr53.5%
Taylor expanded in F around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6445.5%
Simplified45.5%
Final simplification47.4%
(FPCore (F B x)
:precision binary64
(if (<= F -1.75e-48)
(/ (- -1.0 x) B)
(if (<= F 1.95)
(/ (- 0.0 x) B)
(/ (+ 1.0 (- (/ (- -1.0 x) (* F F)) x)) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.95) {
tmp = (0.0 - x) / B;
} else {
tmp = (1.0 + (((-1.0 - x) / (F * F)) - x)) / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.75d-48)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.95d0) then
tmp = (0.0d0 - x) / b
else
tmp = (1.0d0 + ((((-1.0d0) - x) / (f * f)) - x)) / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.75e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.95) {
tmp = (0.0 - x) / B;
} else {
tmp = (1.0 + (((-1.0 - x) / (F * F)) - x)) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.75e-48: tmp = (-1.0 - x) / B elif F <= 1.95: tmp = (0.0 - x) / B else: tmp = (1.0 + (((-1.0 - x) / (F * F)) - x)) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.75e-48) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.95) tmp = Float64(Float64(0.0 - x) / B); else tmp = Float64(Float64(1.0 + Float64(Float64(Float64(-1.0 - x) / Float64(F * F)) - x)) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.75e-48) tmp = (-1.0 - x) / B; elseif (F <= 1.95) tmp = (0.0 - x) / B; else tmp = (1.0 + (((-1.0 - x) / (F * F)) - x)) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.75e-48], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.95], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 + N[(N[(N[(-1.0 - x), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.75 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.95:\\
\;\;\;\;\frac{0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \left(\frac{-1 - x}{F \cdot F} - x\right)}{B}\\
\end{array}
\end{array}
if F < -1.74999999999999996e-48Initial program 62.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6445.2%
Simplified45.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6451.3%
Simplified51.3%
if -1.74999999999999996e-48 < F < 1.94999999999999996Initial program 99.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6455.4%
Simplified55.4%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6434.3%
Simplified34.3%
if 1.94999999999999996 < F Initial program 59.0%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified81.2%
Taylor expanded in F around inf
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
associate--l+N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f64N/A
unpow2N/A
*-lowering-*.f6464.0%
Simplified64.0%
(FPCore (F B x) :precision binary64 (if (<= F -1.35e-48) (/ (- -1.0 x) B) (if (<= F 1.6e-11) (/ (- 0.0 x) B) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.35e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.6e-11) {
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 <= (-1.35d-48)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 1.6d-11) 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 <= -1.35e-48) {
tmp = (-1.0 - x) / B;
} else if (F <= 1.6e-11) {
tmp = (0.0 - x) / B;
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.35e-48: tmp = (-1.0 - x) / B elif F <= 1.6e-11: tmp = (0.0 - x) / B else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.35e-48) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 1.6e-11) tmp = Float64(Float64(0.0 - x) / B); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.35e-48) tmp = (-1.0 - x) / B; elseif (F <= 1.6e-11) tmp = (0.0 - x) / B; else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.35e-48], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.6e-11], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.35 \cdot 10^{-48}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 1.6 \cdot 10^{-11}:\\
\;\;\;\;\frac{0 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.35000000000000006e-48Initial program 62.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6445.2%
Simplified45.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6451.3%
Simplified51.3%
if -1.35000000000000006e-48 < F < 1.59999999999999997e-11Initial program 99.4%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6455.9%
Simplified55.9%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6434.6%
Simplified34.6%
if 1.59999999999999997e-11 < F Initial program 59.7%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.4%
Simplified49.4%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6462.8%
Simplified62.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.5e-50) (/ (- -1.0 x) B) (/ (- 0.0 x) B)))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.5e-50) {
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.5d-50)) 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.5e-50) {
tmp = (-1.0 - x) / B;
} else {
tmp = (0.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.5e-50: tmp = (-1.0 - x) / B else: tmp = (0.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.5e-50) tmp = Float64(Float64(-1.0 - x) / B); else tmp = Float64(Float64(0.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.5e-50) tmp = (-1.0 - x) / B; else tmp = (0.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.5e-50], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(0.0 - x), $MachinePrecision] / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{0 - x}{B}\\
\end{array}
\end{array}
if F < -1.49999999999999995e-50Initial program 62.3%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6445.2%
Simplified45.2%
Taylor expanded in F around -inf
associate-*r/N/A
mul-1-negN/A
/-lowering-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
--lowering--.f6451.3%
Simplified51.3%
if -1.49999999999999995e-50 < F Initial program 84.6%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.5%
Simplified53.5%
Taylor expanded in F around 0
mul-1-negN/A
neg-sub0N/A
--lowering--.f6433.8%
Simplified33.8%
(FPCore (F B x) :precision binary64 (/ (- -1.0 x) B))
double code(double F, double B, double x) {
return (-1.0 - x) / B;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = ((-1.0d0) - x) / b
end function
public static double code(double F, double B, double x) {
return (-1.0 - x) / B;
}
def code(F, B, x): return (-1.0 - x) / B
function code(F, B, x) return Float64(Float64(-1.0 - x) / B) end
function tmp = code(F, B, x) tmp = (-1.0 - x) / B; end
code[F_, B_, x_] := N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1 - x}{B}
\end{array}
Initial program 77.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6450.7%
Simplified50.7%
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--.f6431.2%
Simplified31.2%
(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 77.1%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f6450.7%
Simplified50.7%
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--.f6431.2%
Simplified31.2%
Taylor expanded in x around 0
/-lowering-/.f6410.6%
Simplified10.6%
herbie shell --seed 2024145
(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))))))