
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
(FPCore (x y) :precision binary64 (- (+ 1.0 (/ -1.0 (* x 9.0))) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((-1.0d0) / (x * 9.0d0))) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y) :precision binary64 (if (or (<= y -1.05e+82) (not (<= y 1.9e+24))) (- 1.0 (* (/ y (sqrt x)) 0.3333333333333333)) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -1.05e+82) || !(y <= 1.9e+24)) {
tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333);
} 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 <= (-1.05d+82)) .or. (.not. (y <= 1.9d+24))) then
tmp = 1.0d0 - ((y / sqrt(x)) * 0.3333333333333333d0)
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 <= -1.05e+82) || !(y <= 1.9e+24)) {
tmp = 1.0 - ((y / Math.sqrt(x)) * 0.3333333333333333);
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.05e+82) or not (y <= 1.9e+24): tmp = 1.0 - ((y / math.sqrt(x)) * 0.3333333333333333) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.05e+82) || !(y <= 1.9e+24)) tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) * 0.3333333333333333)); 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 <= -1.05e+82) || ~((y <= 1.9e+24))) tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.05e+82], N[Not[LessEqual[y, 1.9e+24]], $MachinePrecision]], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $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 -1.05 \cdot 10^{+82} \lor \neg \left(y \leq 1.9 \cdot 10^{+24}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x}} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -1.05e82 or 1.90000000000000008e24 < y Initial program 99.6%
Taylor expanded in x around inf 95.0%
*-commutative95.0%
sqrt-div94.9%
metadata-eval94.9%
un-div-inv95.0%
Applied egg-rr95.0%
if -1.05e82 < y < 1.90000000000000008e24Initial 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%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.5%
metadata-eval97.5%
distribute-neg-frac97.5%
add-sqr-sqrt97.3%
sqrt-unprod70.9%
frac-times71.0%
metadata-eval71.0%
metadata-eval71.0%
frac-times70.9%
sqrt-unprod0.0%
add-sqr-sqrt45.5%
Applied egg-rr45.5%
add-sqr-sqrt0.0%
sqrt-unprod70.9%
frac-times71.0%
metadata-eval71.0%
metadata-eval71.0%
frac-times70.9%
sqrt-unprod97.3%
add-sqr-sqrt97.5%
clear-num97.5%
div-inv97.6%
metadata-eval97.6%
inv-pow97.6%
Applied egg-rr97.6%
Final simplification96.6%
(FPCore (x y) :precision binary64 (if (or (<= y -1.95e+82) (not (<= y 1.75e+24))) (- 1.0 (/ y (sqrt (* x 9.0)))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -1.95e+82) || !(y <= 1.75e+24)) {
tmp = 1.0 - (y / sqrt((x * 9.0)));
} 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 <= (-1.95d+82)) .or. (.not. (y <= 1.75d+24))) then
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
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 <= -1.95e+82) || !(y <= 1.75e+24)) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.95e+82) or not (y <= 1.75e+24): tmp = 1.0 - (y / math.sqrt((x * 9.0))) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.95e+82) || !(y <= 1.75e+24)) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); 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 <= -1.95e+82) || ~((y <= 1.75e+24))) tmp = 1.0 - (y / sqrt((x * 9.0))); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.95e+82], N[Not[LessEqual[y, 1.75e+24]], $MachinePrecision]], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $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 -1.95 \cdot 10^{+82} \lor \neg \left(y \leq 1.75 \cdot 10^{+24}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -1.94999999999999988e82 or 1.7500000000000001e24 < y Initial program 99.6%
Taylor expanded in x around inf 95.0%
metadata-eval95.0%
*-commutative95.0%
sqrt-div94.9%
metadata-eval94.9%
un-div-inv95.0%
times-frac95.9%
*-un-lft-identity95.9%
Applied egg-rr95.9%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr96.0%
unpow1/299.7%
Simplified96.0%
if -1.94999999999999988e82 < y < 1.7500000000000001e24Initial 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%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.5%
metadata-eval97.5%
distribute-neg-frac97.5%
add-sqr-sqrt97.3%
sqrt-unprod70.9%
frac-times71.0%
metadata-eval71.0%
metadata-eval71.0%
frac-times70.9%
sqrt-unprod0.0%
add-sqr-sqrt45.5%
Applied egg-rr45.5%
add-sqr-sqrt0.0%
sqrt-unprod70.9%
frac-times71.0%
metadata-eval71.0%
metadata-eval71.0%
frac-times70.9%
sqrt-unprod97.3%
add-sqr-sqrt97.5%
clear-num97.5%
div-inv97.6%
metadata-eval97.6%
inv-pow97.6%
Applied egg-rr97.6%
Final simplification97.0%
(FPCore (x y)
:precision binary64
(if (<= y -5e+92)
(/ y (* (sqrt x) -3.0))
(if (<= y 5.5e+93)
(+ 1.0 (/ -0.1111111111111111 x))
(* (sqrt (/ 1.0 x)) (* y -0.3333333333333333)))))
double code(double x, double y) {
double tmp;
if (y <= -5e+92) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 5.5e+93) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = sqrt((1.0 / x)) * (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 <= (-5d+92)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 5.5d+93) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = sqrt((1.0d0 / x)) * (y * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -5e+92) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 5.5e+93) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = Math.sqrt((1.0 / x)) * (y * -0.3333333333333333);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5e+92: tmp = y / (math.sqrt(x) * -3.0) elif y <= 5.5e+93: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = math.sqrt((1.0 / x)) * (y * -0.3333333333333333) return tmp
function code(x, y) tmp = 0.0 if (y <= -5e+92) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 5.5e+93) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(sqrt(Float64(1.0 / x)) * Float64(y * -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -5e+92) tmp = y / (sqrt(x) * -3.0); elseif (y <= 5.5e+93) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5e+92], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+93], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+92}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+93}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if y < -5.00000000000000022e92Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 94.7%
associate-*r*94.7%
*-commutative94.7%
*-commutative94.7%
unpow1/294.7%
unpow-194.7%
exp-to-pow89.4%
*-commutative89.4%
neg-mul-189.4%
exp-prod89.4%
distribute-lft-neg-out89.4%
exp-neg89.4%
exp-to-pow94.5%
unpow1/294.5%
unpow-194.5%
metadata-eval94.5%
associate-/l*94.7%
*-rgt-identity94.7%
unpow-194.7%
associate-/r*94.8%
*-commutative94.8%
associate-/r*94.6%
metadata-eval94.6%
Simplified94.6%
clear-num94.7%
un-div-inv94.7%
div-inv94.8%
metadata-eval94.8%
Applied egg-rr94.8%
if -5.00000000000000022e92 < y < 5.5000000000000003e93Initial 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%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.0%
if 5.5000000000000003e93 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 94.9%
*-commutative94.9%
associate-*l*97.1%
Simplified97.1%
Final simplification94.6%
(FPCore (x y)
:precision binary64
(if (<= y -5e+92)
(/ y (* (sqrt x) -3.0))
(if (<= y 1.05e+93)
(- 1.0 (pow (* x 9.0) -1.0))
(* (sqrt (/ 1.0 x)) (* y -0.3333333333333333)))))
double code(double x, double y) {
double tmp;
if (y <= -5e+92) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 1.05e+93) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = sqrt((1.0 / x)) * (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 <= (-5d+92)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 1.05d+93) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = sqrt((1.0d0 / x)) * (y * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -5e+92) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 1.05e+93) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = Math.sqrt((1.0 / x)) * (y * -0.3333333333333333);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5e+92: tmp = y / (math.sqrt(x) * -3.0) elif y <= 1.05e+93: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = math.sqrt((1.0 / x)) * (y * -0.3333333333333333) return tmp
function code(x, y) tmp = 0.0 if (y <= -5e+92) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 1.05e+93) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(sqrt(Float64(1.0 / x)) * Float64(y * -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -5e+92) tmp = y / (sqrt(x) * -3.0); elseif (y <= 1.05e+93) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5e+92], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+93], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+92}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+93}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if y < -5.00000000000000022e92Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 94.7%
associate-*r*94.7%
*-commutative94.7%
*-commutative94.7%
unpow1/294.7%
unpow-194.7%
exp-to-pow89.4%
*-commutative89.4%
neg-mul-189.4%
exp-prod89.4%
distribute-lft-neg-out89.4%
exp-neg89.4%
exp-to-pow94.5%
unpow1/294.5%
unpow-194.5%
metadata-eval94.5%
associate-/l*94.7%
*-rgt-identity94.7%
unpow-194.7%
associate-/r*94.8%
*-commutative94.8%
associate-/r*94.6%
metadata-eval94.6%
Simplified94.6%
clear-num94.7%
un-div-inv94.7%
div-inv94.8%
metadata-eval94.8%
Applied egg-rr94.8%
if -5.00000000000000022e92 < y < 1.0499999999999999e93Initial 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%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.0%
metadata-eval94.0%
distribute-neg-frac94.0%
add-sqr-sqrt93.9%
sqrt-unprod69.9%
frac-times70.0%
metadata-eval70.0%
metadata-eval70.0%
frac-times69.9%
sqrt-unprod0.0%
add-sqr-sqrt47.0%
Applied egg-rr47.0%
add-sqr-sqrt0.0%
sqrt-unprod69.9%
frac-times70.0%
metadata-eval70.0%
metadata-eval70.0%
frac-times69.9%
sqrt-unprod93.9%
add-sqr-sqrt94.0%
clear-num94.0%
div-inv94.1%
metadata-eval94.1%
inv-pow94.1%
Applied egg-rr94.1%
if 1.0499999999999999e93 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 94.9%
*-commutative94.9%
associate-*l*97.1%
Simplified97.1%
Final simplification94.7%
(FPCore (x y) :precision binary64 (if (or (<= y -5e+92) (not (<= y 9.5e+93))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -5e+92) || !(y <= 9.5e+93)) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-5d+92)) .or. (.not. (y <= 9.5d+93))) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -5e+92) || !(y <= 9.5e+93)) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5e+92) or not (y <= 9.5e+93): tmp = y * (-0.3333333333333333 / math.sqrt(x)) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5e+92) || !(y <= 9.5e+93)) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -5e+92) || ~((y <= 9.5e+93))) tmp = y * (-0.3333333333333333 / sqrt(x)); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5e+92], N[Not[LessEqual[y, 9.5e+93]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+92} \lor \neg \left(y \leq 9.5 \cdot 10^{+93}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -5.00000000000000022e92 or 9.4999999999999991e93 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 94.8%
associate-*r*95.8%
*-commutative95.8%
*-commutative95.8%
unpow1/295.8%
unpow-195.8%
exp-to-pow90.7%
*-commutative90.7%
neg-mul-190.7%
exp-prod90.7%
distribute-lft-neg-out90.7%
exp-neg90.7%
exp-to-pow95.7%
unpow1/295.7%
unpow-195.7%
metadata-eval95.7%
associate-/l*95.8%
*-rgt-identity95.8%
unpow-195.8%
associate-/r*95.9%
*-commutative95.9%
associate-/r*95.8%
metadata-eval95.8%
Simplified95.8%
if -5.00000000000000022e92 < y < 9.4999999999999991e93Initial 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%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.0%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (or (<= y -4.8e+92) (not (<= y 3.6e+93))) (/ y (* (sqrt x) -3.0)) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -4.8e+92) || !(y <= 3.6e+93)) {
tmp = y / (sqrt(x) * -3.0);
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-4.8d+92)) .or. (.not. (y <= 3.6d+93))) then
tmp = y / (sqrt(x) * (-3.0d0))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -4.8e+92) || !(y <= 3.6e+93)) {
tmp = y / (Math.sqrt(x) * -3.0);
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -4.8e+92) or not (y <= 3.6e+93): tmp = y / (math.sqrt(x) * -3.0) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -4.8e+92) || !(y <= 3.6e+93)) tmp = Float64(y / Float64(sqrt(x) * -3.0)); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -4.8e+92) || ~((y <= 3.6e+93))) tmp = y / (sqrt(x) * -3.0); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -4.8e+92], N[Not[LessEqual[y, 3.6e+93]], $MachinePrecision]], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+92} \lor \neg \left(y \leq 3.6 \cdot 10^{+93}\right):\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -4.80000000000000009e92 or 3.5999999999999999e93 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 94.8%
associate-*r*95.8%
*-commutative95.8%
*-commutative95.8%
unpow1/295.8%
unpow-195.8%
exp-to-pow90.7%
*-commutative90.7%
neg-mul-190.7%
exp-prod90.7%
distribute-lft-neg-out90.7%
exp-neg90.7%
exp-to-pow95.7%
unpow1/295.7%
unpow-195.7%
metadata-eval95.7%
associate-/l*95.8%
*-rgt-identity95.8%
unpow-195.8%
associate-/r*95.9%
*-commutative95.9%
associate-/r*95.8%
metadata-eval95.8%
Simplified95.8%
clear-num95.7%
un-div-inv95.7%
div-inv95.9%
metadata-eval95.9%
Applied egg-rr95.9%
if -4.80000000000000009e92 < y < 3.5999999999999999e93Initial 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%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.0%
Final simplification94.6%
(FPCore (x y)
:precision binary64
(if (<= y -5.1e+92)
(* -0.3333333333333333 (/ y (sqrt x)))
(if (<= y 7e+93)
(+ 1.0 (/ -0.1111111111111111 x))
(* y (/ -0.3333333333333333 (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -5.1e+92) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 7e+93) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 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 <= (-5.1d+92)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 7d+93) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -5.1e+92) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 7e+93) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5.1e+92: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 7e+93: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = y * (-0.3333333333333333 / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -5.1e+92) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 7e+93) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -5.1e+92) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 7e+93) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = y * (-0.3333333333333333 / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5.1e+92], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+93], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+92}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+93}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -5.1000000000000003e92Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 94.7%
associate-*r*94.7%
*-commutative94.7%
*-commutative94.7%
unpow1/294.7%
unpow-194.7%
exp-to-pow89.4%
*-commutative89.4%
neg-mul-189.4%
exp-prod89.4%
distribute-lft-neg-out89.4%
exp-neg89.4%
exp-to-pow94.5%
unpow1/294.5%
unpow-194.5%
metadata-eval94.5%
associate-/l*94.7%
*-rgt-identity94.7%
unpow-194.7%
associate-/r*94.8%
*-commutative94.8%
associate-/r*94.6%
metadata-eval94.6%
Simplified94.6%
clear-num94.7%
un-div-inv94.7%
div-inv94.8%
metadata-eval94.8%
Applied egg-rr94.8%
associate-/r*94.6%
div-inv94.7%
metadata-eval94.7%
Applied egg-rr94.7%
if -5.1000000000000003e92 < y < 6.99999999999999996e93Initial 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%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.0%
if 6.99999999999999996e93 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 94.9%
associate-*r*97.0%
*-commutative97.0%
*-commutative97.0%
unpow1/297.0%
unpow-197.0%
exp-to-pow92.1%
*-commutative92.1%
neg-mul-192.1%
exp-prod92.1%
distribute-lft-neg-out92.1%
exp-neg92.1%
exp-to-pow96.9%
unpow1/296.9%
unpow-196.9%
metadata-eval96.9%
associate-/l*97.0%
*-rgt-identity97.0%
unpow-197.0%
associate-/r*97.1%
*-commutative97.1%
associate-/r*96.9%
metadata-eval96.9%
Simplified96.9%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (/ (- -0.1111111111111111 (* (sqrt x) (* y 0.3333333333333333))) x) (- 1.0 (/ y (sqrt (* x 9.0))))))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = (-0.1111111111111111 - (sqrt(x) * (y * 0.3333333333333333))) / x;
} else {
tmp = 1.0 - (y / sqrt((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 (x <= 0.112d0) then
tmp = ((-0.1111111111111111d0) - (sqrt(x) * (y * 0.3333333333333333d0))) / x
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = (-0.1111111111111111 - (Math.sqrt(x) * (y * 0.3333333333333333))) / x;
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = (-0.1111111111111111 - (math.sqrt(x) * (y * 0.3333333333333333))) / x else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) tmp = Float64(Float64(-0.1111111111111111 - Float64(sqrt(x) * Float64(y * 0.3333333333333333))) / x); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.112) tmp = (-0.1111111111111111 - (sqrt(x) * (y * 0.3333333333333333))) / x; else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[(N[(-0.1111111111111111 - N[(N[Sqrt[x], $MachinePrecision] * N[(y * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;\frac{-0.1111111111111111 - \sqrt{x} \cdot \left(y \cdot 0.3333333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.6%
Taylor expanded in x around 0 99.5%
associate--r+99.5%
associate-*r*99.5%
*-commutative99.5%
associate-*r*99.5%
Simplified99.5%
Taylor expanded in x around 0 96.9%
distribute-lft-in96.9%
*-commutative96.9%
associate-*r*96.9%
metadata-eval96.9%
neg-mul-196.9%
sub-neg96.9%
Simplified96.9%
if 0.112000000000000002 < x Initial program 99.8%
Taylor expanded in x around inf 98.1%
metadata-eval98.1%
*-commutative98.1%
sqrt-div98.1%
metadata-eval98.1%
un-div-inv98.2%
times-frac98.1%
*-un-lft-identity98.1%
Applied egg-rr98.1%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr98.2%
unpow1/299.8%
Simplified98.2%
Final simplification97.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.3%
metadata-eval99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around 0 99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (<= y 8.5e+81) (+ 1.0 (/ -0.1111111111111111 x)) (+ 1.0 (* (/ -0.1111111111111111 y) (/ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 8.5e+81) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + ((-0.1111111111111111 / y) * (y / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 8.5d+81) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 + (((-0.1111111111111111d0) / y) * (y / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 8.5e+81) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + ((-0.1111111111111111 / y) * (y / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 8.5e+81: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 + ((-0.1111111111111111 / y) * (y / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 8.5e+81) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(Float64(-0.1111111111111111 / y) * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 8.5e+81) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 + ((-0.1111111111111111 / y) * (y / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 8.5e+81], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-0.1111111111111111 / y), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.5 \cdot 10^{+81}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{y} \cdot \frac{y}{x}\\
\end{array}
\end{array}
if y < 8.49999999999999986e81Initial 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.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 77.9%
if 8.49999999999999986e81 < y Initial 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%
fma-neg99.6%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 99.5%
Taylor expanded in x around 0 91.5%
*-commutative91.5%
associate-/l*88.4%
*-commutative88.4%
fma-neg88.4%
associate-*r/88.4%
metadata-eval88.4%
distribute-neg-frac88.4%
metadata-eval88.4%
Simplified88.4%
Taylor expanded in y around 0 36.9%
Final simplification70.4%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y): return 1.0 + (-0.1111111111111111 / x)
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Initial program 99.7%
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%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 66.5%
Final simplification66.5%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.7%
Taylor expanded in x around inf 66.5%
Taylor expanded in y around 0 33.8%
Final simplification33.8%
(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 2024079
(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)))))