
(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 (+ 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(1.0 + Float64(Float64(-1.0 / Float64(x * 9.0)) - Float64(Float64(y / 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[(1.0 + N[(N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(N[(y / 3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(\frac{-1}{x \cdot 9} - \frac{\frac{y}{3}}{\sqrt{x}}\right)
\end{array}
Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
+-commutative99.7%
associate-/r*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(if (<= y -3.2e+65)
(+ 1.0 (/ y (* (sqrt x) -3.0)))
(if (<= y 4.6e+39)
(+ 1.0 (pow (* x -9.0) -1.0))
(+ 1.0 (* (pow x -0.5) (/ y -3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -3.2e+65) {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
} else if (y <= 4.6e+39) {
tmp = 1.0 + pow((x * -9.0), -1.0);
} else {
tmp = 1.0 + (pow(x, -0.5) * (y / -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 <= (-3.2d+65)) then
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
else if (y <= 4.6d+39) then
tmp = 1.0d0 + ((x * (-9.0d0)) ** (-1.0d0))
else
tmp = 1.0d0 + ((x ** (-0.5d0)) * (y / (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.2e+65) {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
} else if (y <= 4.6e+39) {
tmp = 1.0 + Math.pow((x * -9.0), -1.0);
} else {
tmp = 1.0 + (Math.pow(x, -0.5) * (y / -3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.2e+65: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) elif y <= 4.6e+39: tmp = 1.0 + math.pow((x * -9.0), -1.0) else: tmp = 1.0 + (math.pow(x, -0.5) * (y / -3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.2e+65) tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); elseif (y <= 4.6e+39) tmp = Float64(1.0 + (Float64(x * -9.0) ^ -1.0)); else tmp = Float64(1.0 + Float64((x ^ -0.5) * Float64(y / -3.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.2e+65) tmp = 1.0 + (y / (sqrt(x) * -3.0)); elseif (y <= 4.6e+39) tmp = 1.0 + ((x * -9.0) ^ -1.0); else tmp = 1.0 + ((x ^ -0.5) * (y / -3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.2e+65], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+39], N[(1.0 + N[Power[N[(x * -9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Power[x, -0.5], $MachinePrecision] * N[(y / -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+65}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+39}:\\
\;\;\;\;1 + {\left(x \cdot -9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 + {x}^{-0.5} \cdot \frac{y}{-3}\\
\end{array}
\end{array}
if y < -3.20000000000000007e65Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.5%
fma-def99.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 97.1%
associate-*r*97.0%
Simplified97.0%
expm1-log1p-u90.3%
expm1-udef90.3%
associate-*l*90.3%
sqrt-div90.3%
metadata-eval90.3%
un-div-inv90.3%
Applied egg-rr90.3%
expm1-def90.3%
expm1-log1p97.2%
metadata-eval97.2%
times-frac97.3%
neg-mul-197.3%
*-commutative97.3%
distribute-frac-neg97.3%
*-commutative97.3%
remove-double-neg97.3%
neg-mul-197.3%
times-frac97.2%
metadata-eval97.2%
metadata-eval97.2%
times-frac97.3%
*-commutative97.3%
associate-*l/97.2%
*-commutative97.2%
distribute-lft-neg-out97.2%
remove-double-neg97.2%
*-commutative97.2%
associate-/r*97.2%
metadata-eval97.2%
Simplified97.2%
associate-*r/97.1%
associate-*l/97.2%
expm1-log1p-u90.3%
expm1-udef90.3%
associate-*l/90.3%
associate-*r/90.3%
clear-num90.3%
un-div-inv90.3%
div-inv90.3%
metadata-eval90.3%
Applied egg-rr90.3%
expm1-def90.3%
expm1-log1p97.3%
Simplified97.3%
if -3.20000000000000007e65 < y < 4.60000000000000024e39Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-def99.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 97.6%
cancel-sign-sub-inv97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
clear-num97.6%
inv-pow97.6%
div-inv97.8%
metadata-eval97.8%
Applied egg-rr97.8%
if 4.60000000000000024e39 < y Initial program 99.4%
associate--l-99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
distribute-neg-frac99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.6%
fma-def99.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 inf 89.7%
associate-*r*89.7%
Simplified89.7%
expm1-log1p-u1.8%
expm1-udef1.8%
associate-*l*1.8%
sqrt-div1.8%
metadata-eval1.8%
un-div-inv1.8%
Applied egg-rr1.8%
expm1-def1.8%
expm1-log1p89.7%
metadata-eval89.7%
times-frac89.8%
neg-mul-189.8%
*-commutative89.8%
distribute-frac-neg89.8%
*-commutative89.8%
remove-double-neg89.8%
neg-mul-189.8%
times-frac89.7%
metadata-eval89.7%
metadata-eval89.7%
times-frac89.8%
*-commutative89.8%
associate-*l/90.0%
*-commutative90.0%
distribute-lft-neg-out90.0%
remove-double-neg90.0%
*-commutative90.0%
associate-/r*89.9%
metadata-eval89.9%
Simplified89.9%
associate-*r/89.9%
associate-*l/89.7%
expm1-log1p-u1.8%
expm1-udef1.8%
associate-*l/1.8%
associate-*r/1.8%
clear-num1.8%
un-div-inv1.8%
div-inv1.8%
metadata-eval1.8%
Applied egg-rr1.8%
expm1-def1.8%
expm1-log1p89.8%
Simplified89.8%
*-un-lft-identity89.8%
times-frac89.9%
metadata-eval89.9%
sqrt-div89.9%
inv-pow89.9%
sqrt-pow190.0%
metadata-eval90.0%
Applied egg-rr90.0%
Final simplification96.0%
(FPCore (x y) :precision binary64 (if (or (<= y -4.1e+65) (not (<= y 2.9e+32))) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))) (+ 1.0 (pow (* x -9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -4.1e+65) || !(y <= 2.9e+32)) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else {
tmp = 1.0 + pow((x * -9.0), -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-4.1d+65)) .or. (.not. (y <= 2.9d+32))) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else
tmp = 1.0d0 + ((x * (-9.0d0)) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -4.1e+65) || !(y <= 2.9e+32)) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else {
tmp = 1.0 + Math.pow((x * -9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -4.1e+65) or not (y <= 2.9e+32): tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) else: tmp = 1.0 + math.pow((x * -9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -4.1e+65) || !(y <= 2.9e+32)) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); else tmp = Float64(1.0 + (Float64(x * -9.0) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -4.1e+65) || ~((y <= 2.9e+32))) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); else tmp = 1.0 + ((x * -9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -4.1e+65], N[Not[LessEqual[y, 2.9e+32]], $MachinePrecision]], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[Power[N[(x * -9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+65} \lor \neg \left(y \leq 2.9 \cdot 10^{+32}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + {\left(x \cdot -9\right)}^{-1}\\
\end{array}
\end{array}
if y < -4.1000000000000001e65 or 2.90000000000000003e32 < y Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-neg-frac99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
fma-def99.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 93.0%
associate-*r*92.9%
Simplified92.9%
expm1-log1p-u40.6%
expm1-udef40.6%
associate-*l*40.6%
sqrt-div40.6%
metadata-eval40.6%
un-div-inv40.6%
Applied egg-rr40.6%
expm1-def40.6%
expm1-log1p93.0%
metadata-eval93.0%
times-frac93.1%
neg-mul-193.1%
*-commutative93.1%
distribute-frac-neg93.1%
*-commutative93.1%
remove-double-neg93.1%
neg-mul-193.1%
times-frac93.0%
metadata-eval93.0%
metadata-eval93.0%
times-frac93.1%
*-commutative93.1%
associate-*l/93.1%
*-commutative93.1%
distribute-lft-neg-out93.1%
remove-double-neg93.1%
*-commutative93.1%
associate-/r*93.1%
metadata-eval93.1%
Simplified93.1%
if -4.1000000000000001e65 < y < 2.90000000000000003e32Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-def99.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 97.6%
cancel-sign-sub-inv97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
clear-num97.6%
inv-pow97.6%
div-inv97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Final simplification96.0%
(FPCore (x y)
:precision binary64
(if (<= y -3.9e+65)
(+ 1.0 (/ y (* (sqrt x) -3.0)))
(if (<= y 6e+37)
(+ 1.0 (pow (* x -9.0) -1.0))
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -3.9e+65) {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
} else if (y <= 6e+37) {
tmp = 1.0 + pow((x * -9.0), -1.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 <= (-3.9d+65)) then
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
else if (y <= 6d+37) then
tmp = 1.0d0 + ((x * (-9.0d0)) ** (-1.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 <= -3.9e+65) {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
} else if (y <= 6e+37) {
tmp = 1.0 + Math.pow((x * -9.0), -1.0);
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.9e+65: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) elif y <= 6e+37: tmp = 1.0 + math.pow((x * -9.0), -1.0) else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.9e+65) tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); elseif (y <= 6e+37) tmp = Float64(1.0 + (Float64(x * -9.0) ^ -1.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 <= -3.9e+65) tmp = 1.0 + (y / (sqrt(x) * -3.0)); elseif (y <= 6e+37) tmp = 1.0 + ((x * -9.0) ^ -1.0); else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.9e+65], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+37], N[(1.0 + N[Power[N[(x * -9.0), $MachinePrecision], -1.0], $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 -3.9 \cdot 10^{+65}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+37}:\\
\;\;\;\;1 + {\left(x \cdot -9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -3.8999999999999998e65Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.5%
fma-def99.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 97.1%
associate-*r*97.0%
Simplified97.0%
expm1-log1p-u90.3%
expm1-udef90.3%
associate-*l*90.3%
sqrt-div90.3%
metadata-eval90.3%
un-div-inv90.3%
Applied egg-rr90.3%
expm1-def90.3%
expm1-log1p97.2%
metadata-eval97.2%
times-frac97.3%
neg-mul-197.3%
*-commutative97.3%
distribute-frac-neg97.3%
*-commutative97.3%
remove-double-neg97.3%
neg-mul-197.3%
times-frac97.2%
metadata-eval97.2%
metadata-eval97.2%
times-frac97.3%
*-commutative97.3%
associate-*l/97.2%
*-commutative97.2%
distribute-lft-neg-out97.2%
remove-double-neg97.2%
*-commutative97.2%
associate-/r*97.2%
metadata-eval97.2%
Simplified97.2%
associate-*r/97.1%
associate-*l/97.2%
expm1-log1p-u90.3%
expm1-udef90.3%
associate-*l/90.3%
associate-*r/90.3%
clear-num90.3%
un-div-inv90.3%
div-inv90.3%
metadata-eval90.3%
Applied egg-rr90.3%
expm1-def90.3%
expm1-log1p97.3%
Simplified97.3%
if -3.8999999999999998e65 < y < 6.00000000000000043e37Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-def99.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 97.6%
cancel-sign-sub-inv97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
clear-num97.6%
inv-pow97.6%
div-inv97.8%
metadata-eval97.8%
Applied egg-rr97.8%
if 6.00000000000000043e37 < y Initial program 99.4%
associate--l-99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
distribute-neg-frac99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.6%
fma-def99.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 inf 89.7%
associate-*r*89.7%
Simplified89.7%
expm1-log1p-u1.8%
expm1-udef1.8%
associate-*l*1.8%
sqrt-div1.8%
metadata-eval1.8%
un-div-inv1.8%
Applied egg-rr1.8%
expm1-def1.8%
expm1-log1p89.7%
metadata-eval89.7%
times-frac89.8%
neg-mul-189.8%
*-commutative89.8%
distribute-frac-neg89.8%
*-commutative89.8%
remove-double-neg89.8%
neg-mul-189.8%
times-frac89.7%
metadata-eval89.7%
metadata-eval89.7%
times-frac89.8%
*-commutative89.8%
associate-*l/90.0%
*-commutative90.0%
distribute-lft-neg-out90.0%
remove-double-neg90.0%
*-commutative90.0%
associate-/r*89.9%
metadata-eval89.9%
Simplified89.9%
Final simplification96.0%
(FPCore (x y)
:precision binary64
(if (<= y -3.2e+65)
(+ 1.0 (/ y (* (sqrt x) -3.0)))
(if (<= y 2.3e+38)
(+ 1.0 (pow (* x -9.0) -1.0))
(+ 1.0 (/ (/ y -3.0) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -3.2e+65) {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
} else if (y <= 2.3e+38) {
tmp = 1.0 + pow((x * -9.0), -1.0);
} 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 (y <= (-3.2d+65)) then
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
else if (y <= 2.3d+38) then
tmp = 1.0d0 + ((x * (-9.0d0)) ** (-1.0d0))
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 (y <= -3.2e+65) {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
} else if (y <= 2.3e+38) {
tmp = 1.0 + Math.pow((x * -9.0), -1.0);
} else {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.2e+65: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) elif y <= 2.3e+38: tmp = 1.0 + math.pow((x * -9.0), -1.0) else: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.2e+65) tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); elseif (y <= 2.3e+38) tmp = Float64(1.0 + (Float64(x * -9.0) ^ -1.0)); 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 (y <= -3.2e+65) tmp = 1.0 + (y / (sqrt(x) * -3.0)); elseif (y <= 2.3e+38) tmp = 1.0 + ((x * -9.0) ^ -1.0); else tmp = 1.0 + ((y / -3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.2e+65], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+38], N[(1.0 + N[Power[N[(x * -9.0), $MachinePrecision], -1.0], $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}\;y \leq -3.2 \cdot 10^{+65}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+38}:\\
\;\;\;\;1 + {\left(x \cdot -9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -3.20000000000000007e65Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.5%
fma-def99.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 97.1%
associate-*r*97.0%
Simplified97.0%
expm1-log1p-u90.3%
expm1-udef90.3%
associate-*l*90.3%
sqrt-div90.3%
metadata-eval90.3%
un-div-inv90.3%
Applied egg-rr90.3%
expm1-def90.3%
expm1-log1p97.2%
metadata-eval97.2%
times-frac97.3%
neg-mul-197.3%
*-commutative97.3%
distribute-frac-neg97.3%
*-commutative97.3%
remove-double-neg97.3%
neg-mul-197.3%
times-frac97.2%
metadata-eval97.2%
metadata-eval97.2%
times-frac97.3%
*-commutative97.3%
associate-*l/97.2%
*-commutative97.2%
distribute-lft-neg-out97.2%
remove-double-neg97.2%
*-commutative97.2%
associate-/r*97.2%
metadata-eval97.2%
Simplified97.2%
associate-*r/97.1%
associate-*l/97.2%
expm1-log1p-u90.3%
expm1-udef90.3%
associate-*l/90.3%
associate-*r/90.3%
clear-num90.3%
un-div-inv90.3%
div-inv90.3%
metadata-eval90.3%
Applied egg-rr90.3%
expm1-def90.3%
expm1-log1p97.3%
Simplified97.3%
if -3.20000000000000007e65 < y < 2.3000000000000001e38Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-def99.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 97.6%
cancel-sign-sub-inv97.6%
metadata-eval97.6%
associate-*r/97.6%
metadata-eval97.6%
+-commutative97.6%
Simplified97.6%
clear-num97.6%
inv-pow97.6%
div-inv97.8%
metadata-eval97.8%
Applied egg-rr97.8%
if 2.3000000000000001e38 < y Initial program 99.4%
associate--l-99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
distribute-neg-frac99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.6%
fma-def99.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 inf 89.7%
associate-*r*89.7%
Simplified89.7%
expm1-log1p-u1.8%
expm1-udef1.8%
associate-*l*1.8%
sqrt-div1.8%
metadata-eval1.8%
un-div-inv1.8%
Applied egg-rr1.8%
expm1-def1.8%
expm1-log1p89.7%
metadata-eval89.7%
times-frac89.8%
neg-mul-189.8%
*-commutative89.8%
distribute-frac-neg89.8%
*-commutative89.8%
remove-double-neg89.8%
neg-mul-189.8%
times-frac89.7%
metadata-eval89.7%
metadata-eval89.7%
times-frac89.8%
*-commutative89.8%
associate-*l/90.0%
*-commutative90.0%
distribute-lft-neg-out90.0%
remove-double-neg90.0%
*-commutative90.0%
associate-/r*89.9%
metadata-eval89.9%
Simplified89.9%
associate-*r/89.9%
associate-*l/89.7%
expm1-log1p-u1.8%
expm1-udef1.8%
associate-*l/1.8%
associate-*r/1.8%
clear-num1.8%
un-div-inv1.8%
div-inv1.8%
metadata-eval1.8%
Applied egg-rr1.8%
expm1-def1.8%
expm1-log1p89.8%
Simplified89.8%
add-cube-cbrt88.7%
*-un-lft-identity88.7%
times-frac88.7%
pow288.7%
Applied egg-rr88.7%
/-rgt-identity88.7%
associate-*r/88.7%
*-commutative88.7%
unpow288.7%
rem-3cbrt-lft89.8%
associate-/r*89.9%
Simplified89.9%
Final simplification96.0%
(FPCore (x y) :precision binary64 (+ 1.0 (+ (* (/ y (sqrt x)) -0.3333333333333333) (/ -0.1111111111111111 x))))
double code(double x, double y) {
return 1.0 + (((y / sqrt(x)) * -0.3333333333333333) + (-0.1111111111111111 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (((y / sqrt(x)) * (-0.3333333333333333d0)) + ((-0.1111111111111111d0) / x))
end function
public static double code(double x, double y) {
return 1.0 + (((y / Math.sqrt(x)) * -0.3333333333333333) + (-0.1111111111111111 / x));
}
def code(x, y): return 1.0 + (((y / math.sqrt(x)) * -0.3333333333333333) + (-0.1111111111111111 / x))
function code(x, y) return Float64(1.0 + Float64(Float64(Float64(y / sqrt(x)) * -0.3333333333333333) + Float64(-0.1111111111111111 / x))) end
function tmp = code(x, y) tmp = 1.0 + (((y / sqrt(x)) * -0.3333333333333333) + (-0.1111111111111111 / x)); end
code[x_, y_] := N[(1.0 + N[(N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(\frac{y}{\sqrt{x}} \cdot -0.3333333333333333 + \frac{-0.1111111111111111}{x}\right)
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.6%
*-commutative99.6%
fma-def99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
fma-udef99.5%
Applied egg-rr99.5%
Final simplification99.5%
(FPCore (x y) :precision binary64 (- 1.0 (+ (/ (/ y 3.0) (sqrt x)) (/ 0.1111111111111111 x))))
double code(double x, double y) {
return 1.0 - (((y / 3.0) / sqrt(x)) + (0.1111111111111111 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (((y / 3.0d0) / sqrt(x)) + (0.1111111111111111d0 / x))
end function
public static double code(double x, double y) {
return 1.0 - (((y / 3.0) / Math.sqrt(x)) + (0.1111111111111111 / x));
}
def code(x, y): return 1.0 - (((y / 3.0) / math.sqrt(x)) + (0.1111111111111111 / x))
function code(x, y) return Float64(1.0 - Float64(Float64(Float64(y / 3.0) / sqrt(x)) + Float64(0.1111111111111111 / x))) end
function tmp = code(x, y) tmp = 1.0 - (((y / 3.0) / sqrt(x)) + (0.1111111111111111 / x)); end
code[x_, y_] := N[(1.0 - N[(N[(N[(y / 3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \left(\frac{\frac{y}{3}}{\sqrt{x}} + \frac{0.1111111111111111}{x}\right)
\end{array}
Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
+-commutative99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in x around 0 99.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%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (/ -0.1111111111111111 x) -1.0)))
(if (<= y 4.1e+104)
(+ 1.0 (pow (* x -9.0) -1.0))
(/ (- 1.0 (* t_0 t_0)) (- 1.0 t_0)))))
double code(double x, double y) {
double t_0 = (-0.1111111111111111 / x) + -1.0;
double tmp;
if (y <= 4.1e+104) {
tmp = 1.0 + pow((x * -9.0), -1.0);
} else {
tmp = (1.0 - (t_0 * t_0)) / (1.0 - 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 = ((-0.1111111111111111d0) / x) + (-1.0d0)
if (y <= 4.1d+104) then
tmp = 1.0d0 + ((x * (-9.0d0)) ** (-1.0d0))
else
tmp = (1.0d0 - (t_0 * t_0)) / (1.0d0 - t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (-0.1111111111111111 / x) + -1.0;
double tmp;
if (y <= 4.1e+104) {
tmp = 1.0 + Math.pow((x * -9.0), -1.0);
} else {
tmp = (1.0 - (t_0 * t_0)) / (1.0 - t_0);
}
return tmp;
}
def code(x, y): t_0 = (-0.1111111111111111 / x) + -1.0 tmp = 0 if y <= 4.1e+104: tmp = 1.0 + math.pow((x * -9.0), -1.0) else: tmp = (1.0 - (t_0 * t_0)) / (1.0 - t_0) return tmp
function code(x, y) t_0 = Float64(Float64(-0.1111111111111111 / x) + -1.0) tmp = 0.0 if (y <= 4.1e+104) tmp = Float64(1.0 + (Float64(x * -9.0) ^ -1.0)); else tmp = Float64(Float64(1.0 - Float64(t_0 * t_0)) / Float64(1.0 - t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = (-0.1111111111111111 / x) + -1.0; tmp = 0.0; if (y <= 4.1e+104) tmp = 1.0 + ((x * -9.0) ^ -1.0); else tmp = (1.0 - (t_0 * t_0)) / (1.0 - t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(-0.1111111111111111 / x), $MachinePrecision] + -1.0), $MachinePrecision]}, If[LessEqual[y, 4.1e+104], N[(1.0 + N[Power[N[(x * -9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-0.1111111111111111}{x} + -1\\
\mathbf{if}\;y \leq 4.1 \cdot 10^{+104}:\\
\;\;\;\;1 + {\left(x \cdot -9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - t_0 \cdot t_0}{1 - t_0}\\
\end{array}
\end{array}
if y < 4.09999999999999985e104Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.7%
fma-def99.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 75.4%
cancel-sign-sub-inv75.4%
metadata-eval75.4%
associate-*r/75.5%
metadata-eval75.5%
+-commutative75.5%
Simplified75.5%
clear-num75.4%
inv-pow75.4%
div-inv75.6%
metadata-eval75.6%
Applied egg-rr75.6%
if 4.09999999999999985e104 < y Initial program 99.4%
associate--l-99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
distribute-neg-frac99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.6%
fma-def99.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.7%
cancel-sign-sub-inv3.7%
metadata-eval3.7%
associate-*r/3.7%
metadata-eval3.7%
+-commutative3.7%
Simplified3.7%
Taylor expanded in x around 0 4.8%
div-inv4.8%
Applied egg-rr4.8%
div-inv4.8%
expm1-log1p-u1.7%
expm1-udef1.1%
log1p-udef1.1%
add-exp-log4.3%
associate--l+4.3%
flip-+18.3%
metadata-eval18.3%
sub-neg18.3%
metadata-eval18.3%
sub-neg18.3%
metadata-eval18.3%
sub-neg18.3%
metadata-eval18.3%
Applied egg-rr18.3%
Final simplification66.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (/ -0.1111111111111111 x) -1.0)))
(if (<= y 4.1e+104)
(+ 1.0 (/ -0.1111111111111111 x))
(/ (- 1.0 (* t_0 t_0)) (- 1.0 t_0)))))
double code(double x, double y) {
double t_0 = (-0.1111111111111111 / x) + -1.0;
double tmp;
if (y <= 4.1e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (t_0 * t_0)) / (1.0 - 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 = ((-0.1111111111111111d0) / x) + (-1.0d0)
if (y <= 4.1d+104) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - (t_0 * t_0)) / (1.0d0 - t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (-0.1111111111111111 / x) + -1.0;
double tmp;
if (y <= 4.1e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (t_0 * t_0)) / (1.0 - t_0);
}
return tmp;
}
def code(x, y): t_0 = (-0.1111111111111111 / x) + -1.0 tmp = 0 if y <= 4.1e+104: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - (t_0 * t_0)) / (1.0 - t_0) return tmp
function code(x, y) t_0 = Float64(Float64(-0.1111111111111111 / x) + -1.0) tmp = 0.0 if (y <= 4.1e+104) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - Float64(t_0 * t_0)) / Float64(1.0 - t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = (-0.1111111111111111 / x) + -1.0; tmp = 0.0; if (y <= 4.1e+104) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - (t_0 * t_0)) / (1.0 - t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(-0.1111111111111111 / x), $MachinePrecision] + -1.0), $MachinePrecision]}, If[LessEqual[y, 4.1e+104], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-0.1111111111111111}{x} + -1\\
\mathbf{if}\;y \leq 4.1 \cdot 10^{+104}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - t_0 \cdot t_0}{1 - t_0}\\
\end{array}
\end{array}
if y < 4.09999999999999985e104Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.7%
fma-def99.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 75.4%
cancel-sign-sub-inv75.4%
metadata-eval75.4%
associate-*r/75.5%
metadata-eval75.5%
+-commutative75.5%
Simplified75.5%
if 4.09999999999999985e104 < y Initial program 99.4%
associate--l-99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
distribute-neg-frac99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.6%
fma-def99.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.7%
cancel-sign-sub-inv3.7%
metadata-eval3.7%
associate-*r/3.7%
metadata-eval3.7%
+-commutative3.7%
Simplified3.7%
Taylor expanded in x around 0 4.8%
div-inv4.8%
Applied egg-rr4.8%
div-inv4.8%
expm1-log1p-u1.7%
expm1-udef1.1%
log1p-udef1.1%
add-exp-log4.3%
associate--l+4.3%
flip-+18.3%
metadata-eval18.3%
sub-neg18.3%
metadata-eval18.3%
sub-neg18.3%
metadata-eval18.3%
sub-neg18.3%
metadata-eval18.3%
Applied egg-rr18.3%
Final simplification66.5%
(FPCore (x y) :precision binary64 (if (<= x 125.0) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 125.0) {
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 <= 125.0d0) 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 <= 125.0) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 125.0: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 125.0) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 125.0) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 125.0], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 125:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 125Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.6%
fma-def99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around 0 69.8%
cancel-sign-sub-inv69.8%
metadata-eval69.8%
associate-*r/69.8%
metadata-eval69.8%
+-commutative69.8%
Simplified69.8%
Taylor expanded in x around 0 69.1%
if 125 < x Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-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 x around inf 58.6%
Final simplification63.2%
(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-neg-frac99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.7%
fma-def99.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 64.2%
cancel-sign-sub-inv64.2%
metadata-eval64.2%
associate-*r/64.2%
metadata-eval64.2%
+-commutative64.2%
Simplified64.2%
Final simplification64.2%
(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-neg-frac99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.7%
fma-def99.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 x around inf 33.3%
Final simplification33.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 2023185
(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)))))