
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F B x) :precision binary64 (+ (- (* x (/ 1.0 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2.0) (* 2.0 x)) (- (/ 1.0 2.0))))))
double code(double F, double B, double x) {
return -(x * (1.0 / tan(B))) + ((F / sin(B)) * pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
code = -(x * (1.0d0 / tan(b))) + ((f / sin(b)) * ((((f * f) + 2.0d0) + (2.0d0 * x)) ** -(1.0d0 / 2.0d0)))
end function
public static double code(double F, double B, double x) {
return -(x * (1.0 / Math.tan(B))) + ((F / Math.sin(B)) * Math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)));
}
def code(F, B, x): return -(x * (1.0 / math.tan(B))) + ((F / math.sin(B)) * math.pow((((F * F) + 2.0) + (2.0 * x)), -(1.0 / 2.0)))
function code(F, B, x) return Float64(Float64(-Float64(x * Float64(1.0 / tan(B)))) + Float64(Float64(F / sin(B)) * (Float64(Float64(Float64(F * F) + 2.0) + Float64(2.0 * x)) ^ Float64(-Float64(1.0 / 2.0))))) end
function tmp = code(F, B, x) tmp = -(x * (1.0 / tan(B))) + ((F / sin(B)) * ((((F * F) + 2.0) + (2.0 * x)) ^ -(1.0 / 2.0))); end
code[F_, B_, x_] := N[((-N[(x * N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]) + N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(F * F), $MachinePrecision] + 2.0), $MachinePrecision] + N[(2.0 * x), $MachinePrecision]), $MachinePrecision], (-N[(1.0 / 2.0), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\end{array}
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (+ 2.0 (* 2.0 x))))
(if (<= F -108000.0)
(- (/ (+ -1.0 (/ (* 0.5 t_1) (* F F))) (sin B)) t_0)
(if (<= F 470000000.0)
(- (/ (pow (+ t_1 (* F F)) -0.5) (/ (sin B) F)) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 2.0 + (2.0 * x);
double tmp;
if (F <= -108000.0) {
tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / sin(B)) - t_0;
} else if (F <= 470000000.0) {
tmp = (pow((t_1 + (F * F)), -0.5) / (sin(B) / F)) - t_0;
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = 2.0d0 + (2.0d0 * x)
if (f <= (-108000.0d0)) then
tmp = (((-1.0d0) + ((0.5d0 * t_1) / (f * f))) / sin(b)) - t_0
else if (f <= 470000000.0d0) then
tmp = (((t_1 + (f * f)) ** (-0.5d0)) / (sin(b) / f)) - t_0
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = 2.0 + (2.0 * x);
double tmp;
if (F <= -108000.0) {
tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 470000000.0) {
tmp = (Math.pow((t_1 + (F * F)), -0.5) / (Math.sin(B) / F)) - t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = 2.0 + (2.0 * x) tmp = 0 if F <= -108000.0: tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / math.sin(B)) - t_0 elif F <= 470000000.0: tmp = (math.pow((t_1 + (F * F)), -0.5) / (math.sin(B) / F)) - t_0 else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(2.0 + Float64(2.0 * x)) tmp = 0.0 if (F <= -108000.0) tmp = Float64(Float64(Float64(-1.0 + Float64(Float64(0.5 * t_1) / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 470000000.0) tmp = Float64(Float64((Float64(t_1 + Float64(F * F)) ^ -0.5) / Float64(sin(B) / F)) - t_0); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = 2.0 + (2.0 * x); tmp = 0.0; if (F <= -108000.0) tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / sin(B)) - t_0; elseif (F <= 470000000.0) tmp = (((t_1 + (F * F)) ^ -0.5) / (sin(B) / F)) - t_0; else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -108000.0], N[(N[(N[(-1.0 + N[(N[(0.5 * t$95$1), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 470000000.0], N[(N[(N[Power[N[(t$95$1 + N[(F * F), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[(N[Sin[B], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := 2 + 2 \cdot x\\
\mathbf{if}\;F \leq -108000:\\
\;\;\;\;\frac{-1 + \frac{0.5 \cdot t\_1}{F \cdot F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 470000000:\\
\;\;\;\;\frac{{\left(t\_1 + F \cdot F\right)}^{-0.5}}{\frac{\sin B}{F}} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -108000Initial program 58.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified70.8%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.7%
Simplified99.7%
if -108000 < F < 4.7e8Initial program 99.4%
+-commutativeN/A
div-invN/A
sub-negN/A
--lowering--.f64N/A
Applied egg-rr99.7%
if 4.7e8 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -2.4e+26)
(+ (/ -1.0 (sin B)) (/ (/ 1.0 (tan B)) (/ -1.0 x)))
(if (<= F 20000000.0)
(- (* F (/ (pow (+ (+ 2.0 (* 2.0 x)) (* F F)) -0.5) (sin B))) t_0)
(- (/ 1.0 (sin B)) t_0)))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -2.4e+26) {
tmp = (-1.0 / sin(B)) + ((1.0 / tan(B)) / (-1.0 / x));
} else if (F <= 20000000.0) {
tmp = (F * (pow(((2.0 + (2.0 * x)) + (F * F)), -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 <= (-2.4d+26)) then
tmp = ((-1.0d0) / sin(b)) + ((1.0d0 / tan(b)) / ((-1.0d0) / x))
else if (f <= 20000000.0d0) then
tmp = (f * ((((2.0d0 + (2.0d0 * x)) + (f * f)) ** (-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 <= -2.4e+26) {
tmp = (-1.0 / Math.sin(B)) + ((1.0 / Math.tan(B)) / (-1.0 / x));
} else if (F <= 20000000.0) {
tmp = (F * (Math.pow(((2.0 + (2.0 * x)) + (F * F)), -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 <= -2.4e+26: tmp = (-1.0 / math.sin(B)) + ((1.0 / math.tan(B)) / (-1.0 / x)) elif F <= 20000000.0: tmp = (F * (math.pow(((2.0 + (2.0 * x)) + (F * F)), -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 <= -2.4e+26) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(Float64(1.0 / tan(B)) / Float64(-1.0 / x))); elseif (F <= 20000000.0) tmp = Float64(Float64(F * Float64((Float64(Float64(2.0 + Float64(2.0 * x)) + Float64(F * F)) ^ -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 <= -2.4e+26) tmp = (-1.0 / sin(B)) + ((1.0 / tan(B)) / (-1.0 / x)); elseif (F <= 20000000.0) tmp = (F * ((((2.0 + (2.0 * x)) + (F * F)) ^ -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, -2.4e+26], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] / N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 20000000.0], N[(N[(F * N[(N[Power[N[(N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision] + N[(F * F), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -2.4 \cdot 10^{+26}:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{\frac{1}{\tan B}}{\frac{-1}{x}}\\
\mathbf{elif}\;F \leq 20000000:\\
\;\;\;\;F \cdot \frac{{\left(\left(2 + 2 \cdot x\right) + F \cdot F\right)}^{-0.5}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -2.40000000000000005e26Initial program 55.7%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.7%
Simplified99.7%
associate-/l*N/A
clear-numN/A
tan-quotN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
associate-/r/N/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6499.8%
Applied egg-rr99.8%
if -2.40000000000000005e26 < F < 2e7Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Applied egg-rr99.7%
if 2e7 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -105000000.0)
(+ (/ -1.0 (sin B)) (/ (/ 1.0 (tan B)) (/ -1.0 x)))
(if (<= F 50000.0)
(- (/ (* F (sqrt (/ 1.0 (+ 2.0 (* F F))))) (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 <= -105000000.0) {
tmp = (-1.0 / sin(B)) + ((1.0 / tan(B)) / (-1.0 / x));
} else if (F <= 50000.0) {
tmp = ((F * sqrt((1.0 / (2.0 + (F * F))))) / 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 <= (-105000000.0d0)) then
tmp = ((-1.0d0) / sin(b)) + ((1.0d0 / tan(b)) / ((-1.0d0) / x))
else if (f <= 50000.0d0) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (f * f))))) / 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 <= -105000000.0) {
tmp = (-1.0 / Math.sin(B)) + ((1.0 / Math.tan(B)) / (-1.0 / x));
} else if (F <= 50000.0) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (F * F))))) / 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 <= -105000000.0: tmp = (-1.0 / math.sin(B)) + ((1.0 / math.tan(B)) / (-1.0 / x)) elif F <= 50000.0: tmp = ((F * math.sqrt((1.0 / (2.0 + (F * F))))) / 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 <= -105000000.0) tmp = Float64(Float64(-1.0 / sin(B)) + Float64(Float64(1.0 / tan(B)) / Float64(-1.0 / x))); elseif (F <= 50000.0) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(F * F))))) / 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 <= -105000000.0) tmp = (-1.0 / sin(B)) + ((1.0 / tan(B)) / (-1.0 / x)); elseif (F <= 50000.0) tmp = ((F * sqrt((1.0 / (2.0 + (F * F))))) / 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, -105000000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / N[Tan[B], $MachinePrecision]), $MachinePrecision] / N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 50000.0], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -105000000:\\
\;\;\;\;\frac{-1}{\sin B} + \frac{\frac{1}{\tan B}}{\frac{-1}{x}}\\
\mathbf{elif}\;F \leq 50000:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + F \cdot F}}}{\sin B} - t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.05e8Initial program 57.9%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.6%
Simplified99.6%
associate-/l*N/A
clear-numN/A
tan-quotN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.7%
Applied egg-rr99.7%
associate-/r/N/A
div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f64N/A
/-lowering-/.f6499.8%
Applied egg-rr99.8%
if -1.05e8 < F < 5e4Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6499.6%
Simplified99.6%
if 5e4 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification99.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0
(-
(/ (* F (pow (+ (+ 2.0 (* 2.0 x)) (* F F)) -0.5)) (sin B))
(/ x B)))
(t_1 (/ x (tan B))))
(if (<= F -42000.0)
(- (/ -1.0 (sin B)) t_1)
(if (<= F -2.2e-93)
t_0
(if (<= F 1.55e-191)
(/ (* x (cos B)) (- 0.0 (sin B)))
(if (<= F 1800000.0) t_0 (- (/ 1.0 (sin B)) t_1)))))))
double code(double F, double B, double x) {
double t_0 = ((F * pow(((2.0 + (2.0 * x)) + (F * F)), -0.5)) / sin(B)) - (x / B);
double t_1 = x / tan(B);
double tmp;
if (F <= -42000.0) {
tmp = (-1.0 / sin(B)) - t_1;
} else if (F <= -2.2e-93) {
tmp = t_0;
} else if (F <= 1.55e-191) {
tmp = (x * cos(B)) / (0.0 - sin(B));
} else if (F <= 1800000.0) {
tmp = t_0;
} else {
tmp = (1.0 / sin(B)) - t_1;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((f * (((2.0d0 + (2.0d0 * x)) + (f * f)) ** (-0.5d0))) / sin(b)) - (x / b)
t_1 = x / tan(b)
if (f <= (-42000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - t_1
else if (f <= (-2.2d-93)) then
tmp = t_0
else if (f <= 1.55d-191) then
tmp = (x * cos(b)) / (0.0d0 - sin(b))
else if (f <= 1800000.0d0) then
tmp = t_0
else
tmp = (1.0d0 / sin(b)) - t_1
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = ((F * Math.pow(((2.0 + (2.0 * x)) + (F * F)), -0.5)) / Math.sin(B)) - (x / B);
double t_1 = x / Math.tan(B);
double tmp;
if (F <= -42000.0) {
tmp = (-1.0 / Math.sin(B)) - t_1;
} else if (F <= -2.2e-93) {
tmp = t_0;
} else if (F <= 1.55e-191) {
tmp = (x * Math.cos(B)) / (0.0 - Math.sin(B));
} else if (F <= 1800000.0) {
tmp = t_0;
} else {
tmp = (1.0 / Math.sin(B)) - t_1;
}
return tmp;
}
def code(F, B, x): t_0 = ((F * math.pow(((2.0 + (2.0 * x)) + (F * F)), -0.5)) / math.sin(B)) - (x / B) t_1 = x / math.tan(B) tmp = 0 if F <= -42000.0: tmp = (-1.0 / math.sin(B)) - t_1 elif F <= -2.2e-93: tmp = t_0 elif F <= 1.55e-191: tmp = (x * math.cos(B)) / (0.0 - math.sin(B)) elif F <= 1800000.0: tmp = t_0 else: tmp = (1.0 / math.sin(B)) - t_1 return tmp
function code(F, B, x) t_0 = Float64(Float64(Float64(F * (Float64(Float64(2.0 + Float64(2.0 * x)) + Float64(F * F)) ^ -0.5)) / sin(B)) - Float64(x / B)) t_1 = Float64(x / tan(B)) tmp = 0.0 if (F <= -42000.0) tmp = Float64(Float64(-1.0 / sin(B)) - t_1); elseif (F <= -2.2e-93) tmp = t_0; elseif (F <= 1.55e-191) tmp = Float64(Float64(x * cos(B)) / Float64(0.0 - sin(B))); elseif (F <= 1800000.0) tmp = t_0; else tmp = Float64(Float64(1.0 / sin(B)) - t_1); end return tmp end
function tmp_2 = code(F, B, x) t_0 = ((F * (((2.0 + (2.0 * x)) + (F * F)) ^ -0.5)) / sin(B)) - (x / B); t_1 = x / tan(B); tmp = 0.0; if (F <= -42000.0) tmp = (-1.0 / sin(B)) - t_1; elseif (F <= -2.2e-93) tmp = t_0; elseif (F <= 1.55e-191) tmp = (x * cos(B)) / (0.0 - sin(B)); elseif (F <= 1800000.0) tmp = t_0; else tmp = (1.0 / sin(B)) - t_1; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(N[(F * N[Power[N[(N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision] + N[(F * F), $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, -42000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[F, -2.2e-93], t$95$0, If[LessEqual[F, 1.55e-191], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1800000.0], t$95$0, N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{F \cdot {\left(\left(2 + 2 \cdot x\right) + F \cdot F\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
t_1 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -42000:\\
\;\;\;\;\frac{-1}{\sin B} - t\_1\\
\mathbf{elif}\;F \leq -2.2 \cdot 10^{-93}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;F \leq 1.55 \cdot 10^{-191}:\\
\;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\
\mathbf{elif}\;F \leq 1800000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_1\\
\end{array}
\end{array}
if F < -42000Initial program 59.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified71.3%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.2%
Simplified99.2%
if -42000 < F < -2.19999999999999996e-93 or 1.5500000000000001e-191 < F < 1.8e6Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
Taylor expanded in B around 0
/-lowering-/.f6482.1%
Simplified82.1%
if -2.19999999999999996e-93 < F < 1.5500000000000001e-191Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.8%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.6%
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6487.7%
Simplified87.7%
if 1.8e6 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification92.7%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))) (t_1 (+ 2.0 (* 2.0 x))))
(if (<= F -49000.0)
(- (/ (+ -1.0 (/ (* 0.5 t_1) (* F F))) (sin B)) t_0)
(if (<= F 1.48e-95)
(- (* (sqrt (/ 1.0 (+ 2.0 (+ (* 2.0 x) (* F F))))) (/ F B)) t_0)
(if (<= F 470000.0)
(- (/ (* F (pow (+ t_1 (* F F)) -0.5)) (sin B)) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double t_1 = 2.0 + (2.0 * x);
double tmp;
if (F <= -49000.0) {
tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / sin(B)) - t_0;
} else if (F <= 1.48e-95) {
tmp = (sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0;
} else if (F <= 470000.0) {
tmp = ((F * pow((t_1 + (F * F)), -0.5)) / sin(B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = x / tan(b)
t_1 = 2.0d0 + (2.0d0 * x)
if (f <= (-49000.0d0)) then
tmp = (((-1.0d0) + ((0.5d0 * t_1) / (f * f))) / sin(b)) - t_0
else if (f <= 1.48d-95) then
tmp = (sqrt((1.0d0 / (2.0d0 + ((2.0d0 * x) + (f * f))))) * (f / b)) - t_0
else if (f <= 470000.0d0) then
tmp = ((f * ((t_1 + (f * f)) ** (-0.5d0))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double t_1 = 2.0 + (2.0 * x);
double tmp;
if (F <= -49000.0) {
tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / Math.sin(B)) - t_0;
} else if (F <= 1.48e-95) {
tmp = (Math.sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0;
} else if (F <= 470000.0) {
tmp = ((F * Math.pow((t_1 + (F * F)), -0.5)) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) t_1 = 2.0 + (2.0 * x) tmp = 0 if F <= -49000.0: tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / math.sin(B)) - t_0 elif F <= 1.48e-95: tmp = (math.sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0 elif F <= 470000.0: tmp = ((F * math.pow((t_1 + (F * F)), -0.5)) / math.sin(B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) t_1 = Float64(2.0 + Float64(2.0 * x)) tmp = 0.0 if (F <= -49000.0) tmp = Float64(Float64(Float64(-1.0 + Float64(Float64(0.5 * t_1) / Float64(F * F))) / sin(B)) - t_0); elseif (F <= 1.48e-95) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(2.0 * x) + Float64(F * F))))) * Float64(F / B)) - t_0); elseif (F <= 470000.0) tmp = Float64(Float64(Float64(F * (Float64(t_1 + Float64(F * F)) ^ -0.5)) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); t_1 = 2.0 + (2.0 * x); tmp = 0.0; if (F <= -49000.0) tmp = ((-1.0 + ((0.5 * t_1) / (F * F))) / sin(B)) - t_0; elseif (F <= 1.48e-95) tmp = (sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0; elseif (F <= 470000.0) tmp = ((F * ((t_1 + (F * F)) ^ -0.5)) / sin(B)) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -49000.0], N[(N[(N[(-1.0 + N[(N[(0.5 * t$95$1), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 1.48e-95], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(2.0 * x), $MachinePrecision] + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 470000.0], N[(N[(N[(F * N[Power[N[(t$95$1 + N[(F * F), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
t_1 := 2 + 2 \cdot x\\
\mathbf{if}\;F \leq -49000:\\
\;\;\;\;\frac{-1 + \frac{0.5 \cdot t\_1}{F \cdot F}}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 1.48 \cdot 10^{-95}:\\
\;\;\;\;\sqrt{\frac{1}{2 + \left(2 \cdot x + F \cdot F\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{elif}\;F \leq 470000:\\
\;\;\;\;\frac{F \cdot {\left(t\_1 + F \cdot F\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -49000Initial program 58.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified70.8%
Taylor expanded in F around -inf
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6499.7%
Simplified99.7%
if -49000 < F < 1.47999999999999994e-95Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6490.2%
Simplified90.2%
if 1.47999999999999994e-95 < F < 4.7e5Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
Taylor expanded in B around 0
/-lowering-/.f6487.0%
Simplified87.0%
if 4.7e5 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification94.9%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -5.1e-5)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.7e-102)
(- (* (sqrt (/ 1.0 (+ 2.0 (+ (* 2.0 x) (* F F))))) (/ F B)) t_0)
(if (<= F 2450000.0)
(- (/ (* F (pow (+ (+ 2.0 (* 2.0 x)) (* F F)) -0.5)) (sin B)) (/ x B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -5.1e-5) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.7e-102) {
tmp = (sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0;
} else if (F <= 2450000.0) {
tmp = ((F * pow(((2.0 + (2.0 * x)) + (F * F)), -0.5)) / sin(B)) - (x / B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-5.1d-5)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.7d-102) then
tmp = (sqrt((1.0d0 / (2.0d0 + ((2.0d0 * x) + (f * f))))) * (f / b)) - t_0
else if (f <= 2450000.0d0) then
tmp = ((f * (((2.0d0 + (2.0d0 * x)) + (f * f)) ** (-0.5d0))) / sin(b)) - (x / b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -5.1e-5) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.7e-102) {
tmp = (Math.sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0;
} else if (F <= 2450000.0) {
tmp = ((F * Math.pow(((2.0 + (2.0 * x)) + (F * F)), -0.5)) / Math.sin(B)) - (x / B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -5.1e-5: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.7e-102: tmp = (math.sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0 elif F <= 2450000.0: tmp = ((F * math.pow(((2.0 + (2.0 * x)) + (F * F)), -0.5)) / math.sin(B)) - (x / B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -5.1e-5) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.7e-102) tmp = Float64(Float64(sqrt(Float64(1.0 / Float64(2.0 + Float64(Float64(2.0 * x) + Float64(F * F))))) * Float64(F / B)) - t_0); elseif (F <= 2450000.0) tmp = Float64(Float64(Float64(F * (Float64(Float64(2.0 + Float64(2.0 * x)) + Float64(F * F)) ^ -0.5)) / sin(B)) - Float64(x / B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -5.1e-5) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.7e-102) tmp = (sqrt((1.0 / (2.0 + ((2.0 * x) + (F * F))))) * (F / B)) - t_0; elseif (F <= 2450000.0) tmp = ((F * (((2.0 + (2.0 * x)) + (F * F)) ^ -0.5)) / sin(B)) - (x / B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -5.1e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.7e-102], N[(N[(N[Sqrt[N[(1.0 / N[(2.0 + N[(N[(2.0 * x), $MachinePrecision] + N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(F / B), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 2450000.0], N[(N[(N[(F * N[Power[N[(N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision] + N[(F * F), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -5.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.7 \cdot 10^{-102}:\\
\;\;\;\;\sqrt{\frac{1}{2 + \left(2 \cdot x + F \cdot F\right)}} \cdot \frac{F}{B} - t\_0\\
\mathbf{elif}\;F \leq 2450000:\\
\;\;\;\;\frac{F \cdot {\left(\left(2 + 2 \cdot x\right) + F \cdot F\right)}^{-0.5}}{\sin B} - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -5.09999999999999996e-5Initial program 60.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified72.2%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6496.5%
Simplified96.5%
if -5.09999999999999996e-5 < F < 4.7000000000000003e-102Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
Taylor expanded in B around 0
*-commutativeN/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6491.8%
Simplified91.8%
if 4.7000000000000003e-102 < F < 2.45e6Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.5%
Taylor expanded in B around 0
/-lowering-/.f6487.0%
Simplified87.0%
if 2.45e6 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification94.8%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.2e-17)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 5e-108)
(/ (* x (cos B)) (- 0.0 (sin B)))
(if (<= F 165000.0)
(/ (* F (pow (+ 2.0 (* F F)) -0.5)) (sin B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.2e-17) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 5e-108) {
tmp = (x * cos(B)) / (0.0 - sin(B));
} else if (F <= 165000.0) {
tmp = (F * pow((2.0 + (F * F)), -0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.2d-17)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 5d-108) then
tmp = (x * cos(b)) / (0.0d0 - sin(b))
else if (f <= 165000.0d0) then
tmp = (f * ((2.0d0 + (f * f)) ** (-0.5d0))) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.2e-17) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 5e-108) {
tmp = (x * Math.cos(B)) / (0.0 - Math.sin(B));
} else if (F <= 165000.0) {
tmp = (F * Math.pow((2.0 + (F * F)), -0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.2e-17: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 5e-108: tmp = (x * math.cos(B)) / (0.0 - math.sin(B)) elif F <= 165000.0: tmp = (F * math.pow((2.0 + (F * F)), -0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.2e-17) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 5e-108) tmp = Float64(Float64(x * cos(B)) / Float64(0.0 - sin(B))); elseif (F <= 165000.0) tmp = Float64(Float64(F * (Float64(2.0 + Float64(F * F)) ^ -0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.2e-17) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 5e-108) tmp = (x * cos(B)) / (0.0 - sin(B)); elseif (F <= 165000.0) tmp = (F * ((2.0 + (F * F)) ^ -0.5)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.2e-17], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 5e-108], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 165000.0], N[(N[(F * N[Power[N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 5 \cdot 10^{-108}:\\
\;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\
\mathbf{elif}\;F \leq 165000:\\
\;\;\;\;\frac{F \cdot {\left(2 + F \cdot F\right)}^{-0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.19999999999999993e-17Initial program 61.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified73.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.8%
Simplified93.8%
if -1.19999999999999993e-17 < F < 5e-108Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.6%
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6480.2%
Simplified80.2%
if 5e-108 < F < 165000Initial program 99.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6468.5%
Simplified68.5%
associate-*l/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
inv-powN/A
sqrt-pow1N/A
metadata-evalN/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sin-lowering-sin.f6468.6%
Applied egg-rr68.6%
if 165000 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification88.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -1.4e-18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 3.05e-108)
(/ (* x (cos B)) (- 0.0 (sin B)))
(if (<= F 55000.0)
(/ (/ F (sin B)) (sqrt (+ 2.0 (* F F))))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -1.4e-18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 3.05e-108) {
tmp = (x * cos(B)) / (0.0 - sin(B));
} else if (F <= 55000.0) {
tmp = (F / sin(B)) / sqrt((2.0 + (F * F)));
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-1.4d-18)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 3.05d-108) then
tmp = (x * cos(b)) / (0.0d0 - sin(b))
else if (f <= 55000.0d0) then
tmp = (f / sin(b)) / sqrt((2.0d0 + (f * f)))
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -1.4e-18) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 3.05e-108) {
tmp = (x * Math.cos(B)) / (0.0 - Math.sin(B));
} else if (F <= 55000.0) {
tmp = (F / Math.sin(B)) / Math.sqrt((2.0 + (F * F)));
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -1.4e-18: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 3.05e-108: tmp = (x * math.cos(B)) / (0.0 - math.sin(B)) elif F <= 55000.0: tmp = (F / math.sin(B)) / math.sqrt((2.0 + (F * F))) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -1.4e-18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 3.05e-108) tmp = Float64(Float64(x * cos(B)) / Float64(0.0 - sin(B))); elseif (F <= 55000.0) tmp = Float64(Float64(F / sin(B)) / sqrt(Float64(2.0 + Float64(F * F)))); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -1.4e-18) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 3.05e-108) tmp = (x * cos(B)) / (0.0 - sin(B)); elseif (F <= 55000.0) tmp = (F / sin(B)) / sqrt((2.0 + (F * F))); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -1.4e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 3.05e-108], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 55000.0], N[(N[(F / N[Sin[B], $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(2.0 + N[(F * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -1.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 3.05 \cdot 10^{-108}:\\
\;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\
\mathbf{elif}\;F \leq 55000:\\
\;\;\;\;\frac{\frac{F}{\sin B}}{\sqrt{2 + F \cdot F}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -1.40000000000000006e-18Initial program 61.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified73.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.8%
Simplified93.8%
if -1.40000000000000006e-18 < F < 3.05000000000000004e-108Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.6%
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6480.2%
Simplified80.2%
if 3.05000000000000004e-108 < F < 55000Initial program 99.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6468.5%
Simplified68.5%
sqrt-divN/A
metadata-evalN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6468.5%
Applied egg-rr68.5%
if 55000 < F Initial program 54.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified67.6%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6499.8%
Simplified99.8%
Final simplification88.1%
(FPCore (F B x)
:precision binary64
(let* ((t_0 (/ x (tan B))))
(if (<= F -4.4e-18)
(- (/ -1.0 (sin B)) t_0)
(if (<= F 4.5e-108)
(/ (* x (cos B)) (- 0.0 (sin B)))
(if (<= F 1.25e-27)
(/ (* F (sqrt 0.5)) (sin B))
(- (/ 1.0 (sin B)) t_0))))))
double code(double F, double B, double x) {
double t_0 = x / tan(B);
double tmp;
if (F <= -4.4e-18) {
tmp = (-1.0 / sin(B)) - t_0;
} else if (F <= 4.5e-108) {
tmp = (x * cos(B)) / (0.0 - sin(B));
} else if (F <= 1.25e-27) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = (1.0 / sin(B)) - t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = x / tan(b)
if (f <= (-4.4d-18)) then
tmp = ((-1.0d0) / sin(b)) - t_0
else if (f <= 4.5d-108) then
tmp = (x * cos(b)) / (0.0d0 - sin(b))
else if (f <= 1.25d-27) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = (1.0d0 / sin(b)) - t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = x / Math.tan(B);
double tmp;
if (F <= -4.4e-18) {
tmp = (-1.0 / Math.sin(B)) - t_0;
} else if (F <= 4.5e-108) {
tmp = (x * Math.cos(B)) / (0.0 - Math.sin(B));
} else if (F <= 1.25e-27) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = (1.0 / Math.sin(B)) - t_0;
}
return tmp;
}
def code(F, B, x): t_0 = x / math.tan(B) tmp = 0 if F <= -4.4e-18: tmp = (-1.0 / math.sin(B)) - t_0 elif F <= 4.5e-108: tmp = (x * math.cos(B)) / (0.0 - math.sin(B)) elif F <= 1.25e-27: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = (1.0 / math.sin(B)) - t_0 return tmp
function code(F, B, x) t_0 = Float64(x / tan(B)) tmp = 0.0 if (F <= -4.4e-18) tmp = Float64(Float64(-1.0 / sin(B)) - t_0); elseif (F <= 4.5e-108) tmp = Float64(Float64(x * cos(B)) / Float64(0.0 - sin(B))); elseif (F <= 1.25e-27) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(Float64(1.0 / sin(B)) - t_0); end return tmp end
function tmp_2 = code(F, B, x) t_0 = x / tan(B); tmp = 0.0; if (F <= -4.4e-18) tmp = (-1.0 / sin(B)) - t_0; elseif (F <= 4.5e-108) tmp = (x * cos(B)) / (0.0 - sin(B)); elseif (F <= 1.25e-27) tmp = (F * sqrt(0.5)) / sin(B); else tmp = (1.0 / sin(B)) - t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[F, -4.4e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[F, 4.5e-108], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.25e-27], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\tan B}\\
\mathbf{if}\;F \leq -4.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - t\_0\\
\mathbf{elif}\;F \leq 4.5 \cdot 10^{-108}:\\
\;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\
\mathbf{elif}\;F \leq 1.25 \cdot 10^{-27}:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B} - t\_0\\
\end{array}
\end{array}
if F < -4.3999999999999997e-18Initial program 61.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified73.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.8%
Simplified93.8%
if -4.3999999999999997e-18 < F < 4.4999999999999997e-108Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.6%
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6480.2%
Simplified80.2%
if 4.4999999999999997e-108 < F < 1.25e-27Initial program 99.2%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6472.1%
Simplified72.1%
Taylor expanded in F around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sin-lowering-sin.f6472.4%
Simplified72.4%
if 1.25e-27 < F Initial program 58.6%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified70.3%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6495.0%
Simplified95.0%
Final simplification87.7%
(FPCore (F B x)
:precision binary64
(if (<= F -1.65e-18)
(- (/ -1.0 (sin B)) (/ x (tan B)))
(if (<= F 4e-109)
(/ (* x (cos B)) (- 0.0 (sin B)))
(if (<= F 1.42) (/ (* F (sqrt 0.5)) (sin B)) (/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-18) {
tmp = (-1.0 / sin(B)) - (x / tan(B));
} else if (F <= 4e-109) {
tmp = (x * cos(B)) / (0.0 - sin(B));
} else if (F <= 1.42) {
tmp = (F * sqrt(0.5)) / sin(B);
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.65d-18)) then
tmp = ((-1.0d0) / sin(b)) - (x / tan(b))
else if (f <= 4d-109) then
tmp = (x * cos(b)) / (0.0d0 - sin(b))
else if (f <= 1.42d0) then
tmp = (f * sqrt(0.5d0)) / sin(b)
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.65e-18) {
tmp = (-1.0 / Math.sin(B)) - (x / Math.tan(B));
} else if (F <= 4e-109) {
tmp = (x * Math.cos(B)) / (0.0 - Math.sin(B));
} else if (F <= 1.42) {
tmp = (F * Math.sqrt(0.5)) / Math.sin(B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.65e-18: tmp = (-1.0 / math.sin(B)) - (x / math.tan(B)) elif F <= 4e-109: tmp = (x * math.cos(B)) / (0.0 - math.sin(B)) elif F <= 1.42: tmp = (F * math.sqrt(0.5)) / math.sin(B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.65e-18) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / tan(B))); elseif (F <= 4e-109) tmp = Float64(Float64(x * cos(B)) / Float64(0.0 - sin(B))); elseif (F <= 1.42) tmp = Float64(Float64(F * sqrt(0.5)) / sin(B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.65e-18) tmp = (-1.0 / sin(B)) - (x / tan(B)); elseif (F <= 4e-109) tmp = (x * cos(B)) / (0.0 - sin(B)); elseif (F <= 1.42) tmp = (F * sqrt(0.5)) / sin(B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.65e-18], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 4e-109], N[(N[(x * N[Cos[B], $MachinePrecision]), $MachinePrecision] / N[(0.0 - N[Sin[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.42], N[(N[(F * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] / N[Sin[B], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.65 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 4 \cdot 10^{-109}:\\
\;\;\;\;\frac{x \cdot \cos B}{0 - \sin B}\\
\mathbf{elif}\;F \leq 1.42:\\
\;\;\;\;\frac{F \cdot \sqrt{0.5}}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -1.6500000000000001e-18Initial program 61.8%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified73.0%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6493.8%
Simplified93.8%
if -1.6500000000000001e-18 < F < 4e-109Initial program 99.4%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6499.6%
Applied egg-rr99.6%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
neg-lowering-neg.f64N/A
sin-lowering-sin.f6480.2%
Simplified80.2%
if 4e-109 < F < 1.4199999999999999Initial program 99.3%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6467.1%
Simplified67.1%
Taylor expanded in F around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
sin-lowering-sin.f6462.2%
Simplified62.2%
if 1.4199999999999999 < F Initial program 55.4%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6423.3%
Simplified23.3%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6459.6%
Simplified59.6%
Final simplification75.9%
(FPCore (F B x)
:precision binary64
(if (<= F -50000.0)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 1.7e-283)
(- (/ -1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) (/ x (tan B)))
(if (<= F 8.2e-10)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* 2.0 x))))) x) B)
(/ 1.0 (sin B))))))
double code(double F, double B, double x) {
double tmp;
if (F <= -50000.0) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 1.7e-283) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B));
} else if (F <= 8.2e-10) {
tmp = ((F * sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-50000.0d0)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 1.7d-283) then
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - (x / tan(b))
else if (f <= 8.2d-10) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (2.0d0 * x))))) - x) / b
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -50000.0) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 1.7e-283) {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / Math.tan(B));
} else if (F <= 8.2e-10) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -50000.0: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 1.7e-283: tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / math.tan(B)) elif F <= 8.2e-10: tmp = ((F * math.sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -50000.0) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 1.7e-283) tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - Float64(x / tan(B))); elseif (F <= 8.2e-10) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x))))) - x) / B); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -50000.0) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 1.7e-283) tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B)); elseif (F <= 8.2e-10) tmp = ((F * sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -50000.0], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 1.7e-283], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-10], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -50000:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 1.7 \cdot 10^{-283}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - \frac{x}{\tan B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5e4Initial program 58.6%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6499.1%
Simplified99.1%
Taylor expanded in B around 0
/-lowering-/.f6475.7%
Simplified75.7%
if -5e4 < F < 1.6999999999999999e-283Initial program 99.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified99.7%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6442.3%
Simplified42.3%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6464.2%
Simplified64.2%
if 1.6999999999999999e-283 < F < 8.1999999999999996e-10Initial 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-*.f6460.6%
Simplified60.6%
Taylor expanded in F around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6460.6%
Simplified60.6%
if 8.1999999999999996e-10 < F Initial program 57.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6426.2%
Simplified26.2%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6457.9%
Simplified57.9%
(FPCore (F B x)
:precision binary64
(if (<= B 0.002)
(/ (- (/ F (sqrt (+ (+ 2.0 (* 2.0 x)) (* F F)))) x) B)
(-
(/
-1.0
(*
B
(+
1.0
(* (* B B) (+ (* (* B B) 0.008333333333333333) -0.16666666666666666)))))
(/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.002) {
tmp = ((F / sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B;
} else {
tmp = (-1.0 / (B * (1.0 + ((B * B) * (((B * B) * 0.008333333333333333) + -0.16666666666666666))))) - (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 (b <= 0.002d0) then
tmp = ((f / sqrt(((2.0d0 + (2.0d0 * x)) + (f * f)))) - x) / b
else
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (((b * b) * 0.008333333333333333d0) + (-0.16666666666666666d0)))))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 0.002) {
tmp = ((F / Math.sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B;
} else {
tmp = (-1.0 / (B * (1.0 + ((B * B) * (((B * B) * 0.008333333333333333) + -0.16666666666666666))))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 0.002: tmp = ((F / math.sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B else: tmp = (-1.0 / (B * (1.0 + ((B * B) * (((B * B) * 0.008333333333333333) + -0.16666666666666666))))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 0.002) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(2.0 + Float64(2.0 * x)) + Float64(F * F)))) - x) / B); else tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * Float64(Float64(Float64(B * B) * 0.008333333333333333) + -0.16666666666666666))))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 0.002) tmp = ((F / sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B; else tmp = (-1.0 / (B * (1.0 + ((B * B) * (((B * B) * 0.008333333333333333) + -0.16666666666666666))))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 0.002], N[(N[(N[(F / N[Sqrt[N[(N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision] + N[(F * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * N[(N[(N[(B * B), $MachinePrecision] * 0.008333333333333333), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.002:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\left(2 + 2 \cdot x\right) + F \cdot F}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot \left(\left(B \cdot B\right) \cdot 0.008333333333333333 + -0.16666666666666666\right)\right)} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 2e-3Initial program 73.8%
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-*.f6456.3%
Simplified56.3%
/-lowering-/.f64N/A
Applied egg-rr56.4%
if 2e-3 < B Initial program 86.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified86.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6448.8%
Simplified48.8%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.3%
Simplified55.3%
Final simplification56.1%
(FPCore (F B x)
:precision binary64
(if (<= F -5.1e-5)
(- (/ -1.0 (sin B)) (/ x B))
(if (<= F 8.2e-10)
(/ (- (* F (sqrt (/ 1.0 (+ 2.0 (* 2.0 x))))) x) B)
(/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -5.1e-5) {
tmp = (-1.0 / sin(B)) - (x / B);
} else if (F <= 8.2e-10) {
tmp = ((F * sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B;
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-5.1d-5)) then
tmp = ((-1.0d0) / sin(b)) - (x / b)
else if (f <= 8.2d-10) then
tmp = ((f * sqrt((1.0d0 / (2.0d0 + (2.0d0 * x))))) - x) / b
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -5.1e-5) {
tmp = (-1.0 / Math.sin(B)) - (x / B);
} else if (F <= 8.2e-10) {
tmp = ((F * Math.sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B;
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -5.1e-5: tmp = (-1.0 / math.sin(B)) - (x / B) elif F <= 8.2e-10: tmp = ((F * math.sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -5.1e-5) tmp = Float64(Float64(-1.0 / sin(B)) - Float64(x / B)); elseif (F <= 8.2e-10) tmp = Float64(Float64(Float64(F * sqrt(Float64(1.0 / Float64(2.0 + Float64(2.0 * x))))) - x) / B); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -5.1e-5) tmp = (-1.0 / sin(B)) - (x / B); elseif (F <= 8.2e-10) tmp = ((F * sqrt((1.0 / (2.0 + (2.0 * x))))) - x) / B; else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -5.1e-5], N[(N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision] - N[(x / B), $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-10], N[(N[(N[(F * N[Sqrt[N[(1.0 / N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -5.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{-1}{\sin B} - \frac{x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-10}:\\
\;\;\;\;\frac{F \cdot \sqrt{\frac{1}{2 + 2 \cdot x}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -5.09999999999999996e-5Initial program 60.6%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6496.4%
Simplified96.4%
Taylor expanded in B around 0
/-lowering-/.f6472.5%
Simplified72.5%
if -5.09999999999999996e-5 < F < 8.1999999999999996e-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-*.f6457.7%
Simplified57.7%
Taylor expanded in F around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6457.6%
Simplified57.6%
if 8.1999999999999996e-10 < F Initial program 57.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6426.2%
Simplified26.2%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6457.9%
Simplified57.9%
(FPCore (F B x) :precision binary64 (if (<= B 0.0049) (/ (- (/ F (sqrt (+ (+ 2.0 (* 2.0 x)) (* F F)))) x) B) (- (/ -1.0 (* B (+ 1.0 (* (* B B) -0.16666666666666666)))) (/ x (tan B)))))
double code(double F, double B, double x) {
double tmp;
if (B <= 0.0049) {
tmp = ((F / sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B;
} else {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (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 (b <= 0.0049d0) then
tmp = ((f / sqrt(((2.0d0 + (2.0d0 * x)) + (f * f)))) - x) / b
else
tmp = ((-1.0d0) / (b * (1.0d0 + ((b * b) * (-0.16666666666666666d0))))) - (x / tan(b))
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (B <= 0.0049) {
tmp = ((F / Math.sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B;
} else {
tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / Math.tan(B));
}
return tmp;
}
def code(F, B, x): tmp = 0 if B <= 0.0049: tmp = ((F / math.sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B else: tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / math.tan(B)) return tmp
function code(F, B, x) tmp = 0.0 if (B <= 0.0049) tmp = Float64(Float64(Float64(F / sqrt(Float64(Float64(2.0 + Float64(2.0 * x)) + Float64(F * F)))) - x) / B); else tmp = Float64(Float64(-1.0 / Float64(B * Float64(1.0 + Float64(Float64(B * B) * -0.16666666666666666)))) - Float64(x / tan(B))); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (B <= 0.0049) tmp = ((F / sqrt(((2.0 + (2.0 * x)) + (F * F)))) - x) / B; else tmp = (-1.0 / (B * (1.0 + ((B * B) * -0.16666666666666666)))) - (x / tan(B)); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[B, 0.0049], N[(N[(N[(F / N[Sqrt[N[(N[(2.0 + N[(2.0 * x), $MachinePrecision]), $MachinePrecision] + N[(F * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / B), $MachinePrecision], N[(N[(-1.0 / N[(B * N[(1.0 + N[(N[(B * B), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;B \leq 0.0049:\\
\;\;\;\;\frac{\frac{F}{\sqrt{\left(2 + 2 \cdot x\right) + F \cdot F}} - x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{B \cdot \left(1 + \left(B \cdot B\right) \cdot -0.16666666666666666\right)} - \frac{x}{\tan B}\\
\end{array}
\end{array}
if B < 0.0048999999999999998Initial program 73.8%
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-*.f6456.3%
Simplified56.3%
/-lowering-/.f64N/A
Applied egg-rr56.4%
if 0.0048999999999999998 < B Initial program 86.3%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified86.4%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6448.8%
Simplified48.8%
Taylor expanded in B around 0
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6455.3%
Simplified55.3%
Final simplification56.1%
(FPCore (F B x) :precision binary64 (let* ((t_0 (- (/ -1.0 B) (/ x (tan B))))) (if (<= x -1.8e-97) t_0 (if (<= x 1.26e-78) (/ 1.0 (sin B)) t_0))))
double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / tan(B));
double tmp;
if (x <= -1.8e-97) {
tmp = t_0;
} else if (x <= 1.26e-78) {
tmp = 1.0 / sin(B);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = ((-1.0d0) / b) - (x / tan(b))
if (x <= (-1.8d-97)) then
tmp = t_0
else if (x <= 1.26d-78) then
tmp = 1.0d0 / sin(b)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double t_0 = (-1.0 / B) - (x / Math.tan(B));
double tmp;
if (x <= -1.8e-97) {
tmp = t_0;
} else if (x <= 1.26e-78) {
tmp = 1.0 / Math.sin(B);
} else {
tmp = t_0;
}
return tmp;
}
def code(F, B, x): t_0 = (-1.0 / B) - (x / math.tan(B)) tmp = 0 if x <= -1.8e-97: tmp = t_0 elif x <= 1.26e-78: tmp = 1.0 / math.sin(B) else: tmp = t_0 return tmp
function code(F, B, x) t_0 = Float64(Float64(-1.0 / B) - Float64(x / tan(B))) tmp = 0.0 if (x <= -1.8e-97) tmp = t_0; elseif (x <= 1.26e-78) tmp = Float64(1.0 / sin(B)); else tmp = t_0; end return tmp end
function tmp_2 = code(F, B, x) t_0 = (-1.0 / B) - (x / tan(B)); tmp = 0.0; if (x <= -1.8e-97) tmp = t_0; elseif (x <= 1.26e-78) tmp = 1.0 / sin(B); else tmp = t_0; end tmp_2 = tmp; end
code[F_, B_, x_] := Block[{t$95$0 = N[(N[(-1.0 / B), $MachinePrecision] - N[(x / N[Tan[B], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.8e-97], t$95$0, If[LessEqual[x, 1.26e-78], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{B} - \frac{x}{\tan B}\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{-97}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.26 \cdot 10^{-78}:\\
\;\;\;\;\frac{1}{\sin B}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -1.79999999999999999e-97 or 1.26000000000000008e-78 < x Initial program 85.2%
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
Simplified92.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6475.9%
Simplified75.9%
Taylor expanded in B around 0
/-lowering-/.f6478.4%
Simplified78.4%
if -1.79999999999999999e-97 < x < 1.26000000000000008e-78Initial program 66.6%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6453.1%
Simplified53.1%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6434.9%
Simplified34.9%
(FPCore (F B x) :precision binary64 (if (<= F -6.5e-16) (/ -1.0 (sin B)) (if (<= F 8.2e-10) (- 0.0 (/ x B)) (/ 1.0 (sin B)))))
double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-16) {
tmp = -1.0 / sin(B);
} else if (F <= 8.2e-10) {
tmp = 0.0 - (x / B);
} else {
tmp = 1.0 / sin(B);
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-6.5d-16)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 8.2d-10) then
tmp = 0.0d0 - (x / b)
else
tmp = 1.0d0 / sin(b)
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -6.5e-16) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 8.2e-10) {
tmp = 0.0 - (x / B);
} else {
tmp = 1.0 / Math.sin(B);
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -6.5e-16: tmp = -1.0 / math.sin(B) elif F <= 8.2e-10: tmp = 0.0 - (x / B) else: tmp = 1.0 / math.sin(B) return tmp
function code(F, B, x) tmp = 0.0 if (F <= -6.5e-16) tmp = Float64(-1.0 / sin(B)); elseif (F <= 8.2e-10) tmp = Float64(0.0 - Float64(x / B)); else tmp = Float64(1.0 / sin(B)); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -6.5e-16) tmp = -1.0 / sin(B); elseif (F <= 8.2e-10) tmp = 0.0 - (x / B); else tmp = 1.0 / sin(B); end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -6.5e-16], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 8.2e-10], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -6.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-10}:\\
\;\;\;\;0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sin B}\\
\end{array}
\end{array}
if F < -6.50000000000000011e-16Initial program 61.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6433.9%
Simplified33.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6455.5%
Simplified55.5%
if -6.50000000000000011e-16 < F < 8.1999999999999996e-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-*.f6456.9%
Simplified56.9%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6442.3%
Simplified42.3%
if 8.1999999999999996e-10 < F Initial program 57.1%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6426.2%
Simplified26.2%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6457.9%
Simplified57.9%
Final simplification50.3%
(FPCore (F B x) :precision binary64 (if (<= F -1.02e-17) (/ -1.0 (sin B)) (if (<= F 2.4e-12) (- 0.0 (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.02e-17) {
tmp = -1.0 / sin(B);
} else if (F <= 2.4e-12) {
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.02d-17)) then
tmp = (-1.0d0) / sin(b)
else if (f <= 2.4d-12) 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.02e-17) {
tmp = -1.0 / Math.sin(B);
} else if (F <= 2.4e-12) {
tmp = 0.0 - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.02e-17: tmp = -1.0 / math.sin(B) elif F <= 2.4e-12: tmp = 0.0 - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.02e-17) tmp = Float64(-1.0 / sin(B)); elseif (F <= 2.4e-12) tmp = Float64(0.0 - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.02e-17) tmp = -1.0 / sin(B); elseif (F <= 2.4e-12) tmp = 0.0 - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.02e-17], N[(-1.0 / N[Sin[B], $MachinePrecision]), $MachinePrecision], If[LessEqual[F, 2.4e-12], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.02 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1}{\sin B}\\
\mathbf{elif}\;F \leq 2.4 \cdot 10^{-12}:\\
\;\;\;\;0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.01999999999999997e-17Initial program 61.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6433.9%
Simplified33.9%
Taylor expanded in F around -inf
/-lowering-/.f64N/A
sin-lowering-sin.f6455.5%
Simplified55.5%
if -1.01999999999999997e-17 < F < 2.39999999999999987e-12Initial 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-*.f6456.9%
Simplified56.9%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6442.3%
Simplified42.3%
if 2.39999999999999987e-12 < F Initial program 57.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-*.f6428.8%
Simplified28.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6443.9%
Simplified43.9%
Final simplification46.1%
(FPCore (F B x)
:precision binary64
(if (<= F -1.7e-18)
(/
(+
(* B (* B (+ -0.16666666666666666 (* x 0.3333333333333333))))
(- -1.0 x))
B)
(if (<= F 1.36e-14) (- 0.0 (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.7e-18) {
tmp = ((B * (B * (-0.16666666666666666 + (x * 0.3333333333333333)))) + (-1.0 - x)) / B;
} else if (F <= 1.36e-14) {
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.7d-18)) then
tmp = ((b * (b * ((-0.16666666666666666d0) + (x * 0.3333333333333333d0)))) + ((-1.0d0) - x)) / b
else if (f <= 1.36d-14) 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.7e-18) {
tmp = ((B * (B * (-0.16666666666666666 + (x * 0.3333333333333333)))) + (-1.0 - x)) / B;
} else if (F <= 1.36e-14) {
tmp = 0.0 - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.7e-18: tmp = ((B * (B * (-0.16666666666666666 + (x * 0.3333333333333333)))) + (-1.0 - x)) / B elif F <= 1.36e-14: tmp = 0.0 - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.7e-18) tmp = Float64(Float64(Float64(B * Float64(B * Float64(-0.16666666666666666 + Float64(x * 0.3333333333333333)))) + Float64(-1.0 - x)) / B); elseif (F <= 1.36e-14) tmp = Float64(0.0 - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.7e-18) tmp = ((B * (B * (-0.16666666666666666 + (x * 0.3333333333333333)))) + (-1.0 - x)) / B; elseif (F <= 1.36e-14) tmp = 0.0 - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.7e-18], N[(N[(N[(B * N[(B * N[(-0.16666666666666666 + N[(x * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-1.0 - x), $MachinePrecision]), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 1.36e-14], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.7 \cdot 10^{-18}:\\
\;\;\;\;\frac{B \cdot \left(B \cdot \left(-0.16666666666666666 + x \cdot 0.3333333333333333\right)\right) + \left(-1 - x\right)}{B}\\
\mathbf{elif}\;F \leq 1.36 \cdot 10^{-14}:\\
\;\;\;\;0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -1.70000000000000001e-18Initial program 61.8%
Taylor expanded in F around -inf
distribute-lft-inN/A
mul-1-negN/A
unsub-negN/A
neg-mul-1N/A
--lowering--.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
sin-lowering-sin.f6493.7%
Simplified93.7%
associate-/l*N/A
clear-numN/A
tan-quotN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
tan-lowering-tan.f6493.8%
Applied egg-rr93.8%
Taylor expanded in B around 0
/-lowering-/.f64N/A
--lowering--.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6443.0%
Simplified43.0%
if -1.70000000000000001e-18 < F < 1.36e-14Initial 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-*.f6456.9%
Simplified56.9%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6442.3%
Simplified42.3%
if 1.36e-14 < F Initial program 57.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-*.f6428.8%
Simplified28.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6443.9%
Simplified43.9%
Final simplification43.0%
(FPCore (F B x) :precision binary64 (if (<= F -2.15e-19) (/ (- -1.0 x) B) (if (<= F 8.2e-15) (- 0.0 (/ x B)) (/ (- 1.0 x) B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -2.15e-19) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-15) {
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 <= (-2.15d-19)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 8.2d-15) 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 <= -2.15e-19) {
tmp = (-1.0 - x) / B;
} else if (F <= 8.2e-15) {
tmp = 0.0 - (x / B);
} else {
tmp = (1.0 - x) / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -2.15e-19: tmp = (-1.0 - x) / B elif F <= 8.2e-15: tmp = 0.0 - (x / B) else: tmp = (1.0 - x) / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -2.15e-19) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 8.2e-15) tmp = Float64(0.0 - Float64(x / B)); else tmp = Float64(Float64(1.0 - x) / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -2.15e-19) tmp = (-1.0 - x) / B; elseif (F <= 8.2e-15) tmp = 0.0 - (x / B); else tmp = (1.0 - x) / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -2.15e-19], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 8.2e-15], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -2.15 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 8.2 \cdot 10^{-15}:\\
\;\;\;\;0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - x}{B}\\
\end{array}
\end{array}
if F < -2.15e-19Initial program 61.8%
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-*.f6432.7%
Simplified32.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--.f6443.0%
Simplified43.0%
if -2.15e-19 < F < 8.20000000000000072e-15Initial 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-*.f6456.9%
Simplified56.9%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6442.3%
Simplified42.3%
if 8.20000000000000072e-15 < F Initial program 57.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-*.f6428.8%
Simplified28.8%
Taylor expanded in F around inf
/-lowering-/.f64N/A
--lowering--.f6443.9%
Simplified43.9%
Final simplification42.9%
(FPCore (F B x) :precision binary64 (if (<= F -1.1e-17) (/ (- -1.0 x) B) (if (<= F 4.4e+21) (- 0.0 (/ x B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.4e+21) {
tmp = 0.0 - (x / B);
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.1d-17)) then
tmp = ((-1.0d0) - x) / b
else if (f <= 4.4d+21) then
tmp = 0.0d0 - (x / b)
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.1e-17) {
tmp = (-1.0 - x) / B;
} else if (F <= 4.4e+21) {
tmp = 0.0 - (x / B);
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.1e-17: tmp = (-1.0 - x) / B elif F <= 4.4e+21: tmp = 0.0 - (x / B) else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.1e-17) tmp = Float64(Float64(-1.0 - x) / B); elseif (F <= 4.4e+21) tmp = Float64(0.0 - Float64(x / B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.1e-17) tmp = (-1.0 - x) / B; elseif (F <= 4.4e+21) tmp = 0.0 - (x / B); else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.1e-17], N[(N[(-1.0 - x), $MachinePrecision] / B), $MachinePrecision], If[LessEqual[F, 4.4e+21], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{-1 - x}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{+21}:\\
\;\;\;\;0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -1.1e-17Initial program 61.8%
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-*.f6432.7%
Simplified32.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--.f6443.0%
Simplified43.0%
if -1.1e-17 < F < 4.4e21Initial 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.1%
Simplified55.1%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6441.1%
Simplified41.1%
if 4.4e21 < F Initial program 53.5%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6421.5%
Simplified21.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6459.8%
Simplified59.8%
Taylor expanded in B around 0
/-lowering-/.f6431.1%
Simplified31.1%
Final simplification38.8%
(FPCore (F B x) :precision binary64 (if (<= F -1.9e+118) (/ -1.0 B) (if (<= F 4.4e+21) (- 0.0 (/ x B)) (/ 1.0 B))))
double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e+118) {
tmp = -1.0 / B;
} else if (F <= 4.4e+21) {
tmp = 0.0 - (x / B);
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= (-1.9d+118)) then
tmp = (-1.0d0) / b
else if (f <= 4.4d+21) then
tmp = 0.0d0 - (x / b)
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= -1.9e+118) {
tmp = -1.0 / B;
} else if (F <= 4.4e+21) {
tmp = 0.0 - (x / B);
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= -1.9e+118: tmp = -1.0 / B elif F <= 4.4e+21: tmp = 0.0 - (x / B) else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= -1.9e+118) tmp = Float64(-1.0 / B); elseif (F <= 4.4e+21) tmp = Float64(0.0 - Float64(x / B)); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= -1.9e+118) tmp = -1.0 / B; elseif (F <= 4.4e+21) tmp = 0.0 - (x / B); else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, -1.9e+118], N[(-1.0 / B), $MachinePrecision], If[LessEqual[F, 4.4e+21], N[(0.0 - N[(x / B), $MachinePrecision]), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.9 \cdot 10^{+118}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{elif}\;F \leq 4.4 \cdot 10^{+21}:\\
\;\;\;\;0 - \frac{x}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < -1.90000000000000008e118Initial program 40.9%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6413.1%
Simplified13.1%
Taylor expanded in B around 0
Simplified7.8%
Taylor expanded in F around -inf
/-lowering-/.f6435.8%
Simplified35.8%
if -1.90000000000000008e118 < F < 4.4e21Initial program 97.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-*.f6453.8%
Simplified53.8%
Taylor expanded in F around 0
mul-1-negN/A
distribute-neg-frac2N/A
/-lowering-/.f64N/A
neg-lowering-neg.f6438.5%
Simplified38.5%
if 4.4e21 < F Initial program 53.5%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6421.5%
Simplified21.5%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6459.8%
Simplified59.8%
Taylor expanded in B around 0
/-lowering-/.f6431.1%
Simplified31.1%
Final simplification36.1%
(FPCore (F B x) :precision binary64 (if (<= F 6.8e-127) (/ -1.0 B) (/ 1.0 B)))
double code(double F, double B, double x) {
double tmp;
if (F <= 6.8e-127) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
real(8) function code(f, b, x)
real(8), intent (in) :: f
real(8), intent (in) :: b
real(8), intent (in) :: x
real(8) :: tmp
if (f <= 6.8d-127) then
tmp = (-1.0d0) / b
else
tmp = 1.0d0 / b
end if
code = tmp
end function
public static double code(double F, double B, double x) {
double tmp;
if (F <= 6.8e-127) {
tmp = -1.0 / B;
} else {
tmp = 1.0 / B;
}
return tmp;
}
def code(F, B, x): tmp = 0 if F <= 6.8e-127: tmp = -1.0 / B else: tmp = 1.0 / B return tmp
function code(F, B, x) tmp = 0.0 if (F <= 6.8e-127) tmp = Float64(-1.0 / B); else tmp = Float64(1.0 / B); end return tmp end
function tmp_2 = code(F, B, x) tmp = 0.0; if (F <= 6.8e-127) tmp = -1.0 / B; else tmp = 1.0 / B; end tmp_2 = tmp; end
code[F_, B_, x_] := If[LessEqual[F, 6.8e-127], N[(-1.0 / B), $MachinePrecision], N[(1.0 / B), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;F \leq 6.8 \cdot 10^{-127}:\\
\;\;\;\;\frac{-1}{B}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{B}\\
\end{array}
\end{array}
if F < 6.7999999999999997e-127Initial program 83.8%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6426.0%
Simplified26.0%
Taylor expanded in B around 0
Simplified13.1%
Taylor expanded in F around -inf
/-lowering-/.f6414.6%
Simplified14.6%
if 6.7999999999999997e-127 < F Initial program 67.0%
Taylor expanded in x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6434.0%
Simplified34.0%
Taylor expanded in F around inf
/-lowering-/.f64N/A
sin-lowering-sin.f6445.5%
Simplified45.5%
Taylor expanded in B around 0
/-lowering-/.f6423.1%
Simplified23.1%
(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 x around 0
*-lowering-*.f64N/A
/-lowering-/.f64N/A
sin-lowering-sin.f64N/A
sqrt-lowering-sqrt.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6429.2%
Simplified29.2%
Taylor expanded in B around 0
Simplified13.6%
Taylor expanded in F around -inf
/-lowering-/.f6410.0%
Simplified10.0%
herbie shell --seed 2024161
(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))))))