
(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 16 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.1e+83) (not (<= y 1.5e+21))) (- 1.0 (* (/ y (sqrt x)) 0.3333333333333333)) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -2.1e+83) || !(y <= 1.5e+21)) {
tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333);
} 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.1d+83)) .or. (.not. (y <= 1.5d+21))) then
tmp = 1.0d0 - ((y / sqrt(x)) * 0.3333333333333333d0)
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.1e+83) || !(y <= 1.5e+21)) {
tmp = 1.0 - ((y / Math.sqrt(x)) * 0.3333333333333333);
} else {
tmp = 1.0 + ((-1.0 / x) / 9.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.1e+83) or not (y <= 1.5e+21): tmp = 1.0 - ((y / math.sqrt(x)) * 0.3333333333333333) else: tmp = 1.0 + ((-1.0 / x) / 9.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.1e+83) || !(y <= 1.5e+21)) tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) * 0.3333333333333333)); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.1e+83) || ~((y <= 1.5e+21))) tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333); else tmp = 1.0 + ((-1.0 / x) / 9.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.1e+83], N[Not[LessEqual[y, 1.5e+21]], $MachinePrecision]], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+83} \lor \neg \left(y \leq 1.5 \cdot 10^{+21}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x}} \cdot 0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -2.10000000000000002e83 or 1.5e21 < y Initial program 99.6%
Taylor expanded in x around inf 95.0%
*-commutative89.1%
sqrt-div89.1%
metadata-eval89.1%
un-div-inv89.2%
Applied egg-rr95.1%
if -2.10000000000000002e83 < y < 1.5e21Initial 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 96.9%
add-sqr-sqrt0.0%
sqrt-unprod50.3%
frac-times50.3%
metadata-eval50.3%
metadata-eval50.3%
frac-times50.3%
sqrt-unprod50.4%
add-sqr-sqrt50.4%
frac-2neg50.4%
metadata-eval50.4%
distribute-frac-neg250.4%
Applied egg-rr50.4%
add-sqr-sqrt0.0%
sqrt-unprod73.4%
frac-times73.5%
metadata-eval73.5%
metadata-eval73.5%
frac-times73.4%
sqrt-unprod96.7%
add-sqr-sqrt96.9%
clear-num96.9%
div-inv96.9%
metadata-eval96.9%
inv-pow96.9%
Applied egg-rr96.9%
unpow-196.9%
associate-/r*97.0%
Applied egg-rr97.0%
Final simplification96.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (sqrt x))))
(if (<= y -2.1e+83)
(- 1.0 (/ t_0 3.0))
(if (<= y 2.1e+21)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(- 1.0 (* t_0 0.3333333333333333))))))
double code(double x, double y) {
double t_0 = y / sqrt(x);
double tmp;
if (y <= -2.1e+83) {
tmp = 1.0 - (t_0 / 3.0);
} else if (y <= 2.1e+21) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - (t_0 * 0.3333333333333333);
}
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)
if (y <= (-2.1d+83)) then
tmp = 1.0d0 - (t_0 / 3.0d0)
else if (y <= 2.1d+21) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 - (t_0 * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / Math.sqrt(x);
double tmp;
if (y <= -2.1e+83) {
tmp = 1.0 - (t_0 / 3.0);
} else if (y <= 2.1e+21) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - (t_0 * 0.3333333333333333);
}
return tmp;
}
def code(x, y): t_0 = y / math.sqrt(x) tmp = 0 if y <= -2.1e+83: tmp = 1.0 - (t_0 / 3.0) elif y <= 2.1e+21: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 - (t_0 * 0.3333333333333333) return tmp
function code(x, y) t_0 = Float64(y / sqrt(x)) tmp = 0.0 if (y <= -2.1e+83) tmp = Float64(1.0 - Float64(t_0 / 3.0)); elseif (y <= 2.1e+21) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 - Float64(t_0 * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / sqrt(x); tmp = 0.0; if (y <= -2.1e+83) tmp = 1.0 - (t_0 / 3.0); elseif (y <= 2.1e+21) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 - (t_0 * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+83], N[(1.0 - N[(t$95$0 / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+21], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(t$95$0 * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{\sqrt{x}}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;1 - \frac{t\_0}{3}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+21}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 - t\_0 \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -2.10000000000000002e83Initial program 99.4%
Taylor expanded in x around inf 96.4%
metadata-eval96.4%
*-commutative96.4%
sqrt-div96.4%
metadata-eval96.4%
un-div-inv96.4%
times-frac96.2%
*-un-lft-identity96.2%
*-commutative96.2%
associate-/r*96.4%
Applied egg-rr96.4%
if -2.10000000000000002e83 < y < 2.1e21Initial 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 96.9%
add-sqr-sqrt0.0%
sqrt-unprod50.3%
frac-times50.3%
metadata-eval50.3%
metadata-eval50.3%
frac-times50.3%
sqrt-unprod50.4%
add-sqr-sqrt50.4%
frac-2neg50.4%
metadata-eval50.4%
distribute-frac-neg250.4%
Applied egg-rr50.4%
add-sqr-sqrt0.0%
sqrt-unprod73.4%
frac-times73.5%
metadata-eval73.5%
metadata-eval73.5%
frac-times73.4%
sqrt-unprod96.7%
add-sqr-sqrt96.9%
clear-num96.9%
div-inv96.9%
metadata-eval96.9%
inv-pow96.9%
Applied egg-rr96.9%
unpow-196.9%
associate-/r*97.0%
Applied egg-rr97.0%
if 2.1e21 < y Initial program 99.8%
Taylor expanded in x around inf 93.9%
*-commutative83.0%
sqrt-div82.9%
metadata-eval82.9%
un-div-inv83.1%
Applied egg-rr94.0%
Final simplification96.2%
(FPCore (x y)
:precision binary64
(if (<= y -2.1e+83)
(- 1.0 (/ (/ y (sqrt x)) 3.0))
(if (<= y 2.1e+21)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(+ 1.0 (/ y (* (sqrt x) -3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -2.1e+83) {
tmp = 1.0 - ((y / sqrt(x)) / 3.0);
} else if (y <= 2.1e+21) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2.1d+83)) then
tmp = 1.0d0 - ((y / sqrt(x)) / 3.0d0)
else if (y <= 2.1d+21) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.1e+83) {
tmp = 1.0 - ((y / Math.sqrt(x)) / 3.0);
} else if (y <= 2.1e+21) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.1e+83: tmp = 1.0 - ((y / math.sqrt(x)) / 3.0) elif y <= 2.1e+21: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.1e+83) tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) / 3.0)); elseif (y <= 2.1e+21) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.1e+83) tmp = 1.0 - ((y / sqrt(x)) / 3.0); elseif (y <= 2.1e+21) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 + (y / (sqrt(x) * -3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.1e+83], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+21], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;1 - \frac{\frac{y}{\sqrt{x}}}{3}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+21}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -2.10000000000000002e83Initial program 99.4%
Taylor expanded in x around inf 96.4%
metadata-eval96.4%
*-commutative96.4%
sqrt-div96.4%
metadata-eval96.4%
un-div-inv96.4%
times-frac96.2%
*-un-lft-identity96.2%
*-commutative96.2%
associate-/r*96.4%
Applied egg-rr96.4%
if -2.10000000000000002e83 < y < 2.1e21Initial 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 96.9%
add-sqr-sqrt0.0%
sqrt-unprod50.3%
frac-times50.3%
metadata-eval50.3%
metadata-eval50.3%
frac-times50.3%
sqrt-unprod50.4%
add-sqr-sqrt50.4%
frac-2neg50.4%
metadata-eval50.4%
distribute-frac-neg250.4%
Applied egg-rr50.4%
add-sqr-sqrt0.0%
sqrt-unprod73.4%
frac-times73.5%
metadata-eval73.5%
metadata-eval73.5%
frac-times73.4%
sqrt-unprod96.7%
add-sqr-sqrt96.9%
clear-num96.9%
div-inv96.9%
metadata-eval96.9%
inv-pow96.9%
Applied egg-rr96.9%
unpow-196.9%
associate-/r*97.0%
Applied egg-rr97.0%
if 2.1e21 < y Initial program 99.8%
Taylor expanded in x around inf 93.9%
metadata-eval93.9%
*-commutative93.9%
sqrt-div93.8%
metadata-eval93.8%
un-div-inv94.0%
times-frac94.1%
*-un-lft-identity94.1%
frac-2neg94.1%
*-commutative94.1%
distribute-rgt-neg-in94.1%
metadata-eval94.1%
Applied egg-rr94.1%
Final simplification96.2%
(FPCore (x y) :precision binary64 (if (or (<= y -2.26e+83) (not (<= y 1.95e+60))) (* -0.3333333333333333 (/ y (sqrt x))) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -2.26e+83) || !(y <= 1.95e+60)) {
tmp = -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 <= (-2.26d+83)) .or. (.not. (y <= 1.95d+60))) then
tmp = (-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 <= -2.26e+83) || !(y <= 1.95e+60)) {
tmp = -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 <= -2.26e+83) or not (y <= 1.95e+60): tmp = -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 <= -2.26e+83) || !(y <= 1.95e+60)) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.26e+83) || ~((y <= 1.95e+60))) tmp = -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, -2.26e+83], N[Not[LessEqual[y, 1.95e+60]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.26 \cdot 10^{+83} \lor \neg \left(y \leq 1.95 \cdot 10^{+60}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -2.2599999999999999e83 or 1.95000000000000015e60 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 94.6%
*-commutative94.6%
sqrt-div94.6%
metadata-eval94.6%
un-div-inv94.7%
Applied egg-rr94.7%
if -2.2599999999999999e83 < y < 1.95000000000000015e60Initial 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 95.9%
add-sqr-sqrt0.0%
sqrt-unprod50.9%
frac-times50.9%
metadata-eval50.9%
metadata-eval50.9%
frac-times50.9%
sqrt-unprod51.0%
add-sqr-sqrt51.0%
frac-2neg51.0%
metadata-eval51.0%
distribute-frac-neg251.0%
Applied egg-rr51.0%
add-sqr-sqrt0.0%
sqrt-unprod73.0%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.0%
sqrt-unprod95.8%
add-sqr-sqrt95.9%
clear-num95.9%
div-inv96.0%
metadata-eval96.0%
inv-pow96.0%
Applied egg-rr96.0%
unpow-196.0%
associate-/r*96.0%
Applied egg-rr96.0%
Final simplification95.5%
(FPCore (x y) :precision binary64 (if (<= y -5.5e+83) (* -0.3333333333333333 (/ y (sqrt x))) (if (<= y 1.95e+60) (+ 1.0 (/ (/ -1.0 x) 9.0)) (/ y (* (sqrt x) -3.0)))))
double code(double x, double y) {
double tmp;
if (y <= -5.5e+83) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 1.95e+60) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = y / (sqrt(x) * -3.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-5.5d+83)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 1.95d+60) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = y / (sqrt(x) * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -5.5e+83) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 1.95e+60) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = y / (Math.sqrt(x) * -3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5.5e+83: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 1.95e+60: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = y / (math.sqrt(x) * -3.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -5.5e+83) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 1.95e+60) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(y / Float64(sqrt(x) * -3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -5.5e+83) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 1.95e+60) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = y / (sqrt(x) * -3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5.5e+83], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e+60], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+83}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+60}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -5.4999999999999996e83Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 96.2%
*-commutative96.2%
sqrt-div96.2%
metadata-eval96.2%
un-div-inv96.2%
Applied egg-rr96.2%
if -5.4999999999999996e83 < y < 1.95000000000000015e60Initial 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 95.9%
add-sqr-sqrt0.0%
sqrt-unprod50.9%
frac-times50.9%
metadata-eval50.9%
metadata-eval50.9%
frac-times50.9%
sqrt-unprod51.0%
add-sqr-sqrt51.0%
frac-2neg51.0%
metadata-eval51.0%
distribute-frac-neg251.0%
Applied egg-rr51.0%
add-sqr-sqrt0.0%
sqrt-unprod73.0%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.0%
sqrt-unprod95.8%
add-sqr-sqrt95.9%
clear-num95.9%
div-inv96.0%
metadata-eval96.0%
inv-pow96.0%
Applied egg-rr96.0%
unpow-196.0%
associate-/r*96.0%
Applied egg-rr96.0%
if 1.95000000000000015e60 < y 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 y around inf 93.0%
sqrt-div93.0%
metadata-eval93.0%
associate-/r/93.0%
un-div-inv92.9%
Applied egg-rr92.9%
associate-/r/92.9%
*-commutative92.9%
Simplified92.9%
clear-num92.8%
un-div-inv93.0%
div-inv93.2%
metadata-eval93.2%
Applied egg-rr93.2%
Final simplification95.5%
(FPCore (x y) :precision binary64 (if (<= y -3.9e+83) (/ (/ y (sqrt x)) -3.0) (if (<= y 1.95e+60) (+ 1.0 (/ (/ -1.0 x) 9.0)) (/ y (* (sqrt x) -3.0)))))
double code(double x, double y) {
double tmp;
if (y <= -3.9e+83) {
tmp = (y / sqrt(x)) / -3.0;
} else if (y <= 1.95e+60) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = y / (sqrt(x) * -3.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-3.9d+83)) then
tmp = (y / sqrt(x)) / (-3.0d0)
else if (y <= 1.95d+60) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = y / (sqrt(x) * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.9e+83) {
tmp = (y / Math.sqrt(x)) / -3.0;
} else if (y <= 1.95e+60) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = y / (Math.sqrt(x) * -3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.9e+83: tmp = (y / math.sqrt(x)) / -3.0 elif y <= 1.95e+60: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = y / (math.sqrt(x) * -3.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.9e+83) tmp = Float64(Float64(y / sqrt(x)) / -3.0); elseif (y <= 1.95e+60) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(y / Float64(sqrt(x) * -3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.9e+83) tmp = (y / sqrt(x)) / -3.0; elseif (y <= 1.95e+60) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = y / (sqrt(x) * -3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.9e+83], N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, 1.95e+60], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+83}:\\
\;\;\;\;\frac{\frac{y}{\sqrt{x}}}{-3}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+60}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -3.9000000000000002e83Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 96.2%
sqrt-div96.2%
metadata-eval96.2%
associate-/r/96.1%
un-div-inv96.1%
Applied egg-rr96.1%
associate-/r/96.0%
*-commutative96.0%
Simplified96.0%
clear-num95.8%
un-div-inv96.2%
div-inv96.1%
metadata-eval96.1%
Applied egg-rr96.1%
associate-/r*96.2%
Simplified96.2%
if -3.9000000000000002e83 < y < 1.95000000000000015e60Initial 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 95.9%
add-sqr-sqrt0.0%
sqrt-unprod50.9%
frac-times50.9%
metadata-eval50.9%
metadata-eval50.9%
frac-times50.9%
sqrt-unprod51.0%
add-sqr-sqrt51.0%
frac-2neg51.0%
metadata-eval51.0%
distribute-frac-neg251.0%
Applied egg-rr51.0%
add-sqr-sqrt0.0%
sqrt-unprod73.0%
frac-times73.1%
metadata-eval73.1%
metadata-eval73.1%
frac-times73.0%
sqrt-unprod95.8%
add-sqr-sqrt95.9%
clear-num95.9%
div-inv96.0%
metadata-eval96.0%
inv-pow96.0%
Applied egg-rr96.0%
unpow-196.0%
associate-/r*96.0%
Applied egg-rr96.0%
if 1.95000000000000015e60 < y 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 y around inf 93.0%
sqrt-div93.0%
metadata-eval93.0%
associate-/r/93.0%
un-div-inv92.9%
Applied egg-rr92.9%
associate-/r/92.9%
*-commutative92.9%
Simplified92.9%
clear-num92.8%
un-div-inv93.0%
div-inv93.2%
metadata-eval93.2%
Applied egg-rr93.2%
Final simplification95.5%
(FPCore (x y) :precision binary64 (if (<= x 1.8e-8) (/ (- (* 0.3333333333333333 (* y (- (sqrt x)))) 0.1111111111111111) x) (- 1.0 (/ (/ y (sqrt x)) 3.0))))
double code(double x, double y) {
double tmp;
if (x <= 1.8e-8) {
tmp = ((0.3333333333333333 * (y * -sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - ((y / sqrt(x)) / 3.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.8d-8) then
tmp = ((0.3333333333333333d0 * (y * -sqrt(x))) - 0.1111111111111111d0) / x
else
tmp = 1.0d0 - ((y / sqrt(x)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.8e-8) {
tmp = ((0.3333333333333333 * (y * -Math.sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - ((y / Math.sqrt(x)) / 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.8e-8: tmp = ((0.3333333333333333 * (y * -math.sqrt(x))) - 0.1111111111111111) / x else: tmp = 1.0 - ((y / math.sqrt(x)) / 3.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.8e-8) tmp = Float64(Float64(Float64(0.3333333333333333 * Float64(y * Float64(-sqrt(x)))) - 0.1111111111111111) / x); else tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) / 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.8e-8) tmp = ((0.3333333333333333 * (y * -sqrt(x))) - 0.1111111111111111) / x; else tmp = 1.0 - ((y / sqrt(x)) / 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.8e-8], N[(N[(N[(0.3333333333333333 * N[(y * (-N[Sqrt[x], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \left(y \cdot \left(-\sqrt{x}\right)\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{\sqrt{x}}}{3}\\
\end{array}
\end{array}
if x < 1.79999999999999991e-8Initial program 99.5%
Taylor expanded in x around 0 98.7%
mul-1-neg98.7%
*-commutative98.7%
Simplified98.7%
if 1.79999999999999991e-8 < x Initial program 99.8%
Taylor expanded in x around inf 99.1%
metadata-eval99.1%
*-commutative99.1%
sqrt-div99.1%
metadata-eval99.1%
un-div-inv99.1%
times-frac99.1%
*-un-lft-identity99.1%
*-commutative99.1%
associate-/r*99.2%
Applied egg-rr99.2%
Final simplification99.0%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (<= x 0.00092) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.00092) {
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.00092d0) 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.00092) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.00092: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.00092) 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.00092) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.00092], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00092:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 9.2000000000000003e-4Initial 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 99.4%
associate--r+99.4%
associate-*r*99.5%
Simplified99.5%
Taylor expanded in y around 0 62.3%
Taylor expanded in x around 0 61.7%
if 9.2000000000000003e-4 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in x around 0 87.6%
associate--r+87.6%
associate-*r*87.6%
Simplified87.6%
Taylor expanded in y around 0 63.0%
Taylor expanded in x around inf 62.6%
Final simplification62.2%
(FPCore (x y) :precision binary64 (+ 1.0 (* 0.1111111111111111 (/ -1.0 x))))
double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end function
public static double code(double x, double y) {
return 1.0 + (0.1111111111111111 * (-1.0 / x));
}
def code(x, y): return 1.0 + (0.1111111111111111 * (-1.0 / x))
function code(x, y) return Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))) end
function tmp = code(x, y) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end
code[x_, y_] := N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + 0.1111111111111111 \cdot \frac{-1}{x}
\end{array}
Initial program 99.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%
Taylor expanded in y around 0 62.7%
Final simplification62.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.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 62.7%
add-sqr-sqrt0.0%
sqrt-unprod34.8%
frac-times34.8%
metadata-eval34.8%
metadata-eval34.8%
frac-times34.8%
sqrt-unprod33.3%
add-sqr-sqrt33.3%
frac-2neg33.3%
metadata-eval33.3%
distribute-frac-neg233.3%
Applied egg-rr33.3%
add-sqr-sqrt0.0%
sqrt-unprod49.4%
frac-times49.4%
metadata-eval49.4%
metadata-eval49.4%
frac-times49.4%
sqrt-unprod62.6%
add-sqr-sqrt62.7%
clear-num62.7%
div-inv62.7%
metadata-eval62.7%
inv-pow62.7%
Applied egg-rr62.7%
unpow-162.7%
Applied egg-rr62.7%
Final simplification62.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(Float64(-1.0 / 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[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{\frac{-1}{x}}{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.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 62.7%
add-sqr-sqrt0.0%
sqrt-unprod34.8%
frac-times34.8%
metadata-eval34.8%
metadata-eval34.8%
frac-times34.8%
sqrt-unprod33.3%
add-sqr-sqrt33.3%
frac-2neg33.3%
metadata-eval33.3%
distribute-frac-neg233.3%
Applied egg-rr33.3%
add-sqr-sqrt0.0%
sqrt-unprod49.4%
frac-times49.4%
metadata-eval49.4%
metadata-eval49.4%
frac-times49.4%
sqrt-unprod62.6%
add-sqr-sqrt62.7%
clear-num62.7%
div-inv62.7%
metadata-eval62.7%
inv-pow62.7%
Applied egg-rr62.7%
unpow-162.7%
associate-/r*62.7%
Applied egg-rr62.7%
Final simplification62.7%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y): return 1.0 + (-0.1111111111111111 / x)
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 62.7%
Final simplification62.7%
(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%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 93.3%
associate--r+93.3%
associate-*r*93.3%
Simplified93.3%
Taylor expanded in y around 0 62.7%
Taylor expanded in x around inf 33.2%
Final simplification33.2%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - ((1.0d0 / x) / 9.0d0)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(Float64(1.0 / x) / 9.0)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(N[(1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
herbie shell --seed 2024077
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))