
(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.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(if (<= y -9.8e+24)
(- 1.0 (/ y (sqrt (* x 9.0))))
(if (<= y 1.6e+48)
(+ 1.0 (/ -0.1111111111111111 x))
(- 1.0 (* (pow x -0.5) (/ y 3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -9.8e+24) {
tmp = 1.0 - (y / sqrt((x * 9.0)));
} else if (y <= 1.6e+48) {
tmp = 1.0 + (-0.1111111111111111 / x);
} 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 <= (-9.8d+24)) then
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
else if (y <= 1.6d+48) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
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 <= -9.8e+24) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else if (y <= 1.6e+48) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (Math.pow(x, -0.5) * (y / 3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -9.8e+24: tmp = 1.0 - (y / math.sqrt((x * 9.0))) elif y <= 1.6e+48: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 - (math.pow(x, -0.5) * (y / 3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -9.8e+24) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); elseif (y <= 1.6e+48) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); 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 <= -9.8e+24) tmp = 1.0 - (y / sqrt((x * 9.0))); elseif (y <= 1.6e+48) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 - ((x ^ -0.5) * (y / 3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -9.8e+24], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+48], N[(1.0 + N[(-0.1111111111111111 / x), $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 -9.8 \cdot 10^{+24}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+48}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - {x}^{-0.5} \cdot \frac{y}{3}\\
\end{array}
\end{array}
if y < -9.80000000000000059e24Initial 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 x around inf 95.5%
if -9.80000000000000059e24 < y < 1.6000000000000001e48Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.4%
if 1.6000000000000001e48 < y Initial program 99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
*-un-lft-identity99.5%
sqrt-prod99.3%
times-frac99.4%
pow1/299.4%
pow-flip99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 89.0%
Final simplification95.6%
(FPCore (x y) :precision binary64 (if (or (<= y -9.8e+24) (not (<= y 2.05e+46))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -9.8e+24) || !(y <= 2.05e+46)) {
tmp = 1.0 + (-0.3333333333333333 * (y / 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 <= (-9.8d+24)) .or. (.not. (y <= 2.05d+46))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / 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 <= -9.8e+24) || !(y <= 2.05e+46)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -9.8e+24) or not (y <= 2.05e+46): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -9.8e+24) || !(y <= 2.05e+46)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / 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 <= -9.8e+24) || ~((y <= 2.05e+46))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -9.8e+24], N[Not[LessEqual[y, 2.05e+46]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+24} \lor \neg \left(y \leq 2.05 \cdot 10^{+46}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -9.80000000000000059e24 or 2.05e46 < y Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.4%
fma-neg99.4%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 92.1%
*-commutative92.1%
sqrt-div92.0%
metadata-eval92.0%
un-div-inv92.1%
Applied egg-rr92.1%
if -9.80000000000000059e24 < y < 2.05e46Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.4%
Final simplification95.5%
(FPCore (x y) :precision binary64 (if (or (<= y -9.8e+24) (not (<= y 1.15e+46))) (- 1.0 (/ y (sqrt (* x 9.0)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -9.8e+24) || !(y <= 1.15e+46)) {
tmp = 1.0 - (y / sqrt((x * 9.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 <= (-9.8d+24)) .or. (.not. (y <= 1.15d+46))) then
tmp = 1.0d0 - (y / sqrt((x * 9.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 <= -9.8e+24) || !(y <= 1.15e+46)) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -9.8e+24) or not (y <= 1.15e+46): tmp = 1.0 - (y / math.sqrt((x * 9.0))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -9.8e+24) || !(y <= 1.15e+46)) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.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 <= -9.8e+24) || ~((y <= 1.15e+46))) tmp = 1.0 - (y / sqrt((x * 9.0))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -9.8e+24], N[Not[LessEqual[y, 1.15e+46]], $MachinePrecision]], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{+24} \lor \neg \left(y \leq 1.15 \cdot 10^{+46}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -9.80000000000000059e24 or 1.15e46 < y Initial 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 x around inf 92.3%
if -9.80000000000000059e24 < y < 1.15e46Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.4%
Final simplification95.6%
(FPCore (x y)
:precision binary64
(if (<= y -1.1e+83)
(/ y (* (sqrt x) -3.0))
(if (<= y 6.6e+104)
(+ 1.0 (/ -0.1111111111111111 x))
(* (pow x -0.5) (* y -0.3333333333333333)))))
double code(double x, double y) {
double tmp;
if (y <= -1.1e+83) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 6.6e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = pow(x, -0.5) * (y * -0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.1d+83)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 6.6d+104) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (x ** (-0.5d0)) * (y * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.1e+83) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 6.6e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = Math.pow(x, -0.5) * (y * -0.3333333333333333);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.1e+83: tmp = y / (math.sqrt(x) * -3.0) elif y <= 6.6e+104: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = math.pow(x, -0.5) * (y * -0.3333333333333333) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.1e+83) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 6.6e+104) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64((x ^ -0.5) * Float64(y * -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.1e+83) tmp = y / (sqrt(x) * -3.0); elseif (y <= 6.6e+104) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (x ^ -0.5) * (y * -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.1e+83], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+104], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+104}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if y < -1.09999999999999999e83Initial 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.4%
fma-neg99.4%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 85.0%
Taylor expanded in y around inf 94.5%
associate-*r*94.6%
*-commutative94.6%
*-commutative94.6%
unpow1/294.6%
rem-exp-log90.2%
exp-neg90.2%
exp-prod90.2%
distribute-lft-neg-out90.2%
exp-neg90.2%
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.7%
associate-*r/94.8%
*-rgt-identity94.8%
Simplified94.8%
if -1.09999999999999999e83 < y < 6.59999999999999969e104Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 92.1%
if 6.59999999999999969e104 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.2%
fma-neg99.2%
associate-/r*99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.1%
distribute-neg-frac99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 84.6%
Taylor expanded in y around inf 94.4%
associate-*r*94.4%
*-commutative94.4%
*-commutative94.4%
unpow1/294.4%
rem-exp-log89.7%
exp-neg89.7%
exp-prod89.7%
distribute-lft-neg-out89.7%
exp-neg89.7%
exp-to-pow94.3%
unpow1/294.3%
unpow-194.3%
metadata-eval94.3%
associate-/l*94.3%
*-rgt-identity94.3%
unpow-194.3%
associate-/r*94.3%
associate-*r/94.4%
*-rgt-identity94.4%
Simplified94.4%
div-inv94.3%
*-commutative94.3%
associate-/r*94.2%
metadata-eval94.2%
associate-*r/94.5%
div-inv94.4%
pow1/294.4%
pow-flip94.6%
metadata-eval94.6%
Applied egg-rr94.6%
Final simplification93.1%
(FPCore (x y) :precision binary64 (if (or (<= y -2.05e+83) (not (<= y 2.55e+104))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -2.05e+83) || !(y <= 2.55e+104)) {
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 <= (-2.05d+83)) .or. (.not. (y <= 2.55d+104))) 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 <= -2.05e+83) || !(y <= 2.55e+104)) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.05e+83) or not (y <= 2.55e+104): 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 <= -2.05e+83) || !(y <= 2.55e+104)) 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 <= -2.05e+83) || ~((y <= 2.55e+104))) 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, -2.05e+83], N[Not[LessEqual[y, 2.55e+104]], $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 -2.05 \cdot 10^{+83} \lor \neg \left(y \leq 2.55 \cdot 10^{+104}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -2.05e83 or 2.5500000000000001e104 < y Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.3%
fma-neg99.3%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 84.8%
Taylor expanded in y around inf 94.5%
associate-*r*94.5%
*-commutative94.5%
*-commutative94.5%
unpow1/294.5%
rem-exp-log90.0%
exp-neg90.0%
exp-prod90.0%
distribute-lft-neg-out90.0%
exp-neg90.0%
exp-to-pow94.4%
unpow1/294.4%
unpow-194.4%
metadata-eval94.4%
associate-/l*94.5%
*-rgt-identity94.5%
unpow-194.5%
associate-/r*94.5%
associate-*r/94.7%
*-rgt-identity94.7%
Simplified94.7%
associate-/r*94.6%
div-inv94.5%
metadata-eval94.5%
Applied egg-rr94.5%
add-log-exp18.9%
*-un-lft-identity18.9%
log-prod18.9%
metadata-eval18.9%
add-log-exp94.5%
associate-*l/94.5%
associate-/l*94.4%
Applied egg-rr94.4%
+-lft-identity94.4%
Simplified94.4%
if -2.05e83 < y < 2.5500000000000001e104Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 92.1%
Final simplification93.0%
(FPCore (x y) :precision binary64 (if (or (<= y -1.45e+83) (not (<= y 2.05e+104))) (/ y (* (sqrt x) -3.0)) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -1.45e+83) || !(y <= 2.05e+104)) {
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 <= (-1.45d+83)) .or. (.not. (y <= 2.05d+104))) 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 <= -1.45e+83) || !(y <= 2.05e+104)) {
tmp = y / (Math.sqrt(x) * -3.0);
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.45e+83) or not (y <= 2.05e+104): 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 <= -1.45e+83) || !(y <= 2.05e+104)) 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 <= -1.45e+83) || ~((y <= 2.05e+104))) 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, -1.45e+83], N[Not[LessEqual[y, 2.05e+104]], $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 -1.45 \cdot 10^{+83} \lor \neg \left(y \leq 2.05 \cdot 10^{+104}\right):\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -1.45e83 or 2.04999999999999992e104 < y Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.3%
fma-neg99.3%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 84.8%
Taylor expanded in y around inf 94.5%
associate-*r*94.5%
*-commutative94.5%
*-commutative94.5%
unpow1/294.5%
rem-exp-log90.0%
exp-neg90.0%
exp-prod90.0%
distribute-lft-neg-out90.0%
exp-neg90.0%
exp-to-pow94.4%
unpow1/294.4%
unpow-194.4%
metadata-eval94.4%
associate-/l*94.5%
*-rgt-identity94.5%
unpow-194.5%
associate-/r*94.5%
associate-*r/94.7%
*-rgt-identity94.7%
Simplified94.7%
if -1.45e83 < y < 2.04999999999999992e104Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 92.1%
Final simplification93.1%
(FPCore (x y)
:precision binary64
(if (<= y -4.4e+83)
(* y (/ -0.3333333333333333 (sqrt x)))
(if (<= y 2.05e+104)
(+ 1.0 (/ -0.1111111111111111 x))
(* -0.3333333333333333 (/ y (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -4.4e+83) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else if (y <= 2.05e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = -0.3333333333333333 * (y / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-4.4d+83)) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else if (y <= 2.05d+104) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -4.4e+83) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else if (y <= 2.05e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.4e+83: tmp = y * (-0.3333333333333333 / math.sqrt(x)) elif y <= 2.05e+104: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = -0.3333333333333333 * (y / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.4e+83) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); elseif (y <= 2.05e+104) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.4e+83) tmp = y * (-0.3333333333333333 / sqrt(x)); elseif (y <= 2.05e+104) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = -0.3333333333333333 * (y / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.4e+83], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+104], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+83}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+104}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -4.39999999999999997e83Initial 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.4%
fma-neg99.4%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 85.0%
Taylor expanded in y around inf 94.5%
associate-*r*94.6%
*-commutative94.6%
*-commutative94.6%
unpow1/294.6%
rem-exp-log90.2%
exp-neg90.2%
exp-prod90.2%
distribute-lft-neg-out90.2%
exp-neg90.2%
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.7%
associate-*r/94.8%
*-rgt-identity94.8%
Simplified94.8%
associate-/r*94.7%
div-inv94.6%
metadata-eval94.6%
Applied egg-rr94.6%
add-log-exp19.5%
*-un-lft-identity19.5%
log-prod19.5%
metadata-eval19.5%
add-log-exp94.6%
associate-*l/94.5%
associate-/l*94.6%
Applied egg-rr94.6%
+-lft-identity94.6%
Simplified94.6%
if -4.39999999999999997e83 < y < 2.04999999999999992e104Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 92.1%
if 2.04999999999999992e104 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.2%
fma-neg99.2%
associate-/r*99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.1%
distribute-neg-frac99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 84.6%
Taylor expanded in y around inf 94.4%
associate-*r*94.4%
*-commutative94.4%
*-commutative94.4%
unpow1/294.4%
rem-exp-log89.7%
exp-neg89.7%
exp-prod89.7%
distribute-lft-neg-out89.7%
exp-neg89.7%
exp-to-pow94.3%
unpow1/294.3%
unpow-194.3%
metadata-eval94.3%
associate-/l*94.3%
*-rgt-identity94.3%
unpow-194.3%
associate-/r*94.3%
associate-*r/94.4%
*-rgt-identity94.4%
Simplified94.4%
associate-/r*94.5%
div-inv94.4%
metadata-eval94.4%
Applied egg-rr94.4%
Final simplification93.0%
(FPCore (x y)
:precision binary64
(if (<= y -2.4e+83)
(/ y (* (sqrt x) -3.0))
(if (<= y 2.1e+104)
(+ 1.0 (/ -0.1111111111111111 x))
(/ y (/ (sqrt x) -0.3333333333333333)))))
double code(double x, double y) {
double tmp;
if (y <= -2.4e+83) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 2.1e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y / (sqrt(x) / -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 <= (-2.4d+83)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 2.1d+104) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = y / (sqrt(x) / (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.4e+83) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 2.1e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y / (Math.sqrt(x) / -0.3333333333333333);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.4e+83: tmp = y / (math.sqrt(x) * -3.0) elif y <= 2.1e+104: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = y / (math.sqrt(x) / -0.3333333333333333) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.4e+83) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 2.1e+104) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(y / Float64(sqrt(x) / -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.4e+83) tmp = y / (sqrt(x) * -3.0); elseif (y <= 2.1e+104) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = y / (sqrt(x) / -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.4e+83], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+104], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[Sqrt[x], $MachinePrecision] / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+83}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+104}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{\sqrt{x}}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -2.39999999999999991e83Initial 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.4%
fma-neg99.4%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 85.0%
Taylor expanded in y around inf 94.5%
associate-*r*94.6%
*-commutative94.6%
*-commutative94.6%
unpow1/294.6%
rem-exp-log90.2%
exp-neg90.2%
exp-prod90.2%
distribute-lft-neg-out90.2%
exp-neg90.2%
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.7%
associate-*r/94.8%
*-rgt-identity94.8%
Simplified94.8%
if -2.39999999999999991e83 < y < 2.0999999999999998e104Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 92.1%
if 2.0999999999999998e104 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.2%
fma-neg99.2%
associate-/r*99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.1%
distribute-neg-frac99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 84.6%
Taylor expanded in y around inf 94.4%
associate-*r*94.4%
*-commutative94.4%
*-commutative94.4%
unpow1/294.4%
rem-exp-log89.7%
exp-neg89.7%
exp-prod89.7%
distribute-lft-neg-out89.7%
exp-neg89.7%
exp-to-pow94.3%
unpow1/294.3%
unpow-194.3%
metadata-eval94.3%
associate-/l*94.3%
*-rgt-identity94.3%
unpow-194.3%
associate-/r*94.3%
associate-*r/94.4%
*-rgt-identity94.4%
Simplified94.4%
metadata-eval94.4%
div-inv94.5%
Applied egg-rr94.5%
Final simplification93.1%
(FPCore (x y)
:precision binary64
(if (<= y -2.15e+83)
(/ y (* (sqrt x) -3.0))
(if (<= y 2.05e+104)
(+ 1.0 (/ -0.1111111111111111 x))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -2.15e+83) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 2.05e+104) {
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 <= (-2.15d+83)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 2.05d+104) 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 <= -2.15e+83) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 2.05e+104) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.15e+83: tmp = y / (math.sqrt(x) * -3.0) elif y <= 2.05e+104: 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 <= -2.15e+83) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 2.05e+104) tmp = Float64(1.0 + Float64(-0.1111111111111111 / 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 <= -2.15e+83) tmp = y / (sqrt(x) * -3.0); elseif (y <= 2.05e+104) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.15e+83], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e+104], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+83}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+104}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -2.15e83Initial 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.4%
fma-neg99.4%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 85.0%
Taylor expanded in y around inf 94.5%
associate-*r*94.6%
*-commutative94.6%
*-commutative94.6%
unpow1/294.6%
rem-exp-log90.2%
exp-neg90.2%
exp-prod90.2%
distribute-lft-neg-out90.2%
exp-neg90.2%
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.7%
associate-*r/94.8%
*-rgt-identity94.8%
Simplified94.8%
if -2.15e83 < y < 2.04999999999999992e104Initial 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.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 92.1%
if 2.04999999999999992e104 < y Initial program 99.3%
associate--l-99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
distribute-frac-neg99.3%
sub-neg99.3%
neg-mul-199.3%
*-commutative99.3%
associate-/l*99.2%
fma-neg99.2%
associate-/r*99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.1%
distribute-neg-frac99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 84.6%
Taylor expanded in y around inf 94.4%
associate-*r*94.4%
*-commutative94.4%
*-commutative94.4%
unpow1/294.4%
rem-exp-log89.7%
exp-neg89.7%
exp-prod89.7%
distribute-lft-neg-out89.7%
exp-neg89.7%
exp-to-pow94.3%
unpow1/294.3%
unpow-194.3%
metadata-eval94.3%
associate-/l*94.3%
*-rgt-identity94.3%
unpow-194.3%
associate-/r*94.3%
associate-*r/94.4%
*-rgt-identity94.4%
Simplified94.4%
associate-/r*94.5%
div-inv94.4%
metadata-eval94.4%
Applied egg-rr94.4%
add-log-exp18.3%
*-un-lft-identity18.3%
log-prod18.3%
metadata-eval18.3%
add-log-exp94.4%
associate-*l/94.5%
associate-/l*94.2%
Applied egg-rr94.2%
+-lft-identity94.2%
associate-*r/94.5%
Simplified94.5%
Final simplification93.1%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ (- (* -0.3333333333333333 (* y (sqrt x))) 0.1111111111111111) x) (- 1.0 (* (pow x -0.5) (/ y 3.0)))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (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 (x <= 0.11d0) then
tmp = (((-0.3333333333333333d0) * (y * sqrt(x))) - 0.1111111111111111d0) / x
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 (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * Math.sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (Math.pow(x, -0.5) * (y / 3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = ((-0.3333333333333333 * (y * math.sqrt(x))) - 0.1111111111111111) / x else: tmp = 1.0 - (math.pow(x, -0.5) * (y / 3.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(Float64(-0.3333333333333333 * Float64(y * sqrt(x))) - 0.1111111111111111) / x); else tmp = Float64(1.0 - Float64((x ^ -0.5) * Float64(y / 3.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x; else tmp = 1.0 - ((x ^ -0.5) * (y / 3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(N[(-0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(N[Power[x, -0.5], $MachinePrecision] * N[(y / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - {x}^{-0.5} \cdot \frac{y}{3}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.5%
Taylor expanded in x around 0 98.0%
if 0.110000000000000001 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
*-un-lft-identity99.8%
sqrt-prod99.8%
times-frac99.7%
pow1/299.7%
pow-flip99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 98.0%
Final simplification98.0%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ (* y -0.3333333333333333) (sqrt x))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((y * (-0.3333333333333333d0)) / sqrt(x))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / Math.sqrt(x));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / math.sqrt(x))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(Float64(y * -0.3333333333333333) / sqrt(x))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
associate-*r/99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- 1.0 (+ (/ 0.1111111111111111 x) (* y (sqrt (/ 0.1111111111111111 x))))))
double code(double x, double y) {
return 1.0 - ((0.1111111111111111 / x) + (y * sqrt((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) + (y * sqrt((0.1111111111111111d0 / x))))
end function
public static double code(double x, double y) {
return 1.0 - ((0.1111111111111111 / x) + (y * Math.sqrt((0.1111111111111111 / x))));
}
def code(x, y): return 1.0 - ((0.1111111111111111 / x) + (y * math.sqrt((0.1111111111111111 / x))))
function code(x, y) return Float64(1.0 - Float64(Float64(0.1111111111111111 / x) + Float64(y * sqrt(Float64(0.1111111111111111 / x))))) end
function tmp = code(x, y) tmp = 1.0 - ((0.1111111111111111 / x) + (y * sqrt((0.1111111111111111 / x)))); end
code[x_, y_] := N[(1.0 - N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y * N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \left(\frac{0.1111111111111111}{x} + y \cdot \sqrt{\frac{0.1111111111111111}{x}}\right)
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
*-un-lft-identity99.7%
sqrt-prod99.7%
times-frac99.6%
pow1/299.6%
pow-flip99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Applied egg-rr99.7%
unsub-neg99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.11d0) then
tmp = (-0.1111111111111111d0) / x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 54.1%
Taylor expanded in x around 0 52.7%
if 0.110000000000000001 < x Initial 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.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 64.6%
Taylor expanded in x around inf 62.7%
Final simplification57.9%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y): return 1.0 + (-0.1111111111111111 / x)
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 59.5%
Final simplification59.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%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 59.5%
Taylor expanded in x around inf 33.2%
Final simplification33.2%
(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 2024055
(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)))))