
(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 15 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))) (* (pow x -0.5) (* y 0.3333333333333333))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (pow(x, -0.5) * (y * 0.3333333333333333));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((-1.0d0) / (x * 9.0d0))) - ((x ** (-0.5d0)) * (y * 0.3333333333333333d0))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (Math.pow(x, -0.5) * (y * 0.3333333333333333));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (math.pow(x, -0.5) * (y * 0.3333333333333333))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64((x ^ -0.5) * Float64(y * 0.3333333333333333))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - ((x ^ -0.5) * (y * 0.3333333333333333)); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[x, -0.5], $MachinePrecision] * N[(y * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - {x}^{-0.5} \cdot \left(y \cdot 0.3333333333333333\right)
\end{array}
Initial program 99.7%
*-un-lft-identity99.7%
*-commutative99.7%
times-frac99.6%
pow1/299.6%
pow-flip99.7%
metadata-eval99.7%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(if (<= y -3.6e+51)
(+ 1.0 (/ (/ y -3.0) (sqrt x)))
(if (<= y 1.4e+41)
(+ 1.0 (/ -1.0 (* x 9.0)))
(+ 1.0 (* (pow x -0.5) (* y -0.3333333333333333))))))
double code(double x, double y) {
double tmp;
if (y <= -3.6e+51) {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
} else if (y <= 1.4e+41) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (pow(x, -0.5) * (y * -0.3333333333333333));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-3.6d+51)) then
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
else if (y <= 1.4d+41) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 + ((x ** (-0.5d0)) * (y * (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.6e+51) {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
} else if (y <= 1.4e+41) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (Math.pow(x, -0.5) * (y * -0.3333333333333333));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.6e+51: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) elif y <= 1.4e+41: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 + (math.pow(x, -0.5) * (y * -0.3333333333333333)) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.6e+51) tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); elseif (y <= 1.4e+41) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 + Float64((x ^ -0.5) * Float64(y * -0.3333333333333333))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.6e+51) tmp = 1.0 + ((y / -3.0) / sqrt(x)); elseif (y <= 1.4e+41) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 + ((x ^ -0.5) * (y * -0.3333333333333333)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.6e+51], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+41], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Power[x, -0.5], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+51}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+41}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 + {x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if y < -3.60000000000000011e51Initial 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.5%
fmm-def99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 95.4%
associate-*r*95.5%
*-commutative95.5%
associate-*l*95.6%
Simplified95.6%
*-commutative95.6%
*-commutative95.6%
associate-*r*95.5%
sqrt-div95.6%
metadata-eval95.6%
div-inv95.7%
clear-num95.6%
un-div-inv95.6%
div-inv95.7%
metadata-eval95.7%
Applied egg-rr95.7%
*-commutative95.7%
associate-/r*95.7%
Simplified95.7%
if -3.60000000000000011e51 < y < 1.4e41Initial 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 99.0%
div-inv99.0%
clear-num99.1%
div-inv99.1%
metadata-eval99.1%
Applied egg-rr99.1%
if 1.4e41 < 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.3%
fmm-def99.3%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 93.9%
associate-*r*93.9%
*-commutative93.9%
associate-*l*93.9%
Simplified93.9%
inv-pow93.9%
sqrt-pow193.9%
metadata-eval93.9%
*-un-lft-identity93.9%
Applied egg-rr93.9%
*-lft-identity93.9%
Simplified93.9%
Final simplification97.2%
(FPCore (x y) :precision binary64 (if (or (<= y -1.05e+76) (not (<= y 3.8e+45))) (* -0.3333333333333333 (* y (sqrt (/ 1.0 x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.05e+76) || !(y <= 3.8e+45)) {
tmp = -0.3333333333333333 * (y * 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 <= (-1.05d+76)) .or. (.not. (y <= 3.8d+45))) then
tmp = (-0.3333333333333333d0) * (y * 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 <= -1.05e+76) || !(y <= 3.8e+45)) {
tmp = -0.3333333333333333 * (y * Math.sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.05e+76) or not (y <= 3.8e+45): tmp = -0.3333333333333333 * (y * 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 <= -1.05e+76) || !(y <= 3.8e+45)) tmp = Float64(-0.3333333333333333 * Float64(y * 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 <= -1.05e+76) || ~((y <= 3.8e+45))) tmp = -0.3333333333333333 * (y * 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, -1.05e+76], N[Not[LessEqual[y, 3.8e+45]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y * 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 -1.05 \cdot 10^{+76} \lor \neg \left(y \leq 3.8 \cdot 10^{+45}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -1.05000000000000003e76 or 3.8000000000000002e45 < y Initial program 99.4%
*-un-lft-identity99.4%
*-commutative99.4%
times-frac99.4%
pow1/299.4%
pow-flip99.6%
metadata-eval99.6%
div-inv99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 90.6%
if -1.05000000000000003e76 < y < 3.8000000000000002e45Initial 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 98.4%
div-inv98.3%
clear-num98.4%
div-inv98.5%
metadata-eval98.5%
Applied egg-rr98.5%
Final simplification95.1%
(FPCore (x y) :precision binary64 (if (or (<= y -1.3e+50) (not (<= y 1.1e+41))) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.3e+50) || !(y <= 1.1e+41)) {
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 <= (-1.3d+50)) .or. (.not. (y <= 1.1d+41))) 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 <= -1.3e+50) || !(y <= 1.1e+41)) {
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 <= -1.3e+50) or not (y <= 1.1e+41): 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 <= -1.3e+50) || !(y <= 1.1e+41)) 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 <= -1.3e+50) || ~((y <= 1.1e+41))) 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, -1.3e+50], N[Not[LessEqual[y, 1.1e+41]], $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 -1.3 \cdot 10^{+50} \lor \neg \left(y \leq 1.1 \cdot 10^{+41}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -1.3000000000000001e50 or 1.09999999999999995e41 < 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.4%
fmm-def99.4%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 94.6%
associate-*r*94.6%
*-commutative94.6%
associate-*l*94.7%
Simplified94.7%
*-commutative94.7%
sqrt-div94.7%
metadata-eval94.7%
un-div-inv94.7%
*-commutative94.7%
Applied egg-rr94.7%
associate-/l*94.7%
Simplified94.7%
if -1.3000000000000001e50 < y < 1.09999999999999995e41Initial 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 99.0%
div-inv99.0%
clear-num99.1%
div-inv99.1%
metadata-eval99.1%
Applied egg-rr99.1%
Final simplification97.2%
(FPCore (x y)
:precision binary64
(if (<= y -1.5e+51)
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))
(if (<= y 1.4e+41)
(+ 1.0 (/ -1.0 (* x 9.0)))
(+ 1.0 (/ y (* (sqrt x) -3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -1.5e+51) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else if (y <= 1.4e+41) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} 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.5d+51)) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else if (y <= 1.4d+41) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
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.5e+51) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else if (y <= 1.4e+41) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.5e+51: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) elif y <= 1.4e+41: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.5e+51) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); elseif (y <= 1.4e+41) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); 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.5e+51) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); elseif (y <= 1.4e+41) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 + (y / (sqrt(x) * -3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.5e+51], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+41], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $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.5 \cdot 10^{+51}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+41}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -1.5e51Initial 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.5%
fmm-def99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 95.4%
associate-*r*95.5%
*-commutative95.5%
associate-*l*95.6%
Simplified95.6%
*-commutative95.6%
sqrt-div95.6%
metadata-eval95.6%
un-div-inv95.7%
*-commutative95.7%
Applied egg-rr95.7%
associate-/l*95.7%
Simplified95.7%
if -1.5e51 < y < 1.4e41Initial 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 99.0%
div-inv99.0%
clear-num99.1%
div-inv99.1%
metadata-eval99.1%
Applied egg-rr99.1%
if 1.4e41 < 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.3%
fmm-def99.3%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 93.9%
associate-*r*93.9%
*-commutative93.9%
associate-*l*93.9%
Simplified93.9%
*-commutative93.9%
*-commutative93.9%
associate-*r*93.9%
sqrt-div93.7%
metadata-eval93.7%
div-inv93.8%
clear-num93.7%
un-div-inv93.7%
div-inv93.9%
metadata-eval93.9%
Applied egg-rr93.9%
Final simplification97.2%
(FPCore (x y)
:precision binary64
(if (<= y -1e+52)
(+ 1.0 (/ (/ y -3.0) (sqrt x)))
(if (<= y 8e+40)
(+ 1.0 (/ -1.0 (* x 9.0)))
(+ 1.0 (/ y (* (sqrt x) -3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -1e+52) {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
} else if (y <= 8e+40) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} 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 <= (-1d+52)) then
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
else if (y <= 8d+40) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
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 <= -1e+52) {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
} else if (y <= 8e+40) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1e+52: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) elif y <= 8e+40: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1e+52) tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); elseif (y <= 8e+40) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); 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 <= -1e+52) tmp = 1.0 + ((y / -3.0) / sqrt(x)); elseif (y <= 8e+40) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 + (y / (sqrt(x) * -3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1e+52], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+40], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $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 \cdot 10^{+52}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+40}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -9.9999999999999999e51Initial 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.5%
fmm-def99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 95.4%
associate-*r*95.5%
*-commutative95.5%
associate-*l*95.6%
Simplified95.6%
*-commutative95.6%
*-commutative95.6%
associate-*r*95.5%
sqrt-div95.6%
metadata-eval95.6%
div-inv95.7%
clear-num95.6%
un-div-inv95.6%
div-inv95.7%
metadata-eval95.7%
Applied egg-rr95.7%
*-commutative95.7%
associate-/r*95.7%
Simplified95.7%
if -9.9999999999999999e51 < y < 8.00000000000000024e40Initial 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 99.0%
div-inv99.0%
clear-num99.1%
div-inv99.1%
metadata-eval99.1%
Applied egg-rr99.1%
if 8.00000000000000024e40 < 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.3%
fmm-def99.3%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 93.9%
associate-*r*93.9%
*-commutative93.9%
associate-*l*93.9%
Simplified93.9%
*-commutative93.9%
*-commutative93.9%
associate-*r*93.9%
sqrt-div93.7%
metadata-eval93.7%
div-inv93.8%
clear-num93.7%
un-div-inv93.7%
div-inv93.9%
metadata-eval93.9%
Applied egg-rr93.9%
Final simplification97.2%
(FPCore (x y) :precision binary64 (if (<= x 6.0) (/ (+ 0.1111111111111111 (* 0.3333333333333333 (* y (sqrt x)))) (- x)) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))))
double code(double x, double y) {
double tmp;
if (x <= 6.0) {
tmp = (0.1111111111111111 + (0.3333333333333333 * (y * sqrt(x)))) / -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 (x <= 6.0d0) then
tmp = (0.1111111111111111d0 + (0.3333333333333333d0 * (y * sqrt(x)))) / -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 (x <= 6.0) {
tmp = (0.1111111111111111 + (0.3333333333333333 * (y * Math.sqrt(x)))) / -x;
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 6.0: tmp = (0.1111111111111111 + (0.3333333333333333 * (y * math.sqrt(x)))) / -x else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (x <= 6.0) tmp = Float64(Float64(0.1111111111111111 + Float64(0.3333333333333333 * Float64(y * sqrt(x)))) / Float64(-x)); 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 (x <= 6.0) tmp = (0.1111111111111111 + (0.3333333333333333 * (y * sqrt(x)))) / -x; else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 6.0], N[(N[(0.1111111111111111 + N[(0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-x)), $MachinePrecision], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6:\\
\;\;\;\;\frac{0.1111111111111111 + 0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right)}{-x}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 6Initial program 99.6%
Taylor expanded in x around 0 98.6%
mul-1-neg98.6%
*-commutative98.6%
Simplified98.6%
if 6 < x Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fmm-def99.7%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.8%
associate-*r*98.9%
*-commutative98.9%
associate-*l*98.9%
Simplified98.9%
*-commutative98.9%
sqrt-div98.9%
metadata-eval98.9%
un-div-inv98.9%
*-commutative98.9%
Applied egg-rr98.9%
associate-/l*99.0%
Simplified99.0%
Final simplification98.8%
(FPCore (x y) :precision binary64 (if (<= x 6.0) (/ (+ 0.1111111111111111 (* y (* 0.3333333333333333 (sqrt x)))) (- x)) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x))))))
double code(double x, double y) {
double tmp;
if (x <= 6.0) {
tmp = (0.1111111111111111 + (y * (0.3333333333333333 * sqrt(x)))) / -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 (x <= 6.0d0) then
tmp = (0.1111111111111111d0 + (y * (0.3333333333333333d0 * sqrt(x)))) / -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 (x <= 6.0) {
tmp = (0.1111111111111111 + (y * (0.3333333333333333 * Math.sqrt(x)))) / -x;
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 6.0: tmp = (0.1111111111111111 + (y * (0.3333333333333333 * math.sqrt(x)))) / -x else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (x <= 6.0) tmp = Float64(Float64(0.1111111111111111 + Float64(y * Float64(0.3333333333333333 * sqrt(x)))) / Float64(-x)); 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 (x <= 6.0) tmp = (0.1111111111111111 + (y * (0.3333333333333333 * sqrt(x)))) / -x; else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 6.0], N[(N[(0.1111111111111111 + N[(y * N[(0.3333333333333333 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-x)), $MachinePrecision], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 6:\\
\;\;\;\;\frac{0.1111111111111111 + y \cdot \left(0.3333333333333333 \cdot \sqrt{x}\right)}{-x}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 6Initial program 99.6%
Taylor expanded in x around 0 98.6%
mul-1-neg98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in y around 0 98.6%
associate-*r*98.6%
*-commutative98.6%
Simplified98.6%
if 6 < x Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fmm-def99.7%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.8%
associate-*r*98.9%
*-commutative98.9%
associate-*l*98.9%
Simplified98.9%
*-commutative98.9%
sqrt-div98.9%
metadata-eval98.9%
un-div-inv98.9%
*-commutative98.9%
Applied egg-rr98.9%
associate-/l*99.0%
Simplified99.0%
Final simplification98.8%
(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.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(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.5%
metadata-eval99.5%
Simplified99.5%
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%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
associate-+l-99.5%
cancel-sign-sub-inv99.5%
metadata-eval99.5%
metadata-eval99.5%
times-frac99.6%
*-un-lft-identity99.6%
associate--r+99.6%
div-inv99.6%
cancel-sign-sub-inv99.6%
metadata-eval99.6%
div-inv99.6%
+-commutative99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.1111111111111111 (/ -1.0 x))))
double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end function
public static double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
def code(x, y): return 1.0 + (0.1111111111111111 * (-1.0 / x))
function code(x, y) return Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))) end
function tmp = code(x, y) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end
code[x_, y_] := N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.1111111111111111 \cdot \frac{-1}{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.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 60.1%
Final simplification60.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%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 60.1%
div-inv60.0%
clear-num60.1%
div-inv60.1%
metadata-eval60.1%
Applied egg-rr60.1%
Final simplification60.1%
(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%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fmm-def99.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 60.0%
Final simplification60.0%
(FPCore (x y) :precision binary64 (/ 0.1111111111111111 (- x)))
double code(double x, double y) {
return 0.1111111111111111 / -x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 0.1111111111111111d0 / -x
end function
public static double code(double x, double y) {
return 0.1111111111111111 / -x;
}
def code(x, y): return 0.1111111111111111 / -x
function code(x, y) return Float64(0.1111111111111111 / Float64(-x)) end
function tmp = code(x, y) tmp = 0.1111111111111111 / -x; end
code[x_, y_] := N[(0.1111111111111111 / (-x)), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.1111111111111111}{-x}
\end{array}
Initial program 99.7%
Taylor expanded in x around 0 64.3%
mul-1-neg64.3%
*-commutative64.3%
Simplified64.3%
Taylor expanded in y around 0 30.9%
Final simplification30.9%
(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 2024115
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))