
(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 18 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 -9e+67) (not (<= y 1.65e+72))) (- 1.0 (/ y (sqrt (* x 9.0)))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -9e+67) || !(y <= 1.65e+72)) {
tmp = 1.0 - (y / sqrt((x * 9.0)));
} else {
tmp = 1.0 - pow((x * 9.0), -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-9d+67)) .or. (.not. (y <= 1.65d+72))) then
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
else
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -9e+67) || !(y <= 1.65e+72)) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -9e+67) or not (y <= 1.65e+72): tmp = 1.0 - (y / math.sqrt((x * 9.0))) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -9e+67) || !(y <= 1.65e+72)) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); else tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -9e+67) || ~((y <= 1.65e+72))) tmp = 1.0 - (y / sqrt((x * 9.0))); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -9e+67], N[Not[LessEqual[y, 1.65e+72]], $MachinePrecision]], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+67} \lor \neg \left(y \leq 1.65 \cdot 10^{+72}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -8.9999999999999997e67 or 1.65e72 < 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.3%
if -8.9999999999999997e67 < y < 1.65e72Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
metadata-eval97.3%
associate-/r*97.4%
*-commutative97.4%
inv-pow97.4%
Applied egg-rr97.4%
Final simplification97.0%
(FPCore (x y) :precision binary64 (if (or (<= y -2.45e+67) (not (<= y 9.5e+71))) (+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -2.45e+67) || !(y <= 9.5e+71)) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else {
tmp = 1.0 - pow((x * 9.0), -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.45d+67)) .or. (.not. (y <= 9.5d+71))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.45e+67) || !(y <= 9.5e+71)) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.45e+67) or not (y <= 9.5e+71): tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.45e+67) || !(y <= 9.5e+71)) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); else tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.45e+67) || ~((y <= 9.5e+71))) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.45e+67], N[Not[LessEqual[y, 9.5e+71]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{+67} \lor \neg \left(y \leq 9.5 \cdot 10^{+71}\right):\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -2.44999999999999995e67 or 9.50000000000000015e71 < y Initial program 99.6%
sub-neg99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.3%
metadata-eval99.3%
Simplified99.3%
clear-num99.3%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 96.1%
if -2.44999999999999995e67 < y < 9.50000000000000015e71Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
metadata-eval97.3%
associate-/r*97.4%
*-commutative97.4%
inv-pow97.4%
Applied egg-rr97.4%
Final simplification96.9%
(FPCore (x y) :precision binary64 (if (or (<= y -1.9e+69) (not (<= y 1.05e+72))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -1.9e+69) || !(y <= 1.05e+72)) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else {
tmp = 1.0 - pow((x * 9.0), -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.9d+69)) .or. (.not. (y <= 1.05d+72))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.9e+69) || !(y <= 1.05e+72)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.9e+69) or not (y <= 1.05e+72): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.9e+69) || !(y <= 1.05e+72)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); else tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.9e+69) || ~((y <= 1.05e+72))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.9e+69], N[Not[LessEqual[y, 1.05e+72]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+69} \lor \neg \left(y \leq 1.05 \cdot 10^{+72}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -1.90000000000000014e69 or 1.0500000000000001e72 < y Initial program 99.6%
sub-neg99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around inf 95.9%
if -1.90000000000000014e69 < y < 1.0500000000000001e72Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
associate-*r/97.3%
metadata-eval97.3%
Simplified97.3%
metadata-eval97.3%
associate-/r*97.4%
*-commutative97.4%
inv-pow97.4%
Applied egg-rr97.4%
Final simplification96.9%
(FPCore (x y)
:precision binary64
(if (<= y -3.65e+71)
(/ -0.3333333333333333 (/ (sqrt x) y))
(if (<= y 3e+77)
(- 1.0 (pow (* x 9.0) -1.0))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -3.65e+71) {
tmp = -0.3333333333333333 / (sqrt(x) / y);
} else if (y <= 3e+77) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} 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 <= (-3.65d+71)) then
tmp = (-0.3333333333333333d0) / (sqrt(x) / y)
else if (y <= 3d+77) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
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 <= -3.65e+71) {
tmp = -0.3333333333333333 / (Math.sqrt(x) / y);
} else if (y <= 3e+77) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.65e+71: tmp = -0.3333333333333333 / (math.sqrt(x) / y) elif y <= 3e+77: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = (y * -0.3333333333333333) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.65e+71) tmp = Float64(-0.3333333333333333 / Float64(sqrt(x) / y)); elseif (y <= 3e+77) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.65e+71) tmp = -0.3333333333333333 / (sqrt(x) / y); elseif (y <= 3e+77) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.65e+71], N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+77], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.65 \cdot 10^{+71}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+77}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -3.64999999999999998e71Initial 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 inf 90.4%
associate-*r*90.4%
Simplified90.4%
sqrt-div90.5%
metadata-eval90.5%
div-inv90.5%
associate-/r/90.5%
Applied egg-rr90.5%
if -3.64999999999999998e71 < y < 2.9999999999999998e77Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
associate-*r/97.4%
metadata-eval97.4%
Simplified97.4%
metadata-eval97.4%
associate-/r*97.4%
*-commutative97.4%
inv-pow97.4%
Applied egg-rr97.4%
if 2.9999999999999998e77 < 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 y around inf 92.9%
associate-*r*92.9%
*-commutative92.9%
unpow1/292.9%
rem-exp-log88.1%
exp-neg88.1%
exp-prod88.1%
distribute-lft-neg-out88.1%
exp-neg88.1%
exp-to-pow93.0%
unpow1/293.0%
associate-*l/92.8%
metadata-eval92.8%
*-commutative92.8%
associate-*r/93.1%
Simplified93.1%
(FPCore (x y) :precision binary64 (if (or (<= y -1.65e+72) (not (<= y 8.6e+78))) (/ -0.3333333333333333 (/ (sqrt x) y)) (+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.65e+72) || !(y <= 8.6e+78)) {
tmp = -0.3333333333333333 / (sqrt(x) / y);
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-1.65d+72)) .or. (.not. (y <= 8.6d+78))) then
tmp = (-0.3333333333333333d0) / (sqrt(x) / y)
else
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.65e+72) || !(y <= 8.6e+78)) {
tmp = -0.3333333333333333 / (Math.sqrt(x) / y);
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.65e+72) or not (y <= 8.6e+78): tmp = -0.3333333333333333 / (math.sqrt(x) / y) else: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.65e+72) || !(y <= 8.6e+78)) tmp = Float64(-0.3333333333333333 / Float64(sqrt(x) / y)); else tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.65e+72) || ~((y <= 8.6e+78))) tmp = -0.3333333333333333 / (sqrt(x) / y); else tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.65e+72], N[Not[LessEqual[y, 8.6e+78]], $MachinePrecision]], N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+72} \lor \neg \left(y \leq 8.6 \cdot 10^{+78}\right):\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{else}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\end{array}
\end{array}
if y < -1.65e72 or 8.59999999999999962e78 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.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 inf 91.6%
associate-*r*91.6%
Simplified91.6%
sqrt-div91.7%
metadata-eval91.7%
div-inv91.6%
associate-/r/91.7%
Applied egg-rr91.7%
if -1.65e72 < y < 8.59999999999999962e78Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
Final simplification95.4%
(FPCore (x y) :precision binary64 (if (or (<= y -2.2e+70) (not (<= y 3.6e+80))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -2.2e+70) || !(y <= 3.6e+80)) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.2d+70)) .or. (.not. (y <= 3.6d+80))) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.2e+70) || !(y <= 3.6e+80)) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.2e+70) or not (y <= 3.6e+80): tmp = y * (-0.3333333333333333 / math.sqrt(x)) else: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.2e+70) || !(y <= 3.6e+80)) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); else tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.2e+70) || ~((y <= 3.6e+80))) tmp = y * (-0.3333333333333333 / sqrt(x)); else tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.2e+70], N[Not[LessEqual[y, 3.6e+80]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+70} \lor \neg \left(y \leq 3.6 \cdot 10^{+80}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\end{array}
\end{array}
if y < -2.20000000000000001e70 or 3.59999999999999995e80 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.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 inf 91.6%
associate-*r*91.6%
Simplified91.6%
sqrt-div91.7%
metadata-eval91.7%
div-inv91.6%
clear-num91.6%
Applied egg-rr91.6%
associate-/r/91.7%
associate-*l/91.6%
metadata-eval91.6%
Simplified91.6%
if -2.20000000000000001e70 < y < 3.59999999999999995e80Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
Final simplification95.3%
(FPCore (x y)
:precision binary64
(if (<= y -1.7e+72)
(/ -0.3333333333333333 (/ (sqrt x) y))
(if (<= y 4.4e+79)
(+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -1.7e+72) {
tmp = -0.3333333333333333 / (sqrt(x) / y);
} else if (y <= 4.4e+79) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = (y * -0.3333333333333333) / sqrt(x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.7d+72)) then
tmp = (-0.3333333333333333d0) / (sqrt(x) / y)
else if (y <= 4.4d+79) then
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
else
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.7e+72) {
tmp = -0.3333333333333333 / (Math.sqrt(x) / y);
} else if (y <= 4.4e+79) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.7e+72: tmp = -0.3333333333333333 / (math.sqrt(x) / y) elif y <= 4.4e+79: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) else: tmp = (y * -0.3333333333333333) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.7e+72) tmp = Float64(-0.3333333333333333 / Float64(sqrt(x) / y)); elseif (y <= 4.4e+79) tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); else tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.7e+72) tmp = -0.3333333333333333 / (sqrt(x) / y); elseif (y <= 4.4e+79) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.7e+72], N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+79], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+72}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+79}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.6999999999999999e72Initial 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 inf 90.4%
associate-*r*90.4%
Simplified90.4%
sqrt-div90.5%
metadata-eval90.5%
div-inv90.5%
associate-/r/90.5%
Applied egg-rr90.5%
if -1.6999999999999999e72 < y < 4.3999999999999998e79Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
if 4.3999999999999998e79 < 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 y around inf 92.9%
associate-*r*92.9%
*-commutative92.9%
unpow1/292.9%
rem-exp-log88.1%
exp-neg88.1%
exp-prod88.1%
distribute-lft-neg-out88.1%
exp-neg88.1%
exp-to-pow93.0%
unpow1/293.0%
associate-*l/92.8%
metadata-eval92.8%
*-commutative92.8%
associate-*r/93.1%
Simplified93.1%
Final simplification95.4%
(FPCore (x y)
:precision binary64
(if (<= y -2e+72)
(* y (/ -0.3333333333333333 (sqrt x)))
(if (<= y 2.1e+80)
(+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))
(* -0.3333333333333333 (/ y (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -2e+72) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else if (y <= 2.1e+80) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / 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 <= (-2d+72)) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else if (y <= 2.1d+80) then
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / 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 <= -2e+72) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else if (y <= 2.1e+80) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2e+72: tmp = y * (-0.3333333333333333 / math.sqrt(x)) elif y <= 2.1e+80: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) else: tmp = -0.3333333333333333 * (y / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2e+72) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); elseif (y <= 2.1e+80) tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / 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 <= -2e+72) tmp = y * (-0.3333333333333333 / sqrt(x)); elseif (y <= 2.1e+80) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); else tmp = -0.3333333333333333 * (y / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2e+72], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+80], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+72}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+80}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.99999999999999989e72Initial 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 inf 90.4%
associate-*r*90.4%
Simplified90.4%
sqrt-div90.5%
metadata-eval90.5%
div-inv90.5%
clear-num90.5%
Applied egg-rr90.5%
associate-/r/90.5%
associate-*l/90.5%
metadata-eval90.5%
Simplified90.5%
if -1.99999999999999989e72 < y < 2.10000000000000001e80Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
if 2.10000000000000001e80 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.4%
fma-neg99.4%
associate-/r*99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 92.9%
associate-*r*92.9%
Simplified92.9%
sqrt-div93.0%
metadata-eval93.0%
div-inv92.8%
associate-/r/92.9%
Applied egg-rr92.9%
metadata-eval92.9%
associate-*l/92.9%
clear-num92.9%
Applied egg-rr92.9%
Final simplification95.3%
(FPCore (x y) :precision binary64 (let* ((t_0 (/ y (sqrt (* x 9.0))))) (if (<= x 0.015) (- (/ -0.1111111111111111 x) t_0) (- 1.0 t_0))))
double code(double x, double y) {
double t_0 = y / sqrt((x * 9.0));
double tmp;
if (x <= 0.015) {
tmp = (-0.1111111111111111 / x) - t_0;
} else {
tmp = 1.0 - t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / sqrt((x * 9.0d0))
if (x <= 0.015d0) then
tmp = ((-0.1111111111111111d0) / x) - t_0
else
tmp = 1.0d0 - t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / Math.sqrt((x * 9.0));
double tmp;
if (x <= 0.015) {
tmp = (-0.1111111111111111 / x) - t_0;
} else {
tmp = 1.0 - t_0;
}
return tmp;
}
def code(x, y): t_0 = y / math.sqrt((x * 9.0)) tmp = 0 if x <= 0.015: tmp = (-0.1111111111111111 / x) - t_0 else: tmp = 1.0 - t_0 return tmp
function code(x, y) t_0 = Float64(y / sqrt(Float64(x * 9.0))) tmp = 0.0 if (x <= 0.015) tmp = Float64(Float64(-0.1111111111111111 / x) - t_0); else tmp = Float64(1.0 - t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = y / sqrt((x * 9.0)); tmp = 0.0; if (x <= 0.015) tmp = (-0.1111111111111111 / x) - t_0; else tmp = 1.0 - t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 0.015], N[(N[(-0.1111111111111111 / x), $MachinePrecision] - t$95$0), $MachinePrecision], N[(1.0 - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{if}\;x \leq 0.015:\\
\;\;\;\;\frac{-0.1111111111111111}{x} - t\_0\\
\mathbf{else}:\\
\;\;\;\;1 - t\_0\\
\end{array}
\end{array}
if x < 0.014999999999999999Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
Taylor expanded in x around 0 98.4%
if 0.014999999999999999 < 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%
Taylor expanded in x around inf 97.9%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ -1.0 (* (sqrt x) (/ 3.0 y)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-1.0 / (sqrt(x) * (3.0 / y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-1.0d0) / (sqrt(x) * (3.0d0 / y)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-1.0 / (Math.sqrt(x) * (3.0 / y)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-1.0 / (math.sqrt(x) * (3.0 / y)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-1.0 / Float64(sqrt(x) * Float64(3.0 / y)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-1.0 / (sqrt(x) * (3.0 / y))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{-1}{\sqrt{x} \cdot \frac{3}{y}}
\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.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
associate-*l/99.6%
associate-*r/99.6%
frac-2neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
div-inv99.6%
distribute-neg-frac299.6%
associate-/r*99.7%
clear-num99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/l*99.6%
Applied egg-rr99.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.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
associate-*l/99.6%
Applied egg-rr99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ -0.3333333333333333 (/ (sqrt x) y))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (sqrt(x) / y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) / (sqrt(x) / y))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (Math.sqrt(x) / y));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (math.sqrt(x) / y))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 / (sqrt(x) / y)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}
\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.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.5%
un-div-inv99.6%
Applied egg-rr99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
(FPCore (x y) :precision binary64 (if (<= x 0.015) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.015) {
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.015d0) 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.015) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.015: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.015) 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.015) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.015], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.015:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.014999999999999999Initial 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.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 y around 0 66.8%
associate-*r/66.8%
metadata-eval66.8%
Simplified66.8%
Taylor expanded in x around 0 66.8%
Taylor expanded in x around 0 66.0%
if 0.014999999999999999 < 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%
fma-neg99.8%
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 65.6%
associate-*r/65.6%
metadata-eval65.6%
Simplified65.6%
Taylor expanded in x around inf 63.9%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.1111111111111111 (/ -1.0 x))))
double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end function
public static double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
def code(x, y): return 1.0 + (0.1111111111111111 * (-1.0 / x))
function code(x, y) return Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))) end
function tmp = code(x, y) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end
code[x_, y_] := N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.1111111111111111 \cdot \frac{-1}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.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 66.1%
Final simplification66.1%
(FPCore (x y) :precision binary64 (- 1.0 (/ 0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (0.1111111111111111d0 / x)
end function
public static double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
def code(x, y): return 1.0 - (0.1111111111111111 / x)
function code(x, y) return Float64(1.0 - Float64(0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 - (0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{0.1111111111111111}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.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 66.1%
associate-*r/66.1%
metadata-eval66.1%
Simplified66.1%
(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%
fma-neg99.7%
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 66.1%
associate-*r/66.1%
metadata-eval66.1%
Simplified66.1%
Taylor expanded in x around inf 36.1%
(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 2024145
(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)))))