
(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 (or (<= y -2.3e+45) (not (<= y 2e+24))) (- 1.0 (/ y (sqrt (* x 9.0)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -2.3e+45) || !(y <= 2e+24)) {
tmp = 1.0 - (y / sqrt((x * 9.0)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.3d+45)) .or. (.not. (y <= 2d+24))) then
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.3e+45) || !(y <= 2e+24)) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.3e+45) or not (y <= 2e+24): tmp = 1.0 - (y / math.sqrt((x * 9.0))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.3e+45) || !(y <= 2e+24)) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.3e+45) || ~((y <= 2e+24))) tmp = 1.0 - (y / sqrt((x * 9.0))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.3e+45], N[Not[LessEqual[y, 2e+24]], $MachinePrecision]], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+45} \lor \neg \left(y \leq 2 \cdot 10^{+24}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -2.30000000000000012e45 or 2e24 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in x around inf 93.5%
if -2.30000000000000012e45 < y < 2e24Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.2%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
expm1-log1p-u94.5%
expm1-undefine94.5%
log1p-undefine94.5%
add-exp-log98.3%
add-sqr-sqrt98.2%
sqrt-unprod78.4%
frac-times78.4%
metadata-eval78.4%
metadata-eval78.4%
frac-times78.4%
sqrt-unprod0.0%
add-sqr-sqrt49.9%
Applied egg-rr49.9%
+-commutative49.9%
associate--l+49.9%
metadata-eval49.9%
Simplified49.9%
add-sqr-sqrt0.0%
sqrt-unprod78.4%
+-rgt-identity78.4%
+-rgt-identity78.4%
frac-times78.4%
metadata-eval78.4%
metadata-eval78.4%
frac-times78.4%
sqrt-unprod98.2%
add-sqr-sqrt98.3%
clear-num98.3%
div-inv98.4%
metadata-eval98.4%
Applied egg-rr98.4%
Final simplification96.4%
(FPCore (x y) :precision binary64 (if (or (<= y -1.6e+45) (not (<= y 2.6e+24))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.6e+45) || !(y <= 2.6e+24)) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.6d+45)) .or. (.not. (y <= 2.6d+24))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.6e+45) || !(y <= 2.6e+24)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.6e+45) or not (y <= 2.6e+24): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.6e+45) || !(y <= 2.6e+24)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.6e+45) || ~((y <= 2.6e+24))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.6e+45], N[Not[LessEqual[y, 2.6e+24]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+45} \lor \neg \left(y \leq 2.6 \cdot 10^{+24}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -1.6000000000000001e45 or 2.5999999999999998e24 < y Initial program 99.6%
sub-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 93.4%
if -1.6000000000000001e45 < y < 2.5999999999999998e24Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.2%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
expm1-log1p-u94.5%
expm1-undefine94.5%
log1p-undefine94.5%
add-exp-log98.3%
add-sqr-sqrt98.2%
sqrt-unprod78.4%
frac-times78.4%
metadata-eval78.4%
metadata-eval78.4%
frac-times78.4%
sqrt-unprod0.0%
add-sqr-sqrt49.9%
Applied egg-rr49.9%
+-commutative49.9%
associate--l+49.9%
metadata-eval49.9%
Simplified49.9%
add-sqr-sqrt0.0%
sqrt-unprod78.4%
+-rgt-identity78.4%
+-rgt-identity78.4%
frac-times78.4%
metadata-eval78.4%
metadata-eval78.4%
frac-times78.4%
sqrt-unprod98.2%
add-sqr-sqrt98.3%
clear-num98.3%
div-inv98.4%
metadata-eval98.4%
Applied egg-rr98.4%
Final simplification96.3%
(FPCore (x y)
:precision binary64
(if (<= y -2e+45)
(- 1.0 (/ y (* 3.0 (sqrt x))))
(if (<= y 2.6e+24)
(+ 1.0 (/ -1.0 (* x 9.0)))
(- 1.0 (/ y (sqrt (* x 9.0)))))))
double code(double x, double y) {
double tmp;
if (y <= -2e+45) {
tmp = 1.0 - (y / (3.0 * sqrt(x)));
} else if (y <= 2.6e+24) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - (y / sqrt((x * 9.0)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2d+45)) then
tmp = 1.0d0 - (y / (3.0d0 * sqrt(x)))
else if (y <= 2.6d+24) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2e+45) {
tmp = 1.0 - (y / (3.0 * Math.sqrt(x)));
} else if (y <= 2.6e+24) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2e+45: tmp = 1.0 - (y / (3.0 * math.sqrt(x))) elif y <= 2.6e+24: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (y <= -2e+45) tmp = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x)))); elseif (y <= 2.6e+24) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2e+45) tmp = 1.0 - (y / (3.0 * sqrt(x))); elseif (y <= 2.6e+24) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2e+45], N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+24], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+45}:\\
\;\;\;\;1 - \frac{y}{3 \cdot \sqrt{x}}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+24}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if y < -1.9999999999999999e45Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around inf 97.2%
if -1.9999999999999999e45 < y < 2.5999999999999998e24Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.2%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
expm1-log1p-u94.5%
expm1-undefine94.5%
log1p-undefine94.5%
add-exp-log98.3%
add-sqr-sqrt98.2%
sqrt-unprod78.4%
frac-times78.4%
metadata-eval78.4%
metadata-eval78.4%
frac-times78.4%
sqrt-unprod0.0%
add-sqr-sqrt49.9%
Applied egg-rr49.9%
+-commutative49.9%
associate--l+49.9%
metadata-eval49.9%
Simplified49.9%
add-sqr-sqrt0.0%
sqrt-unprod78.4%
+-rgt-identity78.4%
+-rgt-identity78.4%
frac-times78.4%
metadata-eval78.4%
metadata-eval78.4%
frac-times78.4%
sqrt-unprod98.2%
add-sqr-sqrt98.3%
clear-num98.3%
div-inv98.4%
metadata-eval98.4%
Applied egg-rr98.4%
if 2.5999999999999998e24 < 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 91.0%
Final simplification96.4%
(FPCore (x y)
:precision binary64
(if (<= y -1.3e+71)
(/ (* y -0.3333333333333333) (sqrt x))
(if (<= y 1.05e+62)
(+ 1.0 (/ -1.0 (* x 9.0)))
(* (* y -0.3333333333333333) (pow x -0.5)))))
double code(double x, double y) {
double tmp;
if (y <= -1.3e+71) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else if (y <= 1.05e+62) {
tmp = 1.0 + (-1.0 / (x * 9.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 <= (-1.3d+71)) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else if (y <= 1.05d+62) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.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 <= -1.3e+71) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else if (y <= 1.05e+62) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (y * -0.3333333333333333) * Math.pow(x, -0.5);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.3e+71: tmp = (y * -0.3333333333333333) / math.sqrt(x) elif y <= 1.05e+62: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = (y * -0.3333333333333333) * math.pow(x, -0.5) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.3e+71) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); elseif (y <= 1.05e+62) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(Float64(y * -0.3333333333333333) * (x ^ -0.5)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.3e+71) tmp = (y * -0.3333333333333333) / sqrt(x); elseif (y <= 1.05e+62) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (y * -0.3333333333333333) * (x ^ -0.5); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.3e+71], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+62], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+71}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+62}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot -0.3333333333333333\right) \cdot {x}^{-0.5}\\
\end{array}
\end{array}
if y < -1.29999999999999996e71Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in x around inf 98.5%
Taylor expanded in y around inf 96.3%
*-commutative96.3%
associate-*l*96.3%
Simplified96.3%
*-commutative96.3%
sqrt-div96.3%
metadata-eval96.3%
un-div-inv96.4%
Applied egg-rr96.4%
if -1.29999999999999996e71 < y < 1.05e62Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 91.6%
associate-*r/91.7%
metadata-eval91.7%
Simplified91.7%
expm1-log1p-u88.2%
expm1-undefine88.2%
log1p-undefine88.2%
add-exp-log91.7%
add-sqr-sqrt91.5%
sqrt-unprod73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod0.0%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
+-commutative47.7%
associate--l+47.7%
metadata-eval47.7%
Simplified47.7%
add-sqr-sqrt0.0%
sqrt-unprod73.1%
+-rgt-identity73.1%
+-rgt-identity73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod91.5%
add-sqr-sqrt91.7%
clear-num91.7%
div-inv91.7%
metadata-eval91.7%
Applied egg-rr91.7%
if 1.05e62 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around inf 95.4%
Taylor expanded in y around inf 88.1%
*-commutative88.1%
associate-*l*88.1%
Simplified88.1%
*-un-lft-identity88.1%
inv-pow88.1%
sqrt-pow188.2%
metadata-eval88.2%
Applied egg-rr88.2%
*-lft-identity88.2%
Simplified88.2%
Final simplification91.9%
(FPCore (x y) :precision binary64 (if (or (<= y -7e+75) (not (<= y 1.08e+62))) (/ (* y -0.3333333333333333) (sqrt x)) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -7e+75) || !(y <= 1.08e+62)) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-7d+75)) .or. (.not. (y <= 1.08d+62))) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -7e+75) || !(y <= 1.08e+62)) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -7e+75) or not (y <= 1.08e+62): tmp = (y * -0.3333333333333333) / math.sqrt(x) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -7e+75) || !(y <= 1.08e+62)) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -7e+75) || ~((y <= 1.08e+62))) tmp = (y * -0.3333333333333333) / sqrt(x); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -7e+75], N[Not[LessEqual[y, 1.08e+62]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+75} \lor \neg \left(y \leq 1.08 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -6.9999999999999997e75 or 1.0800000000000001e62 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in x around inf 96.9%
Taylor expanded in y around inf 92.0%
*-commutative92.0%
associate-*l*92.0%
Simplified92.0%
*-commutative92.0%
sqrt-div91.9%
metadata-eval91.9%
un-div-inv92.0%
Applied egg-rr92.0%
if -6.9999999999999997e75 < y < 1.0800000000000001e62Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 91.6%
associate-*r/91.7%
metadata-eval91.7%
Simplified91.7%
expm1-log1p-u88.2%
expm1-undefine88.2%
log1p-undefine88.2%
add-exp-log91.7%
add-sqr-sqrt91.5%
sqrt-unprod73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod0.0%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
+-commutative47.7%
associate--l+47.7%
metadata-eval47.7%
Simplified47.7%
add-sqr-sqrt0.0%
sqrt-unprod73.1%
+-rgt-identity73.1%
+-rgt-identity73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod91.5%
add-sqr-sqrt91.7%
clear-num91.7%
div-inv91.7%
metadata-eval91.7%
Applied egg-rr91.7%
Final simplification91.8%
(FPCore (x y) :precision binary64 (if (or (<= y -7.2e+71) (not (<= y 1.05e+62))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -7.2e+71) || !(y <= 1.05e+62)) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-7.2d+71)) .or. (.not. (y <= 1.05d+62))) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -7.2e+71) || !(y <= 1.05e+62)) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -7.2e+71) or not (y <= 1.05e+62): tmp = y * (-0.3333333333333333 / math.sqrt(x)) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -7.2e+71) || !(y <= 1.05e+62)) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -7.2e+71) || ~((y <= 1.05e+62))) tmp = y * (-0.3333333333333333 / sqrt(x)); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -7.2e+71], N[Not[LessEqual[y, 1.05e+62]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+71} \lor \neg \left(y \leq 1.05 \cdot 10^{+62}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -7.1999999999999999e71 or 1.05e62 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in x around inf 96.9%
Taylor expanded in y around inf 92.0%
*-commutative92.0%
associate-*l*92.0%
Simplified92.0%
*-commutative92.0%
sqrt-div91.9%
metadata-eval91.9%
un-div-inv92.0%
Applied egg-rr92.0%
associate-/l*91.9%
Simplified91.9%
if -7.1999999999999999e71 < y < 1.05e62Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 91.6%
associate-*r/91.7%
metadata-eval91.7%
Simplified91.7%
expm1-log1p-u88.2%
expm1-undefine88.2%
log1p-undefine88.2%
add-exp-log91.7%
add-sqr-sqrt91.5%
sqrt-unprod73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod0.0%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
+-commutative47.7%
associate--l+47.7%
metadata-eval47.7%
Simplified47.7%
add-sqr-sqrt0.0%
sqrt-unprod73.1%
+-rgt-identity73.1%
+-rgt-identity73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod91.5%
add-sqr-sqrt91.7%
clear-num91.7%
div-inv91.7%
metadata-eval91.7%
Applied egg-rr91.7%
Final simplification91.8%
(FPCore (x y) :precision binary64 (if (<= y -6.2e+73) (/ (* y -0.3333333333333333) (sqrt x)) (if (<= y 1.08e+62) (+ 1.0 (/ -1.0 (* x 9.0))) (/ (/ y -3.0) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -6.2e+73) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else if (y <= 1.08e+62) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (y / -3.0) / sqrt(x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-6.2d+73)) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else if (y <= 1.08d+62) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = (y / (-3.0d0)) / sqrt(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -6.2e+73) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else if (y <= 1.08e+62) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (y / -3.0) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -6.2e+73: tmp = (y * -0.3333333333333333) / math.sqrt(x) elif y <= 1.08e+62: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = (y / -3.0) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -6.2e+73) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); elseif (y <= 1.08e+62) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(Float64(y / -3.0) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -6.2e+73) tmp = (y * -0.3333333333333333) / sqrt(x); elseif (y <= 1.08e+62) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (y / -3.0) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -6.2e+73], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e+62], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+73}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{+62}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -6.1999999999999999e73Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in x around inf 98.5%
Taylor expanded in y around inf 96.3%
*-commutative96.3%
associate-*l*96.3%
Simplified96.3%
*-commutative96.3%
sqrt-div96.3%
metadata-eval96.3%
un-div-inv96.4%
Applied egg-rr96.4%
if -6.1999999999999999e73 < y < 1.0800000000000001e62Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 91.6%
associate-*r/91.7%
metadata-eval91.7%
Simplified91.7%
expm1-log1p-u88.2%
expm1-undefine88.2%
log1p-undefine88.2%
add-exp-log91.7%
add-sqr-sqrt91.5%
sqrt-unprod73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod0.0%
add-sqr-sqrt47.7%
Applied egg-rr47.7%
+-commutative47.7%
associate--l+47.7%
metadata-eval47.7%
Simplified47.7%
add-sqr-sqrt0.0%
sqrt-unprod73.1%
+-rgt-identity73.1%
+-rgt-identity73.1%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.1%
sqrt-unprod91.5%
add-sqr-sqrt91.7%
clear-num91.7%
div-inv91.7%
metadata-eval91.7%
Applied egg-rr91.7%
if 1.0800000000000001e62 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around inf 95.4%
Taylor expanded in y around inf 88.1%
*-commutative88.1%
associate-*l*88.1%
Simplified88.1%
*-commutative88.1%
sqrt-div88.0%
metadata-eval88.0%
un-div-inv88.1%
Applied egg-rr88.1%
associate-*l/88.0%
metadata-eval88.0%
times-frac88.2%
*-rgt-identity88.2%
*-commutative88.2%
associate-/r*88.2%
Simplified88.2%
Final simplification91.9%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (- (/ -0.1111111111111111 x) (/ y (sqrt (* x 9.0)))) (- 1.0 (/ y (* 3.0 (sqrt x))))))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = (-0.1111111111111111 / x) - (y / sqrt((x * 9.0)));
} else {
tmp = 1.0 - (y / (3.0 * sqrt(x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.112d0) then
tmp = ((-0.1111111111111111d0) / x) - (y / sqrt((x * 9.0d0)))
else
tmp = 1.0d0 - (y / (3.0d0 * sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = (-0.1111111111111111 / x) - (y / Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 - (y / (3.0 * Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = (-0.1111111111111111 / x) - (y / math.sqrt((x * 9.0))) else: tmp = 1.0 - (y / (3.0 * math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) tmp = Float64(Float64(-0.1111111111111111 / x) - Float64(y / sqrt(Float64(x * 9.0)))); else tmp = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.112) tmp = (-0.1111111111111111 / x) - (y / sqrt((x * 9.0))); else tmp = 1.0 - (y / (3.0 * sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[(N[(-0.1111111111111111 / x), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;\frac{-0.1111111111111111}{x} - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{3 \cdot \sqrt{x}}\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial 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 0 97.8%
if 0.112000000000000002 < x Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in x around inf 99.1%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Initial program 99.7%
Taylor expanded in x around 0 99.7%
(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%
(FPCore (x y)
:precision binary64
(if (<= y 1.5e+161)
(+ 1.0 (/ -1.0 (* x 9.0)))
(-
1.0
(* (* x 9.0) (* (/ -0.1111111111111111 x) (/ -0.1111111111111111 x))))))
double code(double x, double y) {
double tmp;
if (y <= 1.5e+161) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - ((x * 9.0) * ((-0.1111111111111111 / x) * (-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.5d+161) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 - ((x * 9.0d0) * (((-0.1111111111111111d0) / x) * ((-0.1111111111111111d0) / x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.5e+161) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - ((x * 9.0) * ((-0.1111111111111111 / x) * (-0.1111111111111111 / x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.5e+161: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 - ((x * 9.0) * ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.5e+161) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 - Float64(Float64(x * 9.0) * Float64(Float64(-0.1111111111111111 / x) * Float64(-0.1111111111111111 / x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.5e+161) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 - ((x * 9.0) * ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.5e+161], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x * 9.0), $MachinePrecision] * N[(N[(-0.1111111111111111 / x), $MachinePrecision] * N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{+161}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 - \left(x \cdot 9\right) \cdot \left(\frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}\right)\\
\end{array}
\end{array}
if y < 1.50000000000000006e161Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fmm-def99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 70.0%
associate-*r/70.1%
metadata-eval70.1%
Simplified70.1%
expm1-log1p-u67.5%
expm1-undefine67.5%
log1p-undefine67.5%
add-exp-log70.1%
add-sqr-sqrt70.0%
sqrt-unprod56.2%
frac-times56.2%
metadata-eval56.2%
metadata-eval56.2%
frac-times56.2%
sqrt-unprod0.0%
add-sqr-sqrt37.6%
Applied egg-rr37.6%
+-commutative37.6%
associate--l+37.6%
metadata-eval37.6%
Simplified37.6%
add-sqr-sqrt0.0%
sqrt-unprod56.2%
+-rgt-identity56.2%
+-rgt-identity56.2%
frac-times56.2%
metadata-eval56.2%
metadata-eval56.2%
frac-times56.2%
sqrt-unprod70.0%
add-sqr-sqrt70.1%
clear-num70.1%
div-inv70.1%
metadata-eval70.1%
Applied egg-rr70.1%
if 1.50000000000000006e161 < 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.6%
fmm-def99.6%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 3.1%
associate-*r/3.1%
metadata-eval3.1%
Simplified3.1%
expm1-log1p-u3.1%
expm1-undefine3.1%
log1p-undefine3.1%
add-exp-log3.1%
add-sqr-sqrt3.1%
sqrt-unprod20.3%
frac-times20.3%
metadata-eval20.3%
metadata-eval20.3%
frac-times20.3%
sqrt-unprod0.0%
add-sqr-sqrt0.8%
Applied egg-rr0.8%
+-commutative0.8%
associate--l+0.8%
metadata-eval0.8%
Simplified0.8%
--rgt-identity0.8%
flip--0.7%
+-rgt-identity0.7%
div-inv0.7%
metadata-eval0.7%
--rgt-identity0.7%
+-rgt-identity0.7%
+-rgt-identity0.7%
frac-times0.7%
metadata-eval0.7%
pow20.7%
add-sqr-sqrt0.0%
sqrt-unprod1.2%
+-rgt-identity1.2%
+-rgt-identity1.2%
frac-times1.2%
metadata-eval1.2%
metadata-eval1.2%
frac-times1.2%
sqrt-unprod20.3%
add-sqr-sqrt20.3%
Applied egg-rr20.3%
metadata-eval20.3%
unpow220.3%
frac-times20.3%
Applied egg-rr20.3%
Final simplification64.9%
(FPCore (x y) :precision binary64 (if (<= y 6e+144) (+ 1.0 (/ -1.0 (* x 9.0))) (- 1.0 (* (* x 9.0) (/ 0.012345679012345678 (* x x))))))
double code(double x, double y) {
double tmp;
if (y <= 6e+144) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - ((x * 9.0) * (0.012345679012345678 / (x * 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+144) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 - ((x * 9.0d0) * (0.012345679012345678d0 / (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6e+144) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 - ((x * 9.0) * (0.012345679012345678 / (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6e+144: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 - ((x * 9.0) * (0.012345679012345678 / (x * x))) return tmp
function code(x, y) tmp = 0.0 if (y <= 6e+144) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 - Float64(Float64(x * 9.0) * Float64(0.012345679012345678 / Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6e+144) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 - ((x * 9.0) * (0.012345679012345678 / (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6e+144], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(x * 9.0), $MachinePrecision] * N[(0.012345679012345678 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{+144}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 - \left(x \cdot 9\right) \cdot \frac{0.012345679012345678}{x \cdot x}\\
\end{array}
\end{array}
if y < 5.9999999999999998e144Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fmm-def99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 70.9%
associate-*r/70.9%
metadata-eval70.9%
Simplified70.9%
expm1-log1p-u68.4%
expm1-undefine68.4%
log1p-undefine68.4%
add-exp-log70.9%
add-sqr-sqrt70.8%
sqrt-unprod56.9%
frac-times56.9%
metadata-eval56.9%
metadata-eval56.9%
frac-times56.9%
sqrt-unprod0.0%
add-sqr-sqrt38.0%
Applied egg-rr38.0%
+-commutative38.0%
associate--l+38.0%
metadata-eval38.0%
Simplified38.0%
add-sqr-sqrt0.0%
sqrt-unprod56.9%
+-rgt-identity56.9%
+-rgt-identity56.9%
frac-times56.9%
metadata-eval56.9%
metadata-eval56.9%
frac-times56.9%
sqrt-unprod70.8%
add-sqr-sqrt70.9%
clear-num71.0%
div-inv71.0%
metadata-eval71.0%
Applied egg-rr71.0%
if 5.9999999999999998e144 < y Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
fmm-def99.5%
associate-/r*99.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 0 3.2%
associate-*r/3.2%
metadata-eval3.2%
Simplified3.2%
expm1-log1p-u3.2%
expm1-undefine3.2%
log1p-undefine3.2%
add-exp-log3.2%
add-sqr-sqrt3.2%
sqrt-unprod18.7%
frac-times18.7%
metadata-eval18.7%
metadata-eval18.7%
frac-times18.7%
sqrt-unprod0.0%
add-sqr-sqrt0.8%
Applied egg-rr0.8%
+-commutative0.8%
associate--l+0.8%
metadata-eval0.8%
Simplified0.8%
--rgt-identity0.8%
flip--0.8%
+-rgt-identity0.8%
div-inv0.8%
metadata-eval0.8%
--rgt-identity0.8%
+-rgt-identity0.8%
+-rgt-identity0.8%
frac-times0.8%
metadata-eval0.8%
pow20.8%
add-sqr-sqrt0.0%
sqrt-unprod1.5%
+-rgt-identity1.5%
+-rgt-identity1.5%
frac-times1.5%
metadata-eval1.5%
metadata-eval1.5%
frac-times1.5%
sqrt-unprod18.7%
add-sqr-sqrt18.7%
Applied egg-rr18.7%
unpow218.7%
Applied egg-rr18.7%
Final simplification64.9%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
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.112d0) 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.112) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) 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.112) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.6%
fmm-def99.6%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 97.7%
Taylor expanded in y around 0 63.2%
if 0.112000000000000002 < 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.8%
fmm-def99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 61.5%
associate-*r/61.5%
metadata-eval61.5%
Simplified61.5%
Taylor expanded in x around inf 60.7%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -1.0 (* x 9.0))))
double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end function
public static double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
def code(x, y): return 1.0 + (-1.0 / (x * 9.0))
function code(x, y) return Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) end
function tmp = code(x, y) tmp = 1.0 + (-1.0 / (x * 9.0)); end
code[x_, y_] := N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-1}{x \cdot 9}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fmm-def99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 62.9%
associate-*r/63.0%
metadata-eval63.0%
Simplified63.0%
expm1-log1p-u60.7%
expm1-undefine60.7%
log1p-undefine60.7%
add-exp-log63.0%
add-sqr-sqrt62.9%
sqrt-unprod52.4%
frac-times52.4%
metadata-eval52.4%
metadata-eval52.4%
frac-times52.4%
sqrt-unprod0.0%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
+-commutative33.7%
associate--l+33.7%
metadata-eval33.7%
Simplified33.7%
add-sqr-sqrt0.0%
sqrt-unprod52.4%
+-rgt-identity52.4%
+-rgt-identity52.4%
frac-times52.4%
metadata-eval52.4%
metadata-eval52.4%
frac-times52.4%
sqrt-unprod62.9%
add-sqr-sqrt63.0%
clear-num63.0%
div-inv63.0%
metadata-eval63.0%
Applied egg-rr63.0%
Final simplification63.0%
(FPCore (x y) :precision binary64 (- 1.0 (/ 0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (0.1111111111111111d0 / x)
end function
public static double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
def code(x, y): return 1.0 - (0.1111111111111111 / x)
function code(x, y) return Float64(1.0 - Float64(0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 - (0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{0.1111111111111111}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fmm-def99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 62.9%
associate-*r/63.0%
metadata-eval63.0%
Simplified63.0%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fmm-def99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 62.9%
associate-*r/63.0%
metadata-eval63.0%
Simplified63.0%
Taylor expanded in x around inf 33.6%
(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 2024163
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(! :herbie-platform default (- (- 1 (/ (/ 1 x) 9)) (/ y (* 3 (sqrt x)))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))