
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
(FPCore (x y) :precision binary64 (- (+ 1.0 (/ -1.0 (* x 9.0))) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((-1.0d0) / (x * 9.0d0))) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.9e+25)
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))
(if (<= y 2.6e+73)
(- 1.0 (/ 0.1111111111111111 x))
(+ 1.0 (* (* y -0.3333333333333333) (pow x -0.5))))))
double code(double x, double y) {
double tmp;
if (y <= -1.9e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else if (y <= 2.6e+73) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + ((y * -0.3333333333333333) * pow(x, -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.9d+25)) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else if (y <= 2.6d+73) then
tmp = 1.0d0 - (0.1111111111111111d0 / x)
else
tmp = 1.0d0 + ((y * (-0.3333333333333333d0)) * (x ** (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.9e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else if (y <= 2.6e+73) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + ((y * -0.3333333333333333) * Math.pow(x, -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.9e+25: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) elif y <= 2.6e+73: tmp = 1.0 - (0.1111111111111111 / x) else: tmp = 1.0 + ((y * -0.3333333333333333) * math.pow(x, -0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.9e+25) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); elseif (y <= 2.6e+73) tmp = Float64(1.0 - Float64(0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(Float64(y * -0.3333333333333333) * (x ^ -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.9e+25) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); elseif (y <= 2.6e+73) tmp = 1.0 - (0.1111111111111111 / x); else tmp = 1.0 + ((y * -0.3333333333333333) * (x ^ -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.9e+25], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+73], N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * -0.3333333333333333), $MachinePrecision] * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+25}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+73}:\\
\;\;\;\;1 - \frac{0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \left(y \cdot -0.3333333333333333\right) \cdot {x}^{-0.5}\\
\end{array}
\end{array}
if y < -1.9e25Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 88.4%
*-commutative88.4%
associate-*l*88.5%
*-commutative88.5%
Simplified88.5%
sqrt-div88.5%
metadata-eval88.5%
associate-/r/88.4%
frac-2neg88.4%
associate-/r*88.5%
div-inv88.4%
metadata-eval88.4%
metadata-eval88.4%
metadata-eval88.4%
distribute-rgt-neg-in88.4%
sqrt-prod88.6%
distribute-neg-frac288.6%
frac-2neg88.6%
distribute-neg-frac88.6%
clear-num88.6%
distribute-neg-frac288.6%
sqrt-prod88.4%
distribute-rgt-neg-in88.4%
metadata-eval88.4%
metadata-eval88.4%
Applied egg-rr88.4%
div-inv88.4%
*-commutative88.4%
*-commutative88.4%
associate-/r*88.6%
metadata-eval88.6%
Applied egg-rr88.6%
if -1.9e25 < y < 2.6000000000000001e73Initial program 99.8%
sub-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
if 2.6000000000000001e73 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.4%
fma-neg99.4%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 98.1%
*-commutative98.1%
associate-*l*98.1%
*-commutative98.1%
Simplified98.1%
*-un-lft-identity98.1%
inv-pow98.1%
sqrt-pow198.2%
metadata-eval98.2%
Applied egg-rr98.2%
*-lft-identity98.2%
Simplified98.2%
Final simplification95.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.9e+25)
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))
(if (<= y 1.55e+72)
(- 1.0 (/ 0.1111111111111111 x))
(+ 1.0 (/ (pow x -0.5) (/ -3.0 y))))))
double code(double x, double y) {
double tmp;
if (y <= -1.9e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else if (y <= 1.55e+72) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + (pow(x, -0.5) / (-3.0 / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.9d+25)) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else if (y <= 1.55d+72) then
tmp = 1.0d0 - (0.1111111111111111d0 / x)
else
tmp = 1.0d0 + ((x ** (-0.5d0)) / ((-3.0d0) / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.9e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else if (y <= 1.55e+72) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + (Math.pow(x, -0.5) / (-3.0 / y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.9e+25: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) elif y <= 1.55e+72: tmp = 1.0 - (0.1111111111111111 / x) else: tmp = 1.0 + (math.pow(x, -0.5) / (-3.0 / y)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.9e+25) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); elseif (y <= 1.55e+72) tmp = Float64(1.0 - Float64(0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64((x ^ -0.5) / Float64(-3.0 / y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.9e+25) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); elseif (y <= 1.55e+72) tmp = 1.0 - (0.1111111111111111 / x); else tmp = 1.0 + ((x ^ -0.5) / (-3.0 / y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.9e+25], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+72], N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Power[x, -0.5], $MachinePrecision] / N[(-3.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+25}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+72}:\\
\;\;\;\;1 - \frac{0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{{x}^{-0.5}}{\frac{-3}{y}}\\
\end{array}
\end{array}
if y < -1.9e25Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 88.4%
*-commutative88.4%
associate-*l*88.5%
*-commutative88.5%
Simplified88.5%
sqrt-div88.5%
metadata-eval88.5%
associate-/r/88.4%
frac-2neg88.4%
associate-/r*88.5%
div-inv88.4%
metadata-eval88.4%
metadata-eval88.4%
metadata-eval88.4%
distribute-rgt-neg-in88.4%
sqrt-prod88.6%
distribute-neg-frac288.6%
frac-2neg88.6%
distribute-neg-frac88.6%
clear-num88.6%
distribute-neg-frac288.6%
sqrt-prod88.4%
distribute-rgt-neg-in88.4%
metadata-eval88.4%
metadata-eval88.4%
Applied egg-rr88.4%
div-inv88.4%
*-commutative88.4%
*-commutative88.4%
associate-/r*88.6%
metadata-eval88.6%
Applied egg-rr88.6%
if -1.9e25 < y < 1.54999999999999994e72Initial program 99.8%
sub-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
if 1.54999999999999994e72 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.4%
fma-neg99.4%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 98.1%
*-commutative98.1%
associate-*l*98.1%
*-commutative98.1%
Simplified98.1%
sqrt-div98.1%
metadata-eval98.1%
associate-/r/98.3%
div-inv98.1%
associate-/r*98.0%
pow1/298.0%
pow-flip98.2%
metadata-eval98.2%
associate-/r*98.5%
metadata-eval98.5%
Applied egg-rr98.5%
Final simplification95.6%
(FPCore (x y) :precision binary64 (if (or (<= y -1.6e+70) (not (<= y 9.8e+90))) (* (* y -0.3333333333333333) (sqrt (/ 1.0 x))) (- 1.0 (/ 0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -1.6e+70) || !(y <= 9.8e+90)) {
tmp = (y * -0.3333333333333333) * sqrt((1.0 / x));
} else {
tmp = 1.0 - (0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.6d+70)) .or. (.not. (y <= 9.8d+90))) then
tmp = (y * (-0.3333333333333333d0)) * sqrt((1.0d0 / x))
else
tmp = 1.0d0 - (0.1111111111111111d0 / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.6e+70) || !(y <= 9.8e+90)) {
tmp = (y * -0.3333333333333333) * Math.sqrt((1.0 / x));
} else {
tmp = 1.0 - (0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.6e+70) or not (y <= 9.8e+90): tmp = (y * -0.3333333333333333) * math.sqrt((1.0 / x)) else: tmp = 1.0 - (0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.6e+70) || !(y <= 9.8e+90)) tmp = Float64(Float64(y * -0.3333333333333333) * sqrt(Float64(1.0 / x))); else tmp = Float64(1.0 - Float64(0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.6e+70) || ~((y <= 9.8e+90))) tmp = (y * -0.3333333333333333) * sqrt((1.0 / x)); else tmp = 1.0 - (0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.6e+70], N[Not[LessEqual[y, 9.8e+90]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+70} \lor \neg \left(y \leq 9.8 \cdot 10^{+90}\right):\\
\;\;\;\;\left(y \cdot -0.3333333333333333\right) \cdot \sqrt{\frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -1.6000000000000001e70 or 9.8000000000000006e90 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in y around inf 92.9%
*-commutative92.9%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
if -1.6000000000000001e70 < y < 9.8000000000000006e90Initial program 99.8%
sub-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 95.4%
associate-*r/95.5%
metadata-eval95.5%
Simplified95.5%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (or (<= y -1.9e+25) (not (<= y 1.5e+72))) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))) (- 1.0 (/ 0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -1.9e+25) || !(y <= 1.5e+72)) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else {
tmp = 1.0 - (0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.9d+25)) .or. (.not. (y <= 1.5d+72))) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else
tmp = 1.0d0 - (0.1111111111111111d0 / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.9e+25) || !(y <= 1.5e+72)) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else {
tmp = 1.0 - (0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.9e+25) or not (y <= 1.5e+72): tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) else: tmp = 1.0 - (0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.9e+25) || !(y <= 1.5e+72)) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); else tmp = Float64(1.0 - Float64(0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.9e+25) || ~((y <= 1.5e+72))) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); else tmp = 1.0 - (0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.9e+25], N[Not[LessEqual[y, 1.5e+72]], $MachinePrecision]], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+25} \lor \neg \left(y \leq 1.5 \cdot 10^{+72}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -1.9e25 or 1.50000000000000001e72 < y Initial program 99.4%
associate--l-99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
distribute-frac-neg99.4%
sub-neg99.4%
neg-mul-199.4%
*-commutative99.4%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 92.8%
*-commutative92.8%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
sqrt-div92.8%
metadata-eval92.8%
associate-/r/92.9%
frac-2neg92.9%
associate-/r*92.9%
div-inv92.9%
metadata-eval92.9%
metadata-eval92.9%
metadata-eval92.9%
distribute-rgt-neg-in92.9%
sqrt-prod93.1%
distribute-neg-frac293.1%
frac-2neg93.1%
distribute-neg-frac93.1%
clear-num93.1%
distribute-neg-frac293.1%
sqrt-prod92.8%
distribute-rgt-neg-in92.8%
metadata-eval92.8%
metadata-eval92.8%
Applied egg-rr92.8%
div-inv92.9%
*-commutative92.9%
*-commutative92.9%
associate-/r*92.9%
metadata-eval92.9%
Applied egg-rr92.9%
if -1.9e25 < y < 1.50000000000000001e72Initial program 99.8%
sub-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
Final simplification95.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.45e+25)
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))
(if (<= y 1.38e+72)
(- 1.0 (/ 0.1111111111111111 x))
(+ 1.0 (/ y (* (sqrt x) -3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -1.45e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else if (y <= 1.38e+72) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.45d+25)) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else if (y <= 1.38d+72) then
tmp = 1.0d0 - (0.1111111111111111d0 / x)
else
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.45e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else if (y <= 1.38e+72) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.45e+25: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) elif y <= 1.38e+72: tmp = 1.0 - (0.1111111111111111 / x) else: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.45e+25) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); elseif (y <= 1.38e+72) tmp = Float64(1.0 - Float64(0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.45e+25) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); elseif (y <= 1.38e+72) tmp = 1.0 - (0.1111111111111111 / x); else tmp = 1.0 + (y / (sqrt(x) * -3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.45e+25], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.38e+72], N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+25}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.38 \cdot 10^{+72}:\\
\;\;\;\;1 - \frac{0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -1.44999999999999995e25Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 88.4%
*-commutative88.4%
associate-*l*88.5%
*-commutative88.5%
Simplified88.5%
sqrt-div88.5%
metadata-eval88.5%
associate-/r/88.4%
frac-2neg88.4%
associate-/r*88.5%
div-inv88.4%
metadata-eval88.4%
metadata-eval88.4%
metadata-eval88.4%
distribute-rgt-neg-in88.4%
sqrt-prod88.6%
distribute-neg-frac288.6%
frac-2neg88.6%
distribute-neg-frac88.6%
clear-num88.6%
distribute-neg-frac288.6%
sqrt-prod88.4%
distribute-rgt-neg-in88.4%
metadata-eval88.4%
metadata-eval88.4%
Applied egg-rr88.4%
div-inv88.4%
*-commutative88.4%
*-commutative88.4%
associate-/r*88.6%
metadata-eval88.6%
Applied egg-rr88.6%
if -1.44999999999999995e25 < y < 1.37999999999999995e72Initial program 99.8%
sub-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
if 1.37999999999999995e72 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.4%
fma-neg99.4%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 98.1%
*-commutative98.1%
associate-*l*98.1%
*-commutative98.1%
Simplified98.1%
sqrt-div98.1%
metadata-eval98.1%
associate-/r/98.3%
frac-2neg98.3%
associate-/r*98.2%
div-inv98.2%
metadata-eval98.2%
metadata-eval98.2%
metadata-eval98.2%
distribute-rgt-neg-in98.2%
sqrt-prod98.5%
distribute-neg-frac298.5%
frac-2neg98.5%
distribute-neg-frac98.5%
clear-num98.5%
distribute-neg-frac298.5%
sqrt-prod98.1%
distribute-rgt-neg-in98.1%
metadata-eval98.1%
metadata-eval98.1%
Applied egg-rr98.1%
Final simplification95.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.65e+25)
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))
(if (<= y 1.4e+72)
(- 1.0 (/ 0.1111111111111111 x))
(+ 1.0 (/ (* y -0.3333333333333333) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -1.65e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else if (y <= 1.4e+72) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + ((y * -0.3333333333333333) / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.65d+25)) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else if (y <= 1.4d+72) then
tmp = 1.0d0 - (0.1111111111111111d0 / x)
else
tmp = 1.0d0 + ((y * (-0.3333333333333333d0)) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.65e+25) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else if (y <= 1.4e+72) {
tmp = 1.0 - (0.1111111111111111 / x);
} else {
tmp = 1.0 + ((y * -0.3333333333333333) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.65e+25: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) elif y <= 1.4e+72: tmp = 1.0 - (0.1111111111111111 / x) else: tmp = 1.0 + ((y * -0.3333333333333333) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.65e+25) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); elseif (y <= 1.4e+72) tmp = Float64(1.0 - Float64(0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(Float64(y * -0.3333333333333333) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.65e+25) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); elseif (y <= 1.4e+72) tmp = 1.0 - (0.1111111111111111 / x); else tmp = 1.0 + ((y * -0.3333333333333333) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.65e+25], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+72], N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+25}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+72}:\\
\;\;\;\;1 - \frac{0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.6500000000000001e25Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 88.4%
*-commutative88.4%
associate-*l*88.5%
*-commutative88.5%
Simplified88.5%
sqrt-div88.5%
metadata-eval88.5%
associate-/r/88.4%
frac-2neg88.4%
associate-/r*88.5%
div-inv88.4%
metadata-eval88.4%
metadata-eval88.4%
metadata-eval88.4%
distribute-rgt-neg-in88.4%
sqrt-prod88.6%
distribute-neg-frac288.6%
frac-2neg88.6%
distribute-neg-frac88.6%
clear-num88.6%
distribute-neg-frac288.6%
sqrt-prod88.4%
distribute-rgt-neg-in88.4%
metadata-eval88.4%
metadata-eval88.4%
Applied egg-rr88.4%
div-inv88.4%
*-commutative88.4%
*-commutative88.4%
associate-/r*88.6%
metadata-eval88.6%
Applied egg-rr88.6%
if -1.6500000000000001e25 < y < 1.4e72Initial program 99.8%
sub-neg99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.3%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
if 1.4e72 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.4%
fma-neg99.4%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 98.1%
*-commutative98.1%
associate-*l*98.1%
*-commutative98.1%
Simplified98.1%
sqrt-div98.1%
metadata-eval98.1%
associate-/r/98.3%
clear-num98.1%
*-commutative98.1%
Applied egg-rr98.1%
Final simplification95.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* y (/ -0.3333333333333333 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (y * (-0.3333333333333333 / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + (y * ((-0.3333333333333333d0) / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (y * (-0.3333333333333333 / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (y * (-0.3333333333333333 / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ (* y -0.3333333333333333) (sqrt x))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((y * (-0.3333333333333333d0)) / sqrt(x))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / Math.sqrt(x));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / math.sqrt(x))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(Float64(y * -0.3333333333333333) / sqrt(x))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
associate-*r/99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around 0 99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (<= x 0.032) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.032) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.032d0) then
tmp = (-0.1111111111111111d0) / x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.032) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.032: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.032) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.032) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.032], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.032:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.032000000000000001Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 64.4%
if 0.032000000000000001 < x Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 60.5%
Final simplification62.4%
(FPCore (x y) :precision binary64 (- 1.0 (/ 0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (0.1111111111111111d0 / x)
end function
public static double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
def code(x, y): return 1.0 - (0.1111111111111111 / x)
function code(x, y) return Float64(1.0 - Float64(0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 - (0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{0.1111111111111111}{x}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 63.6%
associate-*r/63.6%
metadata-eval63.6%
Simplified63.6%
Final simplification63.6%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 32.5%
Final simplification32.5%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - ((1.0d0 / x) / 9.0d0)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(Float64(1.0 / x) / 9.0)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(N[(1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
herbie shell --seed 2024039
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:herbie-target
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))