
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
(FPCore (x y) :precision binary64 (- (+ 1.0 (/ -1.0 (* x 9.0))) (/ y (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.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (or (<= y -7.8e+52) (not (<= y 1.4e+20))) (- 1.0 (* (* y 0.3333333333333333) (sqrt (/ 1.0 x)))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -7.8e+52) || !(y <= 1.4e+20)) {
tmp = 1.0 - ((y * 0.3333333333333333) * sqrt((1.0 / 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 <= (-7.8d+52)) .or. (.not. (y <= 1.4d+20))) then
tmp = 1.0d0 - ((y * 0.3333333333333333d0) * sqrt((1.0d0 / 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 <= -7.8e+52) || !(y <= 1.4e+20)) {
tmp = 1.0 - ((y * 0.3333333333333333) * Math.sqrt((1.0 / x)));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -7.8e+52) or not (y <= 1.4e+20): tmp = 1.0 - ((y * 0.3333333333333333) * math.sqrt((1.0 / x))) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -7.8e+52) || !(y <= 1.4e+20)) tmp = Float64(1.0 - Float64(Float64(y * 0.3333333333333333) * sqrt(Float64(1.0 / 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 <= -7.8e+52) || ~((y <= 1.4e+20))) tmp = 1.0 - ((y * 0.3333333333333333) * sqrt((1.0 / x))); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -7.8e+52], N[Not[LessEqual[y, 1.4e+20]], $MachinePrecision]], N[(1.0 - N[(N[(y * 0.3333333333333333), $MachinePrecision] * N[Sqrt[N[(1.0 / 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 -7.8 \cdot 10^{+52} \lor \neg \left(y \leq 1.4 \cdot 10^{+20}\right):\\
\;\;\;\;1 - \left(y \cdot 0.3333333333333333\right) \cdot \sqrt{\frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -7.7999999999999999e52 or 1.4e20 < y Initial program 99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.4%
pow1/299.4%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
*-un-lft-identity99.5%
prod-diff84.5%
*-commutative84.5%
fma-neg84.5%
*-un-lft-identity84.5%
associate--l-84.5%
inv-pow84.5%
*-commutative84.5%
unpow-prod-down84.5%
metadata-eval84.5%
inv-pow84.5%
div-inv84.5%
div-inv84.4%
metadata-eval84.4%
Applied egg-rr84.4%
associate--r+84.4%
unsub-neg84.4%
+-commutative84.4%
associate-+l+84.4%
fma-udef84.4%
*-commutative84.4%
distribute-rgt-out99.5%
distribute-lft-out84.4%
distribute-rgt-neg-in84.4%
+-commutative84.4%
sub-neg84.4%
+-inverses99.5%
+-rgt-identity99.5%
Simplified99.5%
Taylor expanded in x around inf 97.9%
associate-*r*97.9%
Simplified97.9%
if -7.7999999999999999e52 < y < 1.4e20Initial 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 y around 0 98.3%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
div-inv98.3%
metadata-eval98.3%
inv-pow98.3%
unpow-prod-down98.4%
*-commutative98.4%
Applied egg-rr98.4%
Final simplification98.2%
(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.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ (* y -0.3333333333333333) (sqrt x))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((y * (-0.3333333333333333d0)) / sqrt(x))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / Math.sqrt(x));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / math.sqrt(x))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(Float64(y * -0.3333333333333333) / sqrt(x))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}
\end{array}
Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
associate-*r/99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
sub-neg99.7%
Applied egg-rr99.7%
sub-neg99.7%
sub-neg99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y)
:precision binary64
(if (<= y -4.2e+72)
(/ y (* (sqrt x) -3.0))
(if (<= y 9e+81)
(+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))
(* y (* -0.3333333333333333 (pow x -0.5))))))
double code(double x, double y) {
double tmp;
if (y <= -4.2e+72) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 9e+81) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = y * (-0.3333333333333333 * pow(x, -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-4.2d+72)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 9d+81) then
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
else
tmp = y * ((-0.3333333333333333d0) * (x ** (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -4.2e+72) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 9e+81) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = y * (-0.3333333333333333 * Math.pow(x, -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.2e+72: tmp = y / (math.sqrt(x) * -3.0) elif y <= 9e+81: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) else: tmp = y * (-0.3333333333333333 * math.pow(x, -0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.2e+72) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 9e+81) tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); else tmp = Float64(y * Float64(-0.3333333333333333 * (x ^ -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.2e+72) tmp = y / (sqrt(x) * -3.0); elseif (y <= 9e+81) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); else tmp = y * (-0.3333333333333333 * (x ^ -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.2e+72], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+81], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+72}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+81}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot {x}^{-0.5}\right)\\
\end{array}
\end{array}
if y < -4.2000000000000003e72Initial 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 91.8%
associate-*r*91.8%
*-commutative91.8%
associate-*l*91.8%
Simplified91.8%
expm1-log1p-u85.4%
expm1-udef85.2%
*-commutative85.2%
inv-pow85.2%
metadata-eval85.2%
pow-prod-up85.2%
sqrt-prod85.2%
add-sqr-sqrt85.2%
Applied egg-rr85.2%
expm1-def85.4%
expm1-log1p91.8%
associate-*r*91.9%
*-commutative91.9%
associate-*r*91.9%
Simplified91.9%
*-commutative91.9%
metadata-eval91.9%
pow-flip91.8%
pow1/291.8%
div-inv92.0%
associate-/l*92.0%
div-inv92.0%
metadata-eval92.0%
Applied egg-rr92.0%
if -4.2000000000000003e72 < y < 9.00000000000000034e81Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 95.2%
if 9.00000000000000034e81 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in y around inf 94.6%
associate-*r*94.8%
*-commutative94.8%
associate-*l*94.8%
Simplified94.8%
expm1-log1p-u46.6%
expm1-udef1.2%
*-commutative1.2%
inv-pow1.2%
metadata-eval1.2%
pow-prod-up1.2%
sqrt-prod1.2%
add-sqr-sqrt1.2%
Applied egg-rr1.2%
expm1-def46.7%
expm1-log1p94.9%
*-commutative94.9%
Simplified94.9%
Final simplification94.5%
(FPCore (x y)
:precision binary64
(if (<= y -4.8e+71)
(/ y (* (sqrt x) -3.0))
(if (<= y 7e+84)
(- 1.0 (pow (* x 9.0) -1.0))
(* y (* -0.3333333333333333 (pow x -0.5))))))
double code(double x, double y) {
double tmp;
if (y <= -4.8e+71) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 7e+84) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = y * (-0.3333333333333333 * pow(x, -0.5));
}
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+71)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 7d+84) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = y * ((-0.3333333333333333d0) * (x ** (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -4.8e+71) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 7e+84) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = y * (-0.3333333333333333 * Math.pow(x, -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.8e+71: tmp = y / (math.sqrt(x) * -3.0) elif y <= 7e+84: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = y * (-0.3333333333333333 * math.pow(x, -0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.8e+71) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 7e+84) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(y * Float64(-0.3333333333333333 * (x ^ -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.8e+71) tmp = y / (sqrt(x) * -3.0); elseif (y <= 7e+84) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = y * (-0.3333333333333333 * (x ^ -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.8e+71], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+84], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+84}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot {x}^{-0.5}\right)\\
\end{array}
\end{array}
if y < -4.79999999999999961e71Initial 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 91.8%
associate-*r*91.8%
*-commutative91.8%
associate-*l*91.8%
Simplified91.8%
expm1-log1p-u85.4%
expm1-udef85.2%
*-commutative85.2%
inv-pow85.2%
metadata-eval85.2%
pow-prod-up85.2%
sqrt-prod85.2%
add-sqr-sqrt85.2%
Applied egg-rr85.2%
expm1-def85.4%
expm1-log1p91.8%
associate-*r*91.9%
*-commutative91.9%
associate-*r*91.9%
Simplified91.9%
*-commutative91.9%
metadata-eval91.9%
pow-flip91.8%
pow1/291.8%
div-inv92.0%
associate-/l*92.0%
div-inv92.0%
metadata-eval92.0%
Applied egg-rr92.0%
if -4.79999999999999961e71 < y < 6.9999999999999998e84Initial 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 y around 0 95.2%
associate-*r/95.2%
metadata-eval95.2%
Simplified95.2%
div-inv95.2%
metadata-eval95.2%
inv-pow95.2%
unpow-prod-down95.3%
*-commutative95.3%
Applied egg-rr95.3%
if 6.9999999999999998e84 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in y around inf 94.6%
associate-*r*94.8%
*-commutative94.8%
associate-*l*94.8%
Simplified94.8%
expm1-log1p-u46.6%
expm1-udef1.2%
*-commutative1.2%
inv-pow1.2%
metadata-eval1.2%
pow-prod-up1.2%
sqrt-prod1.2%
add-sqr-sqrt1.2%
Applied egg-rr1.2%
expm1-def46.7%
expm1-log1p94.9%
*-commutative94.9%
Simplified94.9%
Final simplification94.5%
(FPCore (x y)
:precision binary64
(if (<= y -8e+71)
(/ (- (pow x -0.5)) (/ 3.0 y))
(if (<= y 5.3e+83)
(- 1.0 (pow (* x 9.0) -1.0))
(* y (* -0.3333333333333333 (pow x -0.5))))))
double code(double x, double y) {
double tmp;
if (y <= -8e+71) {
tmp = -pow(x, -0.5) / (3.0 / y);
} else if (y <= 5.3e+83) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = y * (-0.3333333333333333 * pow(x, -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-8d+71)) then
tmp = -(x ** (-0.5d0)) / (3.0d0 / y)
else if (y <= 5.3d+83) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = y * ((-0.3333333333333333d0) * (x ** (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8e+71) {
tmp = -Math.pow(x, -0.5) / (3.0 / y);
} else if (y <= 5.3e+83) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = y * (-0.3333333333333333 * Math.pow(x, -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8e+71: tmp = -math.pow(x, -0.5) / (3.0 / y) elif y <= 5.3e+83: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = y * (-0.3333333333333333 * math.pow(x, -0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= -8e+71) tmp = Float64(Float64(-(x ^ -0.5)) / Float64(3.0 / y)); elseif (y <= 5.3e+83) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(y * Float64(-0.3333333333333333 * (x ^ -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8e+71) tmp = -(x ^ -0.5) / (3.0 / y); elseif (y <= 5.3e+83) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = y * (-0.3333333333333333 * (x ^ -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8e+71], N[((-N[Power[x, -0.5], $MachinePrecision]) / N[(3.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.3e+83], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+71}:\\
\;\;\;\;\frac{-{x}^{-0.5}}{\frac{3}{y}}\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{+83}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot {x}^{-0.5}\right)\\
\end{array}
\end{array}
if y < -8.0000000000000003e71Initial 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 91.8%
associate-*r*91.8%
*-commutative91.8%
associate-*l*91.8%
Simplified91.8%
expm1-log1p-u85.4%
expm1-udef85.2%
*-commutative85.2%
inv-pow85.2%
metadata-eval85.2%
pow-prod-up85.2%
sqrt-prod85.2%
add-sqr-sqrt85.2%
Applied egg-rr85.2%
expm1-def85.4%
expm1-log1p91.8%
associate-*r*91.9%
*-commutative91.9%
associate-*r*91.9%
Simplified91.9%
add-sqr-sqrt91.6%
sqrt-unprod43.8%
swap-sqr43.8%
metadata-eval43.8%
metadata-eval43.8%
swap-sqr43.8%
metadata-eval43.8%
div-inv43.9%
metadata-eval43.9%
div-inv43.9%
sqrt-unprod0.0%
add-sqr-sqrt0.7%
frac-2neg0.7%
div-inv0.7%
metadata-eval0.7%
metadata-eval0.7%
distribute-lft-neg-in0.7%
add-sqr-sqrt0.7%
sqrt-unprod0.6%
swap-sqr0.6%
metadata-eval0.6%
metadata-eval0.6%
swap-sqr0.6%
Applied egg-rr92.1%
if -8.0000000000000003e71 < y < 5.29999999999999964e83Initial 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 y around 0 95.2%
associate-*r/95.2%
metadata-eval95.2%
Simplified95.2%
div-inv95.2%
metadata-eval95.2%
inv-pow95.2%
unpow-prod-down95.3%
*-commutative95.3%
Applied egg-rr95.3%
if 5.29999999999999964e83 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in y around inf 94.6%
associate-*r*94.8%
*-commutative94.8%
associate-*l*94.8%
Simplified94.8%
expm1-log1p-u46.6%
expm1-udef1.2%
*-commutative1.2%
inv-pow1.2%
metadata-eval1.2%
pow-prod-up1.2%
sqrt-prod1.2%
add-sqr-sqrt1.2%
Applied egg-rr1.2%
expm1-def46.7%
expm1-log1p94.9%
*-commutative94.9%
Simplified94.9%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (or (<= y -5.5e+74) (not (<= y 9.6e+80))) (* -0.3333333333333333 (/ y (sqrt x))) (+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -5.5e+74) || !(y <= 9.6e+80)) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / 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.5d+74)) .or. (.not. (y <= 9.6d+80))) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -5.5e+74) || !(y <= 9.6e+80)) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5.5e+74) or not (y <= 9.6e+80): tmp = -0.3333333333333333 * (y / math.sqrt(x)) else: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5.5e+74) || !(y <= 9.6e+80)) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); else tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -5.5e+74) || ~((y <= 9.6e+80))) tmp = -0.3333333333333333 * (y / sqrt(x)); else tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5.5e+74], N[Not[LessEqual[y, 9.6e+80]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+74} \lor \neg \left(y \leq 9.6 \cdot 10^{+80}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\end{array}
\end{array}
if y < -5.5000000000000003e74 or 9.59999999999999916e80 < y Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in y around inf 93.1%
associate-*r*93.2%
*-commutative93.2%
associate-*l*93.2%
Simplified93.2%
expm1-log1p-u45.7%
expm1-udef45.6%
*-commutative45.6%
inv-pow45.6%
metadata-eval45.6%
pow-prod-up45.6%
sqrt-prod45.6%
add-sqr-sqrt45.6%
Applied egg-rr45.6%
expm1-def45.7%
expm1-log1p93.3%
associate-*r*93.2%
*-commutative93.2%
associate-*r*93.2%
Simplified93.2%
add-sqr-sqrt49.0%
sqrt-unprod23.8%
swap-sqr23.8%
metadata-eval23.8%
metadata-eval23.8%
swap-sqr23.8%
metadata-eval23.8%
div-inv23.8%
metadata-eval23.8%
div-inv23.8%
sqrt-unprod0.4%
add-sqr-sqrt0.8%
div-inv0.8%
metadata-eval0.8%
metadata-eval0.8%
distribute-rgt-neg-in0.8%
add-sqr-sqrt0.4%
sqrt-unprod21.3%
swap-sqr21.3%
metadata-eval21.3%
metadata-eval21.3%
swap-sqr21.3%
metadata-eval21.3%
div-inv21.3%
metadata-eval21.3%
div-inv21.3%
Applied egg-rr93.2%
neg-sub093.2%
distribute-rgt-neg-in93.2%
distribute-neg-frac93.2%
metadata-eval93.2%
associate-*r/93.3%
associate-*l/93.2%
*-commutative93.2%
Simplified93.2%
if -5.5000000000000003e74 < y < 9.59999999999999916e80Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 95.2%
Final simplification94.4%
(FPCore (x y) :precision binary64 (if (or (<= y -7e+72) (not (<= y 1.6e+89))) (/ y (* (sqrt x) -3.0)) (+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -7e+72) || !(y <= 1.6e+89)) {
tmp = y / (sqrt(x) * -3.0);
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-7d+72)) .or. (.not. (y <= 1.6d+89))) then
tmp = y / (sqrt(x) * (-3.0d0))
else
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -7e+72) || !(y <= 1.6e+89)) {
tmp = y / (Math.sqrt(x) * -3.0);
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -7e+72) or not (y <= 1.6e+89): tmp = y / (math.sqrt(x) * -3.0) else: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -7e+72) || !(y <= 1.6e+89)) tmp = Float64(y / Float64(sqrt(x) * -3.0)); else tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -7e+72) || ~((y <= 1.6e+89))) tmp = y / (sqrt(x) * -3.0); else tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -7e+72], N[Not[LessEqual[y, 1.6e+89]], $MachinePrecision]], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+72} \lor \neg \left(y \leq 1.6 \cdot 10^{+89}\right):\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\end{array}
\end{array}
if y < -7.0000000000000002e72 or 1.59999999999999994e89 < y Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in y around inf 93.1%
associate-*r*93.2%
*-commutative93.2%
associate-*l*93.2%
Simplified93.2%
expm1-log1p-u45.7%
expm1-udef45.6%
*-commutative45.6%
inv-pow45.6%
metadata-eval45.6%
pow-prod-up45.6%
sqrt-prod45.6%
add-sqr-sqrt45.6%
Applied egg-rr45.6%
expm1-def45.7%
expm1-log1p93.3%
associate-*r*93.2%
*-commutative93.2%
associate-*r*93.2%
Simplified93.2%
*-commutative93.2%
metadata-eval93.2%
pow-flip93.2%
pow1/293.2%
div-inv93.3%
associate-/l*93.2%
div-inv93.3%
metadata-eval93.3%
Applied egg-rr93.3%
if -7.0000000000000002e72 < y < 1.59999999999999994e89Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 95.2%
Final simplification94.4%
(FPCore (x y)
:precision binary64
(if (<= y -6e+74)
(/ y (* (sqrt x) -3.0))
(if (<= y 2.1e+88)
(+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -6e+74) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 2.1e+88) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / 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 <= (-6d+74)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 2.1d+88) then
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / 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 <= -6e+74) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 2.1e+88) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -6e+74: tmp = y / (math.sqrt(x) * -3.0) elif y <= 2.1e+88: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) else: tmp = (y * -0.3333333333333333) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -6e+74) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 2.1e+88) tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); else tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -6e+74) tmp = y / (sqrt(x) * -3.0); elseif (y <= 2.1e+88) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -6e+74], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+88], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+74}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+88}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -6e74Initial 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 91.8%
associate-*r*91.8%
*-commutative91.8%
associate-*l*91.8%
Simplified91.8%
expm1-log1p-u85.4%
expm1-udef85.2%
*-commutative85.2%
inv-pow85.2%
metadata-eval85.2%
pow-prod-up85.2%
sqrt-prod85.2%
add-sqr-sqrt85.2%
Applied egg-rr85.2%
expm1-def85.4%
expm1-log1p91.8%
associate-*r*91.9%
*-commutative91.9%
associate-*r*91.9%
Simplified91.9%
*-commutative91.9%
metadata-eval91.9%
pow-flip91.8%
pow1/291.8%
div-inv92.0%
associate-/l*92.0%
div-inv92.0%
metadata-eval92.0%
Applied egg-rr92.0%
if -6e74 < y < 2.1e88Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 95.2%
if 2.1e88 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in y around inf 94.6%
associate-*r*94.8%
*-commutative94.8%
associate-*l*94.8%
Simplified94.8%
expm1-log1p-u0.1%
expm1-udef0.1%
*-commutative0.1%
inv-pow0.1%
metadata-eval0.1%
pow-prod-up0.1%
sqrt-prod0.1%
add-sqr-sqrt0.1%
Applied egg-rr0.1%
expm1-def0.1%
expm1-log1p94.9%
associate-*r*94.7%
*-commutative94.7%
associate-*r*94.8%
Simplified94.8%
*-commutative94.8%
metadata-eval94.8%
pow-flip94.7%
pow1/294.7%
div-inv94.9%
Applied egg-rr94.9%
Final simplification94.5%
(FPCore (x y)
:precision binary64
(if (<= y 1.4e+154)
(+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))
(/
(- 1.0 (/ 0.012345679012345678 (* x x)))
(+ 1.0 (/ 0.1111111111111111 x)))))
double code(double x, double y) {
double tmp;
if (y <= 1.4e+154) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} 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.4d+154) then
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
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.4e+154) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = (1.0 - (0.012345679012345678 / (x * x))) / (1.0 + (0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.4e+154: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) 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.4e+154) tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); else tmp = Float64(Float64(1.0 - Float64(0.012345679012345678 / Float64(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.4e+154) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); 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.4e+154], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(0.012345679012345678 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{0.012345679012345678}{x \cdot x}}{1 + \frac{0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 1.4e154Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 69.2%
if 1.4e154 < y Initial program 99.4%
Applied egg-rr86.4%
Taylor expanded in y around 0 25.5%
associate-*r/25.5%
metadata-eval25.5%
unpow225.5%
associate-*r/25.5%
metadata-eval25.5%
Simplified25.5%
Final simplification63.4%
(FPCore (x y) :precision binary64 (if (<= x 34500000000000.0) (* (/ 1.0 x) -0.1111111111111111) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 34500000000000.0) {
tmp = (1.0 / x) * -0.1111111111111111;
} 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 <= 34500000000000.0d0) then
tmp = (1.0d0 / x) * (-0.1111111111111111d0)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 34500000000000.0) {
tmp = (1.0 / x) * -0.1111111111111111;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 34500000000000.0: tmp = (1.0 / x) * -0.1111111111111111 else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 34500000000000.0) tmp = Float64(Float64(1.0 / x) * -0.1111111111111111); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 34500000000000.0) tmp = (1.0 / x) * -0.1111111111111111; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 34500000000000.0], N[(N[(1.0 / x), $MachinePrecision] * -0.1111111111111111), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 34500000000000:\\
\;\;\;\;\frac{1}{x} \cdot -0.1111111111111111\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 3.45e13Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
neg-mul-199.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 58.7%
div-inv58.7%
Applied egg-rr58.7%
if 3.45e13 < x Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
neg-mul-199.8%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 61.9%
Final simplification60.2%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.1111111111111111 (/ -1.0 x))))
double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end function
public static double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
def code(x, y): return 1.0 + (0.1111111111111111 * (-1.0 / x))
function code(x, y) return Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))) end
function tmp = code(x, y) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end
code[x_, y_] := N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.1111111111111111 \cdot \frac{-1}{x}
\end{array}
Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 60.5%
Final simplification60.5%
(FPCore (x y) :precision binary64 (if (<= x 34500000000000.0) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 34500000000000.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 <= 34500000000000.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 <= 34500000000000.0) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 34500000000000.0: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 34500000000000.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 <= 34500000000000.0) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 34500000000000.0], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 34500000000000:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 3.45e13Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
neg-mul-199.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 58.7%
if 3.45e13 < x Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
neg-mul-199.8%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 61.9%
Final simplification60.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.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 60.5%
cancel-sign-sub-inv60.5%
metadata-eval60.5%
associate-*r/60.5%
metadata-eval60.5%
Simplified60.5%
Final simplification60.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.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 29.0%
Final simplification29.0%
(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 2023268
(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)))))