
(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 (* 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 -2.8e+27) (not (<= y 8.8e+49))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -2.8e+27) || !(y <= 8.8e+49)) {
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 <= (-2.8d+27)) .or. (.not. (y <= 8.8d+49))) 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 <= -2.8e+27) || !(y <= 8.8e+49)) {
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 <= -2.8e+27) or not (y <= 8.8e+49): 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 <= -2.8e+27) || !(y <= 8.8e+49)) 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 <= -2.8e+27) || ~((y <= 8.8e+49))) 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, -2.8e+27], N[Not[LessEqual[y, 8.8e+49]], $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 -2.8 \cdot 10^{+27} \lor \neg \left(y \leq 8.8 \cdot 10^{+49}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -2.7999999999999999e27 or 8.8000000000000003e49 < y Initial program 99.5%
sub-neg99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
distribute-frac-neg99.4%
neg-mul-199.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 91.0%
if -2.7999999999999999e27 < y < 8.8000000000000003e49Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
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 0 97.0%
associate-*r/97.1%
metadata-eval97.1%
Simplified97.1%
div-inv97.0%
*-commutative97.0%
Applied egg-rr97.0%
inv-pow97.0%
metadata-eval97.0%
unpow-prod-down97.1%
unpow-197.1%
Applied egg-rr97.1%
Final simplification94.7%
(FPCore (x y)
:precision binary64
(if (<= y -9.5e+27)
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x))))
(if (<= y 9.2e+49)
(+ 1.0 (/ -1.0 (* x 9.0)))
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y))))))
double code(double x, double y) {
double tmp;
if (y <= -9.5e+27) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else if (y <= 9.2e+49) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-9.5d+27)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else if (y <= 9.2d+49) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -9.5e+27) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else if (y <= 9.2e+49) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -9.5e+27: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) elif y <= 9.2e+49: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) return tmp
function code(x, y) tmp = 0.0 if (y <= -9.5e+27) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); elseif (y <= 9.2e+49) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -9.5e+27) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); elseif (y <= 9.2e+49) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -9.5e+27], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+49], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+27}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+49}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\end{array}
\end{array}
if y < -9.4999999999999997e27Initial program 99.5%
sub-neg99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
distribute-frac-neg99.4%
neg-mul-199.4%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 89.2%
if -9.4999999999999997e27 < y < 9.20000000000000008e49Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
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 0 97.0%
associate-*r/97.1%
metadata-eval97.1%
Simplified97.1%
div-inv97.0%
*-commutative97.0%
Applied egg-rr97.0%
inv-pow97.0%
metadata-eval97.0%
unpow-prod-down97.1%
unpow-197.1%
Applied egg-rr97.1%
if 9.20000000000000008e49 < y Initial program 99.5%
sub-neg99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
distribute-frac-neg99.4%
neg-mul-199.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
clear-num99.5%
un-div-inv99.4%
Applied egg-rr99.4%
Taylor expanded in x around inf 93.4%
Final simplification94.7%
(FPCore (x y)
:precision binary64
(if (<= y -9.2e+114)
(* y (/ -0.3333333333333333 (sqrt x)))
(if (<= y 3.7e+50)
(+ 1.0 (/ -1.0 (* x 9.0)))
(* (pow x -0.5) (* y -0.3333333333333333)))))
double code(double x, double y) {
double tmp;
if (y <= -9.2e+114) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else if (y <= 3.7e+50) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 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 <= (-9.2d+114)) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else if (y <= 3.7d+50) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = (x ** (-0.5d0)) * (y * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -9.2e+114) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else if (y <= 3.7e+50) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = Math.pow(x, -0.5) * (y * -0.3333333333333333);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -9.2e+114: tmp = y * (-0.3333333333333333 / math.sqrt(x)) elif y <= 3.7e+50: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = math.pow(x, -0.5) * (y * -0.3333333333333333) return tmp
function code(x, y) tmp = 0.0 if (y <= -9.2e+114) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); elseif (y <= 3.7e+50) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64((x ^ -0.5) * Float64(y * -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -9.2e+114) tmp = y * (-0.3333333333333333 / sqrt(x)); elseif (y <= 3.7e+50) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (x ^ -0.5) * (y * -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -9.2e+114], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+50], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+114}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+50}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if y < -9.2000000000000001e114Initial 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.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 97.1%
associate-*r*97.2%
Simplified97.2%
sqrt-div97.4%
metadata-eval97.4%
div-inv97.4%
Applied egg-rr97.4%
if -9.2000000000000001e114 < y < 3.7000000000000001e50Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
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 0 92.7%
associate-*r/92.8%
metadata-eval92.8%
Simplified92.8%
div-inv92.7%
*-commutative92.7%
Applied egg-rr92.7%
inv-pow92.7%
metadata-eval92.7%
unpow-prod-down92.8%
unpow-192.8%
Applied egg-rr92.8%
if 3.7000000000000001e50 < y Initial 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.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 90.4%
associate-*r*90.5%
sqrt-div90.5%
metadata-eval90.5%
div-inv90.5%
associate-/r/90.6%
Applied egg-rr90.6%
associate-/r/90.5%
div-inv90.5%
metadata-eval90.5%
sqrt-div90.5%
associate-*r*90.4%
*-commutative90.4%
associate-*l*90.6%
inv-pow90.6%
sqrt-pow190.7%
metadata-eval90.7%
Applied egg-rr90.7%
Final simplification93.2%
(FPCore (x y) :precision binary64 (if (or (<= y -9.2e+114) (not (<= y 4.9e+50))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -9.2e+114) || !(y <= 4.9e+50)) {
tmp = 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 <= (-9.2d+114)) .or. (.not. (y <= 4.9d+50))) then
tmp = 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 <= -9.2e+114) || !(y <= 4.9e+50)) {
tmp = 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 <= -9.2e+114) or not (y <= 4.9e+50): tmp = 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 <= -9.2e+114) || !(y <= 4.9e+50)) tmp = 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 <= -9.2e+114) || ~((y <= 4.9e+50))) tmp = 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, -9.2e+114], N[Not[LessEqual[y, 4.9e+50]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / 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 -9.2 \cdot 10^{+114} \lor \neg \left(y \leq 4.9 \cdot 10^{+50}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -9.2000000000000001e114 or 4.9000000000000002e50 < 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.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 93.6%
associate-*r*93.7%
Simplified93.7%
sqrt-div93.8%
metadata-eval93.8%
div-inv93.9%
Applied egg-rr93.9%
if -9.2000000000000001e114 < y < 4.9000000000000002e50Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
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 0 92.7%
associate-*r/92.8%
metadata-eval92.8%
Simplified92.8%
div-inv92.7%
*-commutative92.7%
Applied egg-rr92.7%
inv-pow92.7%
metadata-eval92.7%
unpow-prod-down92.8%
unpow-192.8%
Applied egg-rr92.8%
Final simplification93.2%
(FPCore (x y) :precision binary64 (if (or (<= y -9.2e+114) (not (<= y 4.9e+50))) (* -0.3333333333333333 (/ y (sqrt x))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -9.2e+114) || !(y <= 4.9e+50)) {
tmp = -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 <= (-9.2d+114)) .or. (.not. (y <= 4.9d+50))) then
tmp = (-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 <= -9.2e+114) || !(y <= 4.9e+50)) {
tmp = -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 <= -9.2e+114) or not (y <= 4.9e+50): tmp = -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 <= -9.2e+114) || !(y <= 4.9e+50)) tmp = 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 <= -9.2e+114) || ~((y <= 4.9e+50))) tmp = -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, -9.2e+114], N[Not[LessEqual[y, 4.9e+50]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / 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 -9.2 \cdot 10^{+114} \lor \neg \left(y \leq 4.9 \cdot 10^{+50}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -9.2000000000000001e114 or 4.9000000000000002e50 < 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.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 93.6%
*-commutative93.6%
sqrt-div93.7%
metadata-eval93.7%
div-inv93.8%
Applied egg-rr93.8%
if -9.2000000000000001e114 < y < 4.9000000000000002e50Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
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 0 92.7%
associate-*r/92.8%
metadata-eval92.8%
Simplified92.8%
div-inv92.7%
*-commutative92.7%
Applied egg-rr92.7%
inv-pow92.7%
metadata-eval92.7%
unpow-prod-down92.8%
unpow-192.8%
Applied egg-rr92.8%
Final simplification93.1%
(FPCore (x y)
:precision binary64
(if (<= y -9.2e+114)
(* y (/ -0.3333333333333333 (sqrt x)))
(if (<= y 4.8e+50)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/ -0.3333333333333333 (/ (sqrt x) y)))))
double code(double x, double y) {
double tmp;
if (y <= -9.2e+114) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else if (y <= 4.8e+50) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = -0.3333333333333333 / (sqrt(x) / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-9.2d+114)) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else if (y <= 4.8d+50) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = (-0.3333333333333333d0) / (sqrt(x) / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -9.2e+114) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else if (y <= 4.8e+50) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = -0.3333333333333333 / (Math.sqrt(x) / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -9.2e+114: tmp = y * (-0.3333333333333333 / math.sqrt(x)) elif y <= 4.8e+50: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = -0.3333333333333333 / (math.sqrt(x) / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -9.2e+114) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); elseif (y <= 4.8e+50) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(-0.3333333333333333 / Float64(sqrt(x) / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -9.2e+114) tmp = y * (-0.3333333333333333 / sqrt(x)); elseif (y <= 4.8e+50) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = -0.3333333333333333 / (sqrt(x) / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -9.2e+114], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+50], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+114}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+50}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\end{array}
\end{array}
if y < -9.2000000000000001e114Initial 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.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 97.1%
associate-*r*97.2%
Simplified97.2%
sqrt-div97.4%
metadata-eval97.4%
div-inv97.4%
Applied egg-rr97.4%
if -9.2000000000000001e114 < y < 4.8000000000000004e50Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
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 0 92.7%
associate-*r/92.8%
metadata-eval92.8%
Simplified92.8%
div-inv92.7%
*-commutative92.7%
Applied egg-rr92.7%
inv-pow92.7%
metadata-eval92.7%
unpow-prod-down92.8%
unpow-192.8%
Applied egg-rr92.8%
if 4.8000000000000004e50 < y Initial 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.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 90.4%
associate-*r*90.5%
sqrt-div90.5%
metadata-eval90.5%
div-inv90.5%
associate-/r/90.6%
Applied egg-rr90.6%
Final simplification93.2%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ (- (* -0.3333333333333333 (* y (sqrt x))) 0.1111111111111111) x) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x))))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / 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.3333333333333333d0) * (y * sqrt(x))) - 0.1111111111111111d0) / x
else
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * Math.sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = ((-0.3333333333333333 * (y * math.sqrt(x))) - 0.1111111111111111) / x else: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(Float64(-0.3333333333333333 * Float64(y * sqrt(x))) - 0.1111111111111111) / x); else tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x; else tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(N[(-0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
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 x around 0 98.4%
if 0.110000000000000001 < 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.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 98.6%
Final simplification98.5%
(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.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
(FPCore (x y)
:precision binary64
(if (<= y 1.35e+154)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/
(- 1.0 (/ (/ 0.012345679012345678 x) x))
(+ 1.0 (/ 0.1111111111111111 x)))))
double code(double x, double y) {
double tmp;
if (y <= 1.35e+154) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (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.35d+154) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = (1.0d0 - ((0.012345679012345678d0 / x) / x)) / (1.0d0 + (0.1111111111111111d0 / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.35e+154) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 + (0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.35e+154: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 + (0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.35e+154) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(Float64(1.0 - Float64(Float64(0.012345679012345678 / x) / x)) / Float64(1.0 + Float64(0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.35e+154) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 + (0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.35e+154], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(0.012345679012345678 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{\frac{0.012345679012345678}{x}}{x}}{1 + \frac{0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 1.35000000000000003e154Initial 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.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 0 72.5%
associate-*r/72.5%
metadata-eval72.5%
Simplified72.5%
div-inv72.5%
*-commutative72.5%
Applied egg-rr72.5%
inv-pow72.5%
metadata-eval72.5%
unpow-prod-down72.6%
unpow-172.6%
Applied egg-rr72.6%
if 1.35000000000000003e154 < y Initial 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.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.3%
associate-*r/3.3%
metadata-eval3.3%
Simplified3.3%
div-inv3.3%
*-commutative3.3%
Applied egg-rr3.3%
inv-pow3.3%
metadata-eval3.3%
unpow-prod-down3.3%
sub-neg3.3%
flip-+19.5%
metadata-eval19.5%
unpow-119.5%
*-commutative19.5%
associate-/r*19.5%
metadata-eval19.5%
distribute-neg-frac19.5%
metadata-eval19.5%
unpow-119.5%
*-commutative19.5%
associate-/r*19.5%
metadata-eval19.5%
distribute-neg-frac19.5%
metadata-eval19.5%
Applied egg-rr19.5%
associate-*l/19.5%
associate-*r/19.5%
metadata-eval19.5%
sub-neg19.5%
distribute-neg-frac19.5%
metadata-eval19.5%
Simplified19.5%
Final simplification66.6%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
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.11d0) 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.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) 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.11) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
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 x around 0 98.4%
Taylor expanded in y around 0 66.5%
if 0.110000000000000001 < 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.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 0 61.9%
associate-*r/61.9%
metadata-eval61.9%
Simplified61.9%
Taylor expanded in x around inf 60.9%
(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%
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.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 0 64.7%
associate-*r/64.7%
metadata-eval64.7%
Simplified64.7%
div-inv64.7%
*-commutative64.7%
Applied egg-rr64.7%
inv-pow64.7%
metadata-eval64.7%
unpow-prod-down64.7%
unpow-164.7%
Applied egg-rr64.7%
Final simplification64.7%
(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.7%
fmm-def99.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 0 64.7%
associate-*r/64.7%
metadata-eval64.7%
Simplified64.7%
(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%
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.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 0 64.7%
associate-*r/64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in x around inf 31.4%
(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 2024186
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(! :herbie-platform default (- (- 1 (/ (/ 1 x) 9)) (/ y (* 3 (sqrt x)))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))