
(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 17 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 (* 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}
Initial program 99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (or (<= y -8e+17) (not (<= y 2.8e+91))) (* y (* -0.3333333333333333 (sqrt (/ 1.0 x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -8e+17) || !(y <= 2.8e+91)) {
tmp = y * (-0.3333333333333333 * sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-8d+17)) .or. (.not. (y <= 2.8d+91))) then
tmp = y * ((-0.3333333333333333d0) * sqrt((1.0d0 / x)))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -8e+17) || !(y <= 2.8e+91)) {
tmp = y * (-0.3333333333333333 * Math.sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8e+17) or not (y <= 2.8e+91): tmp = y * (-0.3333333333333333 * math.sqrt((1.0 / x))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -8e+17) || !(y <= 2.8e+91)) tmp = Float64(y * Float64(-0.3333333333333333 * sqrt(Float64(1.0 / x)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -8e+17) || ~((y <= 2.8e+91))) tmp = y * (-0.3333333333333333 * sqrt((1.0 / x))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -8e+17], N[Not[LessEqual[y, 2.8e+91]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+17} \lor \neg \left(y \leq 2.8 \cdot 10^{+91}\right):\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot \sqrt{\frac{1}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -8e17 or 2.7999999999999999e91 < y Initial program 99.6%
frac-2neg99.6%
div-inv99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
div-inv99.4%
clear-num99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 95.4%
Taylor expanded in y around inf 92.8%
associate-*r*93.5%
Simplified93.5%
if -8e17 < y < 2.7999999999999999e91Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.1%
cancel-sign-sub-inv98.1%
metadata-eval98.1%
associate-*r/98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
add-cube-cbrt97.3%
pow397.3%
Applied egg-rr97.3%
rem-cube-cbrt98.2%
add-sqr-sqrt0.0%
sqrt-unprod45.2%
frac-times45.2%
metadata-eval45.2%
metadata-eval45.2%
frac-times45.2%
sqrt-unprod45.2%
add-sqr-sqrt45.2%
metadata-eval45.2%
distribute-neg-frac45.2%
clear-num45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
clear-num45.2%
add-sqr-sqrt0.0%
sqrt-unprod69.3%
frac-times69.3%
metadata-eval69.3%
metadata-eval69.3%
frac-times69.3%
sqrt-unprod97.9%
add-sqr-sqrt98.1%
clear-num98.1%
div-inv98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Final simplification96.3%
(FPCore (x y) :precision binary64 (if (or (<= y -8e+17) (not (<= y 2.8e+91))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -8e+17) || !(y <= 2.8e+91)) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-8d+17)) .or. (.not. (y <= 2.8d+91))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -8e+17) || !(y <= 2.8e+91)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8e+17) or not (y <= 2.8e+91): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -8e+17) || !(y <= 2.8e+91)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -8e+17) || ~((y <= 2.8e+91))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -8e+17], N[Not[LessEqual[y, 2.8e+91]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+17} \lor \neg \left(y \leq 2.8 \cdot 10^{+91}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -8e17 or 2.7999999999999999e91 < y Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate-+r-99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.4%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 96.8%
associate-*r*97.6%
Simplified97.6%
sqrt-div97.5%
metadata-eval97.5%
div-inv97.6%
add-sqr-sqrt0.0%
sqrt-unprod2.5%
sqr-neg2.5%
sqrt-unprod2.5%
add-sqr-sqrt2.5%
neg-sub02.5%
sub-neg2.5%
add-sqr-sqrt2.5%
sqrt-unprod2.5%
sqr-neg2.5%
sqrt-unprod0.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
+-lft-identity97.6%
Simplified97.6%
associate-*l/97.6%
clear-num97.5%
Applied egg-rr97.5%
associate-/r/97.5%
associate-*l/97.6%
associate-*r/97.6%
associate-*r/96.8%
*-lft-identity96.8%
Simplified96.8%
if -8e17 < y < 2.7999999999999999e91Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.1%
cancel-sign-sub-inv98.1%
metadata-eval98.1%
associate-*r/98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
add-cube-cbrt97.3%
pow397.3%
Applied egg-rr97.3%
rem-cube-cbrt98.2%
add-sqr-sqrt0.0%
sqrt-unprod45.2%
frac-times45.2%
metadata-eval45.2%
metadata-eval45.2%
frac-times45.2%
sqrt-unprod45.2%
add-sqr-sqrt45.2%
metadata-eval45.2%
distribute-neg-frac45.2%
clear-num45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
clear-num45.2%
add-sqr-sqrt0.0%
sqrt-unprod69.3%
frac-times69.3%
metadata-eval69.3%
metadata-eval69.3%
frac-times69.3%
sqrt-unprod97.9%
add-sqr-sqrt98.1%
clear-num98.1%
div-inv98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Final simplification97.6%
(FPCore (x y) :precision binary64 (if (or (<= y -7.8e+17) (not (<= y 2.8e+91))) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -7.8e+17) || !(y <= 2.8e+91)) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-7.8d+17)) .or. (.not. (y <= 2.8d+91))) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -7.8e+17) || !(y <= 2.8e+91)) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -7.8e+17) or not (y <= 2.8e+91): tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -7.8e+17) || !(y <= 2.8e+91)) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -7.8e+17) || ~((y <= 2.8e+91))) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -7.8e+17], N[Not[LessEqual[y, 2.8e+91]], $MachinePrecision]], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+17} \lor \neg \left(y \leq 2.8 \cdot 10^{+91}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -7.8e17 or 2.7999999999999999e91 < y Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate-+r-99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.4%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 96.8%
associate-*r*97.6%
Simplified97.6%
sqrt-div97.5%
metadata-eval97.5%
div-inv97.6%
add-sqr-sqrt0.0%
sqrt-unprod2.5%
sqr-neg2.5%
sqrt-unprod2.5%
add-sqr-sqrt2.5%
neg-sub02.5%
sub-neg2.5%
add-sqr-sqrt2.5%
sqrt-unprod2.5%
sqr-neg2.5%
sqrt-unprod0.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
+-lft-identity97.6%
Simplified97.6%
if -7.8e17 < y < 2.7999999999999999e91Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.1%
cancel-sign-sub-inv98.1%
metadata-eval98.1%
associate-*r/98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
add-cube-cbrt97.3%
pow397.3%
Applied egg-rr97.3%
rem-cube-cbrt98.2%
add-sqr-sqrt0.0%
sqrt-unprod45.2%
frac-times45.2%
metadata-eval45.2%
metadata-eval45.2%
frac-times45.2%
sqrt-unprod45.2%
add-sqr-sqrt45.2%
metadata-eval45.2%
distribute-neg-frac45.2%
clear-num45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
clear-num45.2%
add-sqr-sqrt0.0%
sqrt-unprod69.3%
frac-times69.3%
metadata-eval69.3%
metadata-eval69.3%
frac-times69.3%
sqrt-unprod97.9%
add-sqr-sqrt98.1%
clear-num98.1%
div-inv98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Final simplification98.0%
(FPCore (x y) :precision binary64 (if (or (<= y -8e+17) (not (<= y 2.8e+91))) (+ 1.0 (/ (/ y -3.0) (sqrt x))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -8e+17) || !(y <= 2.8e+91)) {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-8d+17)) .or. (.not. (y <= 2.8d+91))) then
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -8e+17) || !(y <= 2.8e+91)) {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8e+17) or not (y <= 2.8e+91): tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -8e+17) || !(y <= 2.8e+91)) tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -8e+17) || ~((y <= 2.8e+91))) tmp = 1.0 + ((y / -3.0) / sqrt(x)); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -8e+17], N[Not[LessEqual[y, 2.8e+91]], $MachinePrecision]], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+17} \lor \neg \left(y \leq 2.8 \cdot 10^{+91}\right):\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -8e17 or 2.7999999999999999e91 < y Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate-+r-99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.4%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 96.8%
associate-*r*97.6%
Simplified97.6%
sqrt-div97.5%
metadata-eval97.5%
div-inv97.6%
add-sqr-sqrt0.0%
sqrt-unprod2.5%
sqr-neg2.5%
sqrt-unprod2.5%
add-sqr-sqrt2.5%
neg-sub02.5%
sub-neg2.5%
add-sqr-sqrt2.5%
sqrt-unprod2.5%
sqr-neg2.5%
sqrt-unprod0.0%
add-sqr-sqrt97.6%
Applied egg-rr97.6%
+-lft-identity97.6%
Simplified97.6%
associate-*l/97.6%
*-un-lft-identity97.6%
times-frac96.8%
metadata-eval96.8%
metadata-eval96.8%
times-frac97.7%
*-un-lft-identity97.7%
associate-/r*97.8%
Applied egg-rr97.8%
if -8e17 < y < 2.7999999999999999e91Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.1%
cancel-sign-sub-inv98.1%
metadata-eval98.1%
associate-*r/98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
add-cube-cbrt97.3%
pow397.3%
Applied egg-rr97.3%
rem-cube-cbrt98.2%
add-sqr-sqrt0.0%
sqrt-unprod45.2%
frac-times45.2%
metadata-eval45.2%
metadata-eval45.2%
frac-times45.2%
sqrt-unprod45.2%
add-sqr-sqrt45.2%
metadata-eval45.2%
distribute-neg-frac45.2%
clear-num45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
clear-num45.2%
add-sqr-sqrt0.0%
sqrt-unprod69.3%
frac-times69.3%
metadata-eval69.3%
metadata-eval69.3%
frac-times69.3%
sqrt-unprod97.9%
add-sqr-sqrt98.1%
clear-num98.1%
div-inv98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Final simplification98.1%
(FPCore (x y)
:precision binary64
(if (<= y -7.8e+17)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 2.8e+91)
(+ 1.0 (/ -1.0 (* x 9.0)))
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -7.8e+17) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 2.8e+91) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} 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 <= (-7.8d+17)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= 2.8d+91) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
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 <= -7.8e+17) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 2.8e+91) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.8e+17: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 2.8e+91: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -7.8e+17) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 2.8e+91) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -7.8e+17) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 2.8e+91) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.8e+17], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+91], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+17}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -7.8e17Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.4%
fma-neg99.4%
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 97.8%
associate-*r*97.9%
Simplified97.9%
sqrt-div97.9%
metadata-eval97.9%
div-inv97.8%
add-sqr-sqrt0.0%
sqrt-unprod1.9%
sqr-neg1.9%
sqrt-unprod1.9%
add-sqr-sqrt1.9%
neg-sub01.9%
sub-neg1.9%
add-sqr-sqrt1.9%
sqrt-unprod1.9%
sqr-neg1.9%
sqrt-unprod0.0%
add-sqr-sqrt97.8%
Applied egg-rr97.8%
+-lft-identity97.8%
Simplified97.8%
associate-*l/97.9%
associate-/l*97.9%
Applied egg-rr97.9%
if -7.8e17 < y < 2.7999999999999999e91Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.1%
cancel-sign-sub-inv98.1%
metadata-eval98.1%
associate-*r/98.2%
metadata-eval98.2%
+-commutative98.2%
Simplified98.2%
add-cube-cbrt97.3%
pow397.3%
Applied egg-rr97.3%
rem-cube-cbrt98.2%
add-sqr-sqrt0.0%
sqrt-unprod45.2%
frac-times45.2%
metadata-eval45.2%
metadata-eval45.2%
frac-times45.2%
sqrt-unprod45.2%
add-sqr-sqrt45.2%
metadata-eval45.2%
distribute-neg-frac45.2%
clear-num45.2%
distribute-neg-frac45.2%
metadata-eval45.2%
clear-num45.2%
add-sqr-sqrt0.0%
sqrt-unprod69.3%
frac-times69.3%
metadata-eval69.3%
metadata-eval69.3%
frac-times69.3%
sqrt-unprod97.9%
add-sqr-sqrt98.1%
clear-num98.1%
div-inv98.3%
metadata-eval98.3%
Applied egg-rr98.3%
if 2.7999999999999999e91 < y Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate-+r-99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 96.0%
associate-*r*97.3%
Simplified97.3%
sqrt-div97.2%
metadata-eval97.2%
div-inv97.3%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.1%
add-sqr-sqrt3.1%
neg-sub03.1%
sub-neg3.1%
add-sqr-sqrt3.1%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod0.0%
add-sqr-sqrt97.3%
Applied egg-rr97.3%
+-lft-identity97.3%
Simplified97.3%
Final simplification98.0%
(FPCore (x y) :precision binary64 (if (<= x 0.106) (- (/ -0.1111111111111111 x) (* (/ y (sqrt x)) 0.3333333333333333)) (+ 1.0 (/ (/ y -3.0) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (x <= 0.106) {
tmp = (-0.1111111111111111 / x) - ((y / sqrt(x)) * 0.3333333333333333);
} else {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.106d0) then
tmp = ((-0.1111111111111111d0) / x) - ((y / sqrt(x)) * 0.3333333333333333d0)
else
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.106) {
tmp = (-0.1111111111111111 / x) - ((y / Math.sqrt(x)) * 0.3333333333333333);
} else {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.106: tmp = (-0.1111111111111111 / x) - ((y / math.sqrt(x)) * 0.3333333333333333) else: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.106) tmp = Float64(Float64(-0.1111111111111111 / x) - Float64(Float64(y / sqrt(x)) * 0.3333333333333333)); else tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.106) tmp = (-0.1111111111111111 / x) - ((y / sqrt(x)) * 0.3333333333333333); else tmp = 1.0 + ((y / -3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.106], N[(N[(-0.1111111111111111 / x), $MachinePrecision] - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.106:\\
\;\;\;\;\frac{-0.1111111111111111}{x} - \frac{y}{\sqrt{x}} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 0.105999999999999997Initial program 99.6%
frac-2neg99.6%
div-inv99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
div-inv99.5%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 96.7%
distribute-lft-neg-out96.7%
*-commutative96.7%
div-inv96.7%
metadata-eval96.7%
sqrt-div96.7%
neg-sub096.7%
associate-*l*96.1%
sqrt-div96.1%
metadata-eval96.1%
associate-*l/96.1%
*-un-lft-identity96.1%
Applied egg-rr96.1%
neg-sub096.1%
distribute-lft-neg-in96.1%
metadata-eval96.1%
Simplified96.1%
if 0.105999999999999997 < x Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 99.3%
associate-*r*99.3%
Simplified99.3%
sqrt-div99.3%
metadata-eval99.3%
div-inv99.3%
add-sqr-sqrt0.0%
sqrt-unprod54.8%
sqr-neg54.8%
sqrt-unprod54.8%
add-sqr-sqrt54.8%
neg-sub054.8%
sub-neg54.8%
add-sqr-sqrt54.8%
sqrt-unprod54.8%
sqr-neg54.8%
sqrt-unprod0.0%
add-sqr-sqrt99.3%
Applied egg-rr99.3%
+-lft-identity99.3%
Simplified99.3%
associate-*l/99.3%
*-un-lft-identity99.3%
times-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
times-frac99.3%
*-un-lft-identity99.3%
associate-/r*99.3%
Applied egg-rr99.3%
Final simplification97.7%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (+ (/ -0.1111111111111111 x) (* y (/ -0.3333333333333333 (sqrt x)))) (+ 1.0 (/ (/ y -3.0) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (-0.1111111111111111 / x) + (y * (-0.3333333333333333 / sqrt(x)));
} else {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.11d0) then
tmp = ((-0.1111111111111111d0) / x) + (y * ((-0.3333333333333333d0) / sqrt(x)))
else
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (-0.1111111111111111 / x) + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = (-0.1111111111111111 / x) + (y * (-0.3333333333333333 / math.sqrt(x))) else: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(-0.1111111111111111 / x) + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); else tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = (-0.1111111111111111 / x) + (y * (-0.3333333333333333 / sqrt(x))); else tmp = 1.0 + ((y / -3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(-0.1111111111111111 / x), $MachinePrecision] + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x} + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.6%
frac-2neg99.6%
div-inv99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
div-inv99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 96.7%
if 0.110000000000000001 < x Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 99.3%
associate-*r*99.3%
Simplified99.3%
sqrt-div99.3%
metadata-eval99.3%
div-inv99.3%
add-sqr-sqrt0.0%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod55.2%
add-sqr-sqrt55.2%
neg-sub055.2%
sub-neg55.2%
add-sqr-sqrt55.2%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod0.0%
add-sqr-sqrt99.3%
Applied egg-rr99.3%
+-lft-identity99.3%
Simplified99.3%
associate-*l/99.3%
*-un-lft-identity99.3%
times-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
times-frac99.3%
*-un-lft-identity99.3%
associate-/r*99.3%
Applied egg-rr99.3%
Final simplification98.0%
(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.3%
metadata-eval99.3%
Simplified99.3%
Final simplification99.3%
(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.3%
metadata-eval99.3%
Simplified99.3%
associate-*r/99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * 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 / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Initial program 99.7%
Taylor expanded in x around 0 99.6%
Final simplification99.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ 0.1111111111111111 x)))
(t_1 (/ 1.0 t_0))
(t_2 (* (/ -0.1111111111111111 x) (/ -0.1111111111111111 x))))
(if (<= y -8e+17)
(+ t_1 (* t_2 (/ -1.0 (+ 1.0 (/ -0.1111111111111111 x)))))
(if (<= y 3.4e+149) (+ 1.0 (/ -1.0 (* x 9.0))) (- t_1 (/ t_2 t_0))))))
double code(double x, double y) {
double t_0 = 1.0 + (0.1111111111111111 / x);
double t_1 = 1.0 / t_0;
double t_2 = (-0.1111111111111111 / x) * (-0.1111111111111111 / x);
double tmp;
if (y <= -8e+17) {
tmp = t_1 + (t_2 * (-1.0 / (1.0 + (-0.1111111111111111 / x))));
} else if (y <= 3.4e+149) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_1 - (t_2 / t_0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = 1.0d0 + (0.1111111111111111d0 / x)
t_1 = 1.0d0 / t_0
t_2 = ((-0.1111111111111111d0) / x) * ((-0.1111111111111111d0) / x)
if (y <= (-8d+17)) then
tmp = t_1 + (t_2 * ((-1.0d0) / (1.0d0 + ((-0.1111111111111111d0) / x))))
else if (y <= 3.4d+149) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = t_1 - (t_2 / t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (0.1111111111111111 / x);
double t_1 = 1.0 / t_0;
double t_2 = (-0.1111111111111111 / x) * (-0.1111111111111111 / x);
double tmp;
if (y <= -8e+17) {
tmp = t_1 + (t_2 * (-1.0 / (1.0 + (-0.1111111111111111 / x))));
} else if (y <= 3.4e+149) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = t_1 - (t_2 / t_0);
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (0.1111111111111111 / x) t_1 = 1.0 / t_0 t_2 = (-0.1111111111111111 / x) * (-0.1111111111111111 / x) tmp = 0 if y <= -8e+17: tmp = t_1 + (t_2 * (-1.0 / (1.0 + (-0.1111111111111111 / x)))) elif y <= 3.4e+149: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = t_1 - (t_2 / t_0) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(0.1111111111111111 / x)) t_1 = Float64(1.0 / t_0) t_2 = Float64(Float64(-0.1111111111111111 / x) * Float64(-0.1111111111111111 / x)) tmp = 0.0 if (y <= -8e+17) tmp = Float64(t_1 + Float64(t_2 * Float64(-1.0 / Float64(1.0 + Float64(-0.1111111111111111 / x))))); elseif (y <= 3.4e+149) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(t_1 - Float64(t_2 / t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (0.1111111111111111 / x); t_1 = 1.0 / t_0; t_2 = (-0.1111111111111111 / x) * (-0.1111111111111111 / x); tmp = 0.0; if (y <= -8e+17) tmp = t_1 + (t_2 * (-1.0 / (1.0 + (-0.1111111111111111 / x)))); elseif (y <= 3.4e+149) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = t_1 - (t_2 / t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-0.1111111111111111 / x), $MachinePrecision] * N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+17], N[(t$95$1 + N[(t$95$2 * N[(-1.0 / N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+149], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{0.1111111111111111}{x}\\
t_1 := \frac{1}{t_0}\\
t_2 := \frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+17}:\\
\;\;\;\;t_1 + t_2 \cdot \frac{-1}{1 + \frac{-0.1111111111111111}{x}}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+149}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;t_1 - \frac{t_2}{t_0}\\
\end{array}
\end{array}
if y < -8e17Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.4%
fma-neg99.4%
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 0 4.8%
cancel-sign-sub-inv4.8%
metadata-eval4.8%
associate-*r/4.8%
metadata-eval4.8%
+-commutative4.8%
Simplified4.8%
add-cube-cbrt4.8%
pow34.8%
Applied egg-rr4.8%
rem-cube-cbrt4.8%
add-sqr-sqrt0.0%
sqrt-unprod16.6%
frac-times16.6%
metadata-eval16.6%
metadata-eval16.6%
frac-times16.6%
sqrt-unprod7.6%
add-sqr-sqrt7.6%
+-commutative7.6%
div-inv7.6%
metadata-eval7.6%
cancel-sign-sub-inv7.6%
div-inv7.6%
flip--16.6%
metadata-eval16.6%
rem-cube-cbrt16.6%
rem-cube-cbrt16.6%
+-commutative16.6%
div-sub16.6%
Applied egg-rr4.8%
div-inv4.8%
metadata-eval4.8%
unpow24.8%
frac-times4.8%
metadata-eval4.8%
associate-*l/4.8%
metadata-eval4.8%
associate-*l/4.8%
associate-*l*4.8%
associate-*l/4.8%
metadata-eval4.8%
metadata-eval4.8%
add-sqr-sqrt4.8%
sqrt-prod4.8%
unpow24.8%
sqrt-div4.8%
metadata-eval4.8%
unpow24.8%
frac-times4.8%
sqrt-unprod0.0%
add-sqr-sqrt7.6%
Applied egg-rr7.6%
associate-*r*16.6%
+-commutative16.6%
Simplified16.6%
if -8e17 < y < 3.3999999999999998e149Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.7%
fma-neg99.7%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 89.9%
cancel-sign-sub-inv89.9%
metadata-eval89.9%
associate-*r/89.9%
metadata-eval89.9%
+-commutative89.9%
Simplified89.9%
add-cube-cbrt89.2%
pow389.2%
Applied egg-rr89.2%
rem-cube-cbrt89.9%
add-sqr-sqrt0.0%
sqrt-unprod41.5%
frac-times41.5%
metadata-eval41.5%
metadata-eval41.5%
frac-times41.5%
sqrt-unprod41.6%
add-sqr-sqrt41.6%
metadata-eval41.6%
distribute-neg-frac41.6%
clear-num41.6%
distribute-neg-frac41.6%
metadata-eval41.6%
clear-num41.6%
add-sqr-sqrt0.0%
sqrt-unprod63.4%
frac-times63.4%
metadata-eval63.4%
metadata-eval63.4%
frac-times63.4%
sqrt-unprod89.7%
add-sqr-sqrt89.9%
clear-num89.9%
div-inv90.1%
metadata-eval90.1%
Applied egg-rr90.1%
if 3.3999999999999998e149 < y Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.6%
fma-neg99.6%
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 0 3.6%
cancel-sign-sub-inv3.6%
metadata-eval3.6%
associate-*r/3.6%
metadata-eval3.6%
+-commutative3.6%
Simplified3.6%
add-cube-cbrt3.6%
pow33.6%
Applied egg-rr3.6%
rem-cube-cbrt3.6%
add-sqr-sqrt0.0%
sqrt-unprod0.6%
frac-times0.6%
metadata-eval0.6%
metadata-eval0.6%
frac-times0.6%
sqrt-unprod0.7%
add-sqr-sqrt0.7%
+-commutative0.7%
div-inv0.7%
metadata-eval0.7%
cancel-sign-sub-inv0.7%
div-inv0.7%
flip--0.6%
metadata-eval0.6%
rem-cube-cbrt0.6%
rem-cube-cbrt0.6%
+-commutative0.6%
div-sub0.6%
Applied egg-rr19.9%
metadata-eval19.9%
unpow219.9%
frac-times19.9%
Applied egg-rr19.9%
Final simplification64.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ 1.0 (/ 0.1111111111111111 x))))
(if (<= y 3.9e+146)
(+ 1.0 (/ -1.0 (* x 9.0)))
(-
(/ 1.0 t_0)
(/ (* (/ -0.1111111111111111 x) (/ -0.1111111111111111 x)) t_0)))))
double code(double x, double y) {
double t_0 = 1.0 + (0.1111111111111111 / x);
double tmp;
if (y <= 3.9e+146) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (1.0 / t_0) - (((-0.1111111111111111 / x) * (-0.1111111111111111 / x)) / t_0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (0.1111111111111111d0 / x)
if (y <= 3.9d+146) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = (1.0d0 / t_0) - ((((-0.1111111111111111d0) / x) * ((-0.1111111111111111d0) / x)) / t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 + (0.1111111111111111 / x);
double tmp;
if (y <= 3.9e+146) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (1.0 / t_0) - (((-0.1111111111111111 / x) * (-0.1111111111111111 / x)) / t_0);
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (0.1111111111111111 / x) tmp = 0 if y <= 3.9e+146: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = (1.0 / t_0) - (((-0.1111111111111111 / x) * (-0.1111111111111111 / x)) / t_0) return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(0.1111111111111111 / x)) tmp = 0.0 if (y <= 3.9e+146) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(Float64(1.0 / t_0) - Float64(Float64(Float64(-0.1111111111111111 / x) * Float64(-0.1111111111111111 / x)) / t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (0.1111111111111111 / x); tmp = 0.0; if (y <= 3.9e+146) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (1.0 / t_0) - (((-0.1111111111111111 / x) * (-0.1111111111111111 / x)) / t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 3.9e+146], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / t$95$0), $MachinePrecision] - N[(N[(N[(-0.1111111111111111 / x), $MachinePrecision] * N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + \frac{0.1111111111111111}{x}\\
\mathbf{if}\;y \leq 3.9 \cdot 10^{+146}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t_0} - \frac{\frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}}{t_0}\\
\end{array}
\end{array}
if y < 3.9e146Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.6%
fma-neg99.7%
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 0 70.5%
cancel-sign-sub-inv70.5%
metadata-eval70.5%
associate-*r/70.5%
metadata-eval70.5%
+-commutative70.5%
Simplified70.5%
add-cube-cbrt69.9%
pow369.9%
Applied egg-rr69.9%
rem-cube-cbrt70.5%
add-sqr-sqrt0.0%
sqrt-unprod35.9%
frac-times35.9%
metadata-eval35.9%
metadata-eval35.9%
frac-times35.9%
sqrt-unprod33.8%
add-sqr-sqrt33.8%
metadata-eval33.8%
distribute-neg-frac33.8%
clear-num33.8%
distribute-neg-frac33.8%
metadata-eval33.8%
clear-num33.8%
add-sqr-sqrt0.0%
sqrt-unprod50.0%
frac-times50.0%
metadata-eval50.0%
metadata-eval50.0%
frac-times50.0%
sqrt-unprod70.3%
add-sqr-sqrt70.4%
clear-num70.4%
div-inv70.6%
metadata-eval70.6%
Applied egg-rr70.6%
if 3.9e146 < y Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.6%
fma-neg99.6%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 3.6%
cancel-sign-sub-inv3.6%
metadata-eval3.6%
associate-*r/3.6%
metadata-eval3.6%
+-commutative3.6%
Simplified3.6%
add-cube-cbrt3.6%
pow33.6%
Applied egg-rr3.6%
rem-cube-cbrt3.6%
add-sqr-sqrt0.0%
sqrt-unprod0.7%
frac-times0.7%
metadata-eval0.7%
metadata-eval0.7%
frac-times0.7%
sqrt-unprod0.7%
add-sqr-sqrt0.7%
+-commutative0.7%
div-inv0.7%
metadata-eval0.7%
cancel-sign-sub-inv0.7%
div-inv0.7%
flip--0.7%
metadata-eval0.7%
rem-cube-cbrt0.7%
rem-cube-cbrt0.7%
+-commutative0.7%
div-sub0.7%
Applied egg-rr19.5%
metadata-eval19.5%
unpow219.5%
frac-times19.5%
Applied egg-rr19.5%
Final simplification62.2%
(FPCore (x y) :precision binary64 (if (<= x 0.106) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.106) {
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.106d0) 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.106) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.106: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.106) 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.106) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.106], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.106:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.105999999999999997Initial program 99.6%
frac-2neg99.6%
div-inv99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
div-inv99.5%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 96.7%
Taylor expanded in x around 0 60.0%
if 0.105999999999999997 < x Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 56.0%
Final simplification58.1%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -1.0 (* x 9.0))))
double code(double x, double y) {
return 1.0 + (-1.0 / (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))
end function
public static double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
def code(x, y): return 1.0 + (-1.0 / (x * 9.0))
function code(x, y) return Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) end
function tmp = code(x, y) tmp = 1.0 + (-1.0 / (x * 9.0)); end
code[x_, y_] := N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-1}{x \cdot 9}
\end{array}
Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/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 0 59.5%
cancel-sign-sub-inv59.5%
metadata-eval59.5%
associate-*r/59.5%
metadata-eval59.5%
+-commutative59.5%
Simplified59.5%
add-cube-cbrt59.0%
pow359.0%
Applied egg-rr59.0%
rem-cube-cbrt59.5%
add-sqr-sqrt0.0%
sqrt-unprod30.1%
frac-times30.1%
metadata-eval30.1%
metadata-eval30.1%
frac-times30.1%
sqrt-unprod28.4%
add-sqr-sqrt28.4%
metadata-eval28.4%
distribute-neg-frac28.4%
clear-num28.4%
distribute-neg-frac28.4%
metadata-eval28.4%
clear-num28.4%
add-sqr-sqrt0.0%
sqrt-unprod45.0%
frac-times45.0%
metadata-eval45.0%
metadata-eval45.0%
frac-times45.0%
sqrt-unprod59.3%
add-sqr-sqrt59.5%
clear-num59.4%
div-inv59.6%
metadata-eval59.6%
Applied egg-rr59.6%
Final simplification59.6%
(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%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/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 0 59.5%
cancel-sign-sub-inv59.5%
metadata-eval59.5%
associate-*r/59.5%
metadata-eval59.5%
+-commutative59.5%
Simplified59.5%
Final simplification59.5%
(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%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/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 x around inf 28.3%
Final simplification28.3%
(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 2024018
(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)))))