
(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.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y) :precision binary64 (if (or (<= y -4.2e+32) (not (<= y 1.5e+15))) (- 1.0 (/ y (sqrt (* x 9.0)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -4.2e+32) || !(y <= 1.5e+15)) {
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 <= (-4.2d+32)) .or. (.not. (y <= 1.5d+15))) 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 <= -4.2e+32) || !(y <= 1.5e+15)) {
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 <= -4.2e+32) or not (y <= 1.5e+15): 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 <= -4.2e+32) || !(y <= 1.5e+15)) 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 <= -4.2e+32) || ~((y <= 1.5e+15))) 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, -4.2e+32], N[Not[LessEqual[y, 1.5e+15]], $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 -4.2 \cdot 10^{+32} \lor \neg \left(y \leq 1.5 \cdot 10^{+15}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -4.2000000000000001e32 or 1.5e15 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around inf 91.7%
if -4.2000000000000001e32 < y < 1.5e15Initial 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 99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
expm1-log1p-u95.4%
expm1-undefine95.3%
log1p-undefine95.3%
add-exp-log99.4%
add-sqr-sqrt99.2%
sqrt-unprod74.6%
frac-times74.6%
metadata-eval74.6%
metadata-eval74.6%
frac-times74.6%
sqrt-unprod0.0%
add-sqr-sqrt51.1%
Applied egg-rr51.1%
+-commutative51.1%
associate--l+51.1%
metadata-eval51.1%
Simplified51.1%
+-rgt-identity51.1%
clear-num51.1%
div-inv51.1%
metadata-eval51.1%
Applied egg-rr51.1%
add-sqr-sqrt0.0%
sqrt-unprod75.0%
swap-sqr74.9%
metadata-eval74.9%
metadata-eval74.9%
swap-sqr75.0%
sqrt-unprod99.3%
add-sqr-sqrt99.6%
metadata-eval99.6%
distribute-rgt-neg-in99.6%
neg-sub099.6%
Applied egg-rr99.6%
neg-sub099.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification96.2%
(FPCore (x y) :precision binary64 (if (or (<= y -3.6e+28) (not (<= y 9.8e+14))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -3.6e+28) || !(y <= 9.8e+14)) {
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 <= (-3.6d+28)) .or. (.not. (y <= 9.8d+14))) 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 <= -3.6e+28) || !(y <= 9.8e+14)) {
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 <= -3.6e+28) or not (y <= 9.8e+14): 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 <= -3.6e+28) || !(y <= 9.8e+14)) 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 <= -3.6e+28) || ~((y <= 9.8e+14))) 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, -3.6e+28], N[Not[LessEqual[y, 9.8e+14]], $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 -3.6 \cdot 10^{+28} \lor \neg \left(y \leq 9.8 \cdot 10^{+14}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -3.5999999999999999e28 or 9.8e14 < y 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%
Taylor expanded in x around inf 91.5%
if -3.5999999999999999e28 < y < 9.8e14Initial 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 99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
expm1-log1p-u95.4%
expm1-undefine95.3%
log1p-undefine95.3%
add-exp-log99.4%
add-sqr-sqrt99.2%
sqrt-unprod74.6%
frac-times74.6%
metadata-eval74.6%
metadata-eval74.6%
frac-times74.6%
sqrt-unprod0.0%
add-sqr-sqrt51.1%
Applied egg-rr51.1%
+-commutative51.1%
associate--l+51.1%
metadata-eval51.1%
Simplified51.1%
+-rgt-identity51.1%
clear-num51.1%
div-inv51.1%
metadata-eval51.1%
Applied egg-rr51.1%
add-sqr-sqrt0.0%
sqrt-unprod75.0%
swap-sqr74.9%
metadata-eval74.9%
metadata-eval74.9%
swap-sqr75.0%
sqrt-unprod99.3%
add-sqr-sqrt99.6%
metadata-eval99.6%
distribute-rgt-neg-in99.6%
neg-sub099.6%
Applied egg-rr99.6%
neg-sub099.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification96.1%
(FPCore (x y) :precision binary64 (if (or (<= y -1.55e+88) (not (<= y 2.9e+86))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.55e+88) || !(y <= 2.9e+86)) {
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 <= (-1.55d+88)) .or. (.not. (y <= 2.9d+86))) 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 <= -1.55e+88) || !(y <= 2.9e+86)) {
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 <= -1.55e+88) or not (y <= 2.9e+86): 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 <= -1.55e+88) || !(y <= 2.9e+86)) 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 <= -1.55e+88) || ~((y <= 2.9e+86))) 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, -1.55e+88], N[Not[LessEqual[y, 2.9e+86]], $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 -1.55 \cdot 10^{+88} \lor \neg \left(y \leq 2.9 \cdot 10^{+86}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -1.5500000000000001e88 or 2.8999999999999999e86 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 90.8%
*-commutative90.8%
unpow1/290.8%
rem-exp-log86.8%
exp-neg86.8%
exp-prod86.8%
distribute-lft-neg-out86.8%
exp-neg86.7%
exp-to-pow90.8%
unpow1/290.8%
unpow-190.8%
associate-*r*90.8%
unpow-190.8%
associate-*l/90.8%
associate-*r/90.8%
associate-/l*91.0%
metadata-eval91.0%
distribute-neg-frac91.0%
associate-*r*91.0%
*-lft-identity91.0%
distribute-neg-frac91.0%
metadata-eval91.0%
Simplified91.0%
if -1.5500000000000001e88 < y < 2.8999999999999999e86Initial 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 94.1%
associate-*r/94.1%
metadata-eval94.1%
Simplified94.1%
expm1-log1p-u90.4%
expm1-undefine90.4%
log1p-undefine90.4%
add-exp-log94.1%
add-sqr-sqrt93.9%
sqrt-unprod70.0%
frac-times70.0%
metadata-eval70.0%
metadata-eval70.0%
frac-times70.0%
sqrt-unprod0.0%
add-sqr-sqrt49.8%
Applied egg-rr49.8%
+-commutative49.8%
associate--l+49.8%
metadata-eval49.8%
Simplified49.8%
+-rgt-identity49.8%
clear-num49.8%
div-inv49.8%
metadata-eval49.8%
Applied egg-rr49.8%
add-sqr-sqrt0.0%
sqrt-unprod70.4%
swap-sqr70.3%
metadata-eval70.3%
metadata-eval70.3%
swap-sqr70.4%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
metadata-eval94.3%
distribute-rgt-neg-in94.3%
neg-sub094.3%
Applied egg-rr94.3%
neg-sub094.3%
distribute-rgt-neg-in94.3%
metadata-eval94.3%
Simplified94.3%
Final simplification93.2%
(FPCore (x y) :precision binary64 (if (or (<= y -3.3e+89) (not (<= y 1.1e+87))) (* -0.3333333333333333 (/ y (sqrt x))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -3.3e+89) || !(y <= 1.1e+87)) {
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 <= (-3.3d+89)) .or. (.not. (y <= 1.1d+87))) 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 <= -3.3e+89) || !(y <= 1.1e+87)) {
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 <= -3.3e+89) or not (y <= 1.1e+87): 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 <= -3.3e+89) || !(y <= 1.1e+87)) tmp = 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 <= -3.3e+89) || ~((y <= 1.1e+87))) 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, -3.3e+89], N[Not[LessEqual[y, 1.1e+87]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / 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 -3.3 \cdot 10^{+89} \lor \neg \left(y \leq 1.1 \cdot 10^{+87}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -3.29999999999999974e89 or 1.1e87 < y 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%
fmm-def99.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.8%
*-commutative90.8%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
*-commutative90.8%
sqrt-div90.8%
metadata-eval90.8%
div-inv90.8%
*-commutative90.8%
Applied egg-rr90.8%
*-commutative90.8%
associate-/l*90.8%
Applied egg-rr90.8%
if -3.29999999999999974e89 < y < 1.1e87Initial 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 94.1%
associate-*r/94.1%
metadata-eval94.1%
Simplified94.1%
expm1-log1p-u90.4%
expm1-undefine90.4%
log1p-undefine90.4%
add-exp-log94.1%
add-sqr-sqrt93.9%
sqrt-unprod70.0%
frac-times70.0%
metadata-eval70.0%
metadata-eval70.0%
frac-times70.0%
sqrt-unprod0.0%
add-sqr-sqrt49.8%
Applied egg-rr49.8%
+-commutative49.8%
associate--l+49.8%
metadata-eval49.8%
Simplified49.8%
+-rgt-identity49.8%
clear-num49.8%
div-inv49.8%
metadata-eval49.8%
Applied egg-rr49.8%
add-sqr-sqrt0.0%
sqrt-unprod70.4%
swap-sqr70.3%
metadata-eval70.3%
metadata-eval70.3%
swap-sqr70.4%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
metadata-eval94.3%
distribute-rgt-neg-in94.3%
neg-sub094.3%
Applied egg-rr94.3%
neg-sub094.3%
distribute-rgt-neg-in94.3%
metadata-eval94.3%
Simplified94.3%
Final simplification93.1%
(FPCore (x y) :precision binary64 (if (<= y -1.9e+89) (* y (/ -0.3333333333333333 (sqrt x))) (if (<= y 3.9e+87) (+ 1.0 (/ -1.0 (* x 9.0))) (/ y (* (sqrt x) -3.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.9e+89) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else if (y <= 3.9e+87) {
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 <= (-1.9d+89)) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else if (y <= 3.9d+87) 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 <= -1.9e+89) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else if (y <= 3.9e+87) {
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 <= -1.9e+89: tmp = y * (-0.3333333333333333 / math.sqrt(x)) elif y <= 3.9e+87: 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 <= -1.9e+89) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); elseif (y <= 3.9e+87) tmp = Float64(1.0 + Float64(-1.0 / Float64(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 <= -1.9e+89) tmp = y * (-0.3333333333333333 / sqrt(x)); elseif (y <= 3.9e+87) 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, -1.9e+89], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+87], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+89}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+87}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\end{array}
\end{array}
if y < -1.90000000000000012e89Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 90.6%
*-commutative90.6%
unpow1/290.6%
rem-exp-log87.3%
exp-neg87.3%
exp-prod87.3%
distribute-lft-neg-out87.3%
exp-neg87.3%
exp-to-pow90.6%
unpow1/290.6%
unpow-190.6%
associate-*r*90.6%
unpow-190.6%
associate-*l/90.6%
associate-*r/90.6%
associate-/l*90.8%
metadata-eval90.8%
distribute-neg-frac90.8%
associate-*r*90.8%
*-lft-identity90.8%
distribute-neg-frac90.8%
metadata-eval90.8%
Simplified90.8%
if -1.90000000000000012e89 < y < 3.9000000000000002e87Initial 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 94.1%
associate-*r/94.1%
metadata-eval94.1%
Simplified94.1%
expm1-log1p-u90.4%
expm1-undefine90.4%
log1p-undefine90.4%
add-exp-log94.1%
add-sqr-sqrt93.9%
sqrt-unprod70.0%
frac-times70.0%
metadata-eval70.0%
metadata-eval70.0%
frac-times70.0%
sqrt-unprod0.0%
add-sqr-sqrt49.8%
Applied egg-rr49.8%
+-commutative49.8%
associate--l+49.8%
metadata-eval49.8%
Simplified49.8%
+-rgt-identity49.8%
clear-num49.8%
div-inv49.8%
metadata-eval49.8%
Applied egg-rr49.8%
add-sqr-sqrt0.0%
sqrt-unprod70.4%
swap-sqr70.3%
metadata-eval70.3%
metadata-eval70.3%
swap-sqr70.4%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
metadata-eval94.3%
distribute-rgt-neg-in94.3%
neg-sub094.3%
Applied egg-rr94.3%
neg-sub094.3%
distribute-rgt-neg-in94.3%
metadata-eval94.3%
Simplified94.3%
if 3.9000000000000002e87 < y 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.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.9%
*-commutative90.9%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
sqrt-div91.0%
metadata-eval91.0%
div-inv90.9%
*-commutative90.9%
Applied egg-rr90.9%
*-commutative90.9%
associate-/l*90.9%
Applied egg-rr90.9%
*-commutative90.9%
associate-*l/90.9%
associate-*r/91.0%
clear-num91.0%
un-div-inv91.0%
div-inv91.1%
metadata-eval91.1%
Applied egg-rr91.1%
Final simplification93.2%
(FPCore (x y)
:precision binary64
(if (<= y -1.5e+86)
(* y (/ -0.3333333333333333 (sqrt x)))
(if (<= y 1.28e+85)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/ -0.3333333333333333 (/ (sqrt x) y)))))
double code(double x, double y) {
double tmp;
if (y <= -1.5e+86) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else if (y <= 1.28e+85) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = -0.3333333333333333 / (sqrt(x) / y);
}
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+86)) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else if (y <= 1.28d+85) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = (-0.3333333333333333d0) / (sqrt(x) / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.5e+86) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else if (y <= 1.28e+85) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = -0.3333333333333333 / (Math.sqrt(x) / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.5e+86: tmp = y * (-0.3333333333333333 / math.sqrt(x)) elif y <= 1.28e+85: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = -0.3333333333333333 / (math.sqrt(x) / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.5e+86) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); elseif (y <= 1.28e+85) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(-0.3333333333333333 / Float64(sqrt(x) / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.5e+86) tmp = y * (-0.3333333333333333 / sqrt(x)); elseif (y <= 1.28e+85) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = -0.3333333333333333 / (sqrt(x) / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.5e+86], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.28e+85], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+86}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{+85}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\end{array}
\end{array}
if y < -1.49999999999999988e86Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in y around inf 90.6%
*-commutative90.6%
unpow1/290.6%
rem-exp-log87.3%
exp-neg87.3%
exp-prod87.3%
distribute-lft-neg-out87.3%
exp-neg87.3%
exp-to-pow90.6%
unpow1/290.6%
unpow-190.6%
associate-*r*90.6%
unpow-190.6%
associate-*l/90.6%
associate-*r/90.6%
associate-/l*90.8%
metadata-eval90.8%
distribute-neg-frac90.8%
associate-*r*90.8%
*-lft-identity90.8%
distribute-neg-frac90.8%
metadata-eval90.8%
Simplified90.8%
if -1.49999999999999988e86 < y < 1.28000000000000004e85Initial 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 94.1%
associate-*r/94.1%
metadata-eval94.1%
Simplified94.1%
expm1-log1p-u90.4%
expm1-undefine90.4%
log1p-undefine90.4%
add-exp-log94.1%
add-sqr-sqrt93.9%
sqrt-unprod70.0%
frac-times70.0%
metadata-eval70.0%
metadata-eval70.0%
frac-times70.0%
sqrt-unprod0.0%
add-sqr-sqrt49.8%
Applied egg-rr49.8%
+-commutative49.8%
associate--l+49.8%
metadata-eval49.8%
Simplified49.8%
+-rgt-identity49.8%
clear-num49.8%
div-inv49.8%
metadata-eval49.8%
Applied egg-rr49.8%
add-sqr-sqrt0.0%
sqrt-unprod70.4%
swap-sqr70.3%
metadata-eval70.3%
metadata-eval70.3%
swap-sqr70.4%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
metadata-eval94.3%
distribute-rgt-neg-in94.3%
neg-sub094.3%
Applied egg-rr94.3%
neg-sub094.3%
distribute-rgt-neg-in94.3%
metadata-eval94.3%
Simplified94.3%
if 1.28000000000000004e85 < y 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.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.9%
*-commutative90.9%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
*-commutative91.0%
sqrt-div91.0%
metadata-eval91.0%
div-inv90.9%
associate-*r/90.9%
clear-num90.9%
un-div-inv91.1%
Applied egg-rr91.1%
Final simplification93.2%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ (- (* -0.3333333333333333 (* y (sqrt x))) 0.1111111111111111) x) (- 1.0 (/ y (sqrt (* x 9.0))))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (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 (x <= 0.11d0) then
tmp = (((-0.3333333333333333d0) * (y * sqrt(x))) - 0.1111111111111111d0) / x
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 (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * Math.sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = ((-0.3333333333333333 * (y * math.sqrt(x))) - 0.1111111111111111) / x else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(Float64(-0.3333333333333333 * Float64(y * sqrt(x))) - 0.1111111111111111) / x); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x; else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(N[(-0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial 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.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 97.3%
if 0.110000000000000001 < x Initial program 99.9%
*-commutative99.9%
metadata-eval99.9%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in x around inf 99.7%
Final simplification98.5%
(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.8%
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.8%
sub-neg99.8%
*-commutative99.8%
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 -8e+135)
(/
(- 1.0 (* (/ 0.1111111111111111 x) (/ 0.1111111111111111 x)))
(- 1.0 (/ 0.1111111111111111 x)))
(+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if (y <= -8e+135) {
tmp = (1.0 - ((0.1111111111111111 / x) * (0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 / 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 <= (-8d+135)) then
tmp = (1.0d0 - ((0.1111111111111111d0 / x) * (0.1111111111111111d0 / x))) / (1.0d0 - (0.1111111111111111d0 / 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 <= -8e+135) {
tmp = (1.0 - ((0.1111111111111111 / x) * (0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 / x));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8e+135: tmp = (1.0 - ((0.1111111111111111 / x) * (0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 / x)) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -8e+135) tmp = Float64(Float64(1.0 - Float64(Float64(0.1111111111111111 / x) * Float64(0.1111111111111111 / x))) / Float64(1.0 - Float64(0.1111111111111111 / 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 <= -8e+135) tmp = (1.0 - ((0.1111111111111111 / x) * (0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 / x)); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8e+135], N[(N[(1.0 - N[(N[(0.1111111111111111 / x), $MachinePrecision] * N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(0.1111111111111111 / 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 -8 \cdot 10^{+135}:\\
\;\;\;\;\frac{1 - \frac{0.1111111111111111}{x} \cdot \frac{0.1111111111111111}{x}}{1 - \frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -7.99999999999999969e135Initial 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%
fmm-def99.6%
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 4.8%
associate-*r/4.8%
metadata-eval4.8%
Simplified4.8%
expm1-log1p-u4.8%
expm1-undefine4.8%
log1p-undefine4.8%
add-exp-log4.8%
add-sqr-sqrt4.8%
sqrt-unprod4.8%
frac-times4.8%
metadata-eval4.8%
metadata-eval4.8%
frac-times4.8%
sqrt-unprod0.0%
add-sqr-sqrt7.7%
Applied egg-rr7.7%
+-commutative7.7%
associate--l+7.7%
metadata-eval7.7%
Simplified7.7%
sub-neg7.7%
flip-+27.3%
metadata-eval27.3%
+-rgt-identity27.3%
+-rgt-identity27.3%
distribute-neg-frac27.3%
metadata-eval27.3%
distribute-neg-frac27.3%
metadata-eval27.3%
+-rgt-identity27.3%
distribute-neg-frac27.3%
metadata-eval27.3%
Applied egg-rr27.3%
if -7.99999999999999969e135 < y 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.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 72.7%
associate-*r/72.6%
metadata-eval72.6%
Simplified72.6%
expm1-log1p-u69.8%
expm1-undefine69.8%
log1p-undefine69.8%
add-exp-log72.6%
add-sqr-sqrt72.5%
sqrt-unprod56.2%
frac-times56.2%
metadata-eval56.2%
metadata-eval56.2%
frac-times56.2%
sqrt-unprod0.0%
add-sqr-sqrt38.1%
Applied egg-rr38.1%
+-commutative38.1%
associate--l+38.1%
metadata-eval38.1%
Simplified38.1%
+-rgt-identity38.1%
clear-num38.1%
div-inv38.1%
metadata-eval38.1%
Applied egg-rr38.1%
add-sqr-sqrt0.0%
sqrt-unprod56.5%
swap-sqr56.4%
metadata-eval56.4%
metadata-eval56.4%
swap-sqr56.5%
sqrt-unprod72.6%
add-sqr-sqrt72.8%
metadata-eval72.8%
distribute-rgt-neg-in72.8%
neg-sub072.8%
Applied egg-rr72.8%
neg-sub072.8%
distribute-rgt-neg-in72.8%
metadata-eval72.8%
Simplified72.8%
Final simplification67.8%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (* (/ 1.0 x) -0.1111111111111111) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (1.0 / x) * -0.1111111111111111;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.11d0) then
tmp = (1.0d0 / x) * (-0.1111111111111111d0)
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (1.0 / x) * -0.1111111111111111;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = (1.0 / x) * -0.1111111111111111 else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(1.0 / x) * -0.1111111111111111); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = (1.0 / x) * -0.1111111111111111; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(1.0 / x), $MachinePrecision] * -0.1111111111111111), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{1}{x} \cdot -0.1111111111111111\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial 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.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 65.2%
associate-*r/65.2%
metadata-eval65.2%
Simplified65.2%
expm1-log1p-u59.9%
expm1-undefine59.9%
log1p-undefine59.9%
add-exp-log65.2%
add-sqr-sqrt64.9%
sqrt-unprod34.4%
frac-times34.5%
metadata-eval34.5%
metadata-eval34.5%
frac-times34.4%
sqrt-unprod0.0%
add-sqr-sqrt1.5%
Applied egg-rr1.5%
+-commutative1.5%
associate--l+1.5%
metadata-eval1.5%
Simplified1.5%
Taylor expanded in x around 0 1.5%
add-sqr-sqrt1.5%
sqrt-unprod5.9%
frac-times5.9%
metadata-eval5.9%
metadata-eval5.9%
frac-times5.9%
sqrt-unprod0.0%
add-sqr-sqrt63.1%
clear-num63.1%
associate-/r/63.1%
Applied egg-rr63.1%
if 0.110000000000000001 < x Initial program 99.9%
associate--l-99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
distribute-frac-neg99.9%
sub-neg99.9%
neg-mul-199.9%
*-commutative99.9%
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 65.2%
associate-*r/65.2%
metadata-eval65.2%
Simplified65.2%
Taylor expanded in x around inf 65.0%
(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.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 65.2%
associate-*r/65.2%
metadata-eval65.2%
Simplified65.2%
expm1-log1p-u62.7%
expm1-undefine62.7%
log1p-undefine62.7%
add-exp-log65.2%
add-sqr-sqrt65.1%
sqrt-unprod50.6%
frac-times50.6%
metadata-eval50.6%
metadata-eval50.6%
frac-times50.6%
sqrt-unprod0.0%
add-sqr-sqrt34.7%
Applied egg-rr34.7%
+-commutative34.7%
associate--l+34.7%
metadata-eval34.7%
Simplified34.7%
+-rgt-identity34.7%
clear-num34.7%
div-inv34.7%
metadata-eval34.7%
Applied egg-rr34.7%
add-sqr-sqrt0.0%
sqrt-unprod50.8%
swap-sqr50.8%
metadata-eval50.8%
metadata-eval50.8%
swap-sqr50.8%
sqrt-unprod65.1%
add-sqr-sqrt65.3%
metadata-eval65.3%
distribute-rgt-neg-in65.3%
neg-sub065.3%
Applied egg-rr65.3%
neg-sub065.3%
distribute-rgt-neg-in65.3%
metadata-eval65.3%
Simplified65.3%
Final simplification65.3%
(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.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 65.2%
Final simplification65.2%
(FPCore (x y) :precision binary64 (- 1.0 (/ 0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (0.1111111111111111d0 / x)
end function
public static double code(double x, double y) {
return 1.0 - (0.1111111111111111 / x);
}
def code(x, y): return 1.0 - (0.1111111111111111 / x)
function code(x, y) return Float64(1.0 - Float64(0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 - (0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \frac{0.1111111111111111}{x}
\end{array}
Initial program 99.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 65.2%
associate-*r/65.2%
metadata-eval65.2%
Simplified65.2%
(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.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 65.2%
associate-*r/65.2%
metadata-eval65.2%
Simplified65.2%
Taylor expanded in x around inf 34.7%
(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 2024185
(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)))))