
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
(FPCore (x y) :precision binary64 (/ (* (/ y (+ x (+ y 1.0))) (/ x (+ y x))) (+ y x)))
double code(double x, double y) {
return ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y / (x + (y + 1.0d0))) * (x / (y + x))) / (y + x)
end function
public static double code(double x, double y) {
return ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x);
}
def code(x, y): return ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x)
function code(x, y) return Float64(Float64(Float64(y / Float64(x + Float64(y + 1.0))) * Float64(x / Float64(y + x))) / Float64(y + x)) end
function tmp = code(x, y) tmp = ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x); end
code[x_, y_] := N[(N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{y + x}}{y + x}
\end{array}
Initial program 68.6%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
*-commutative89.8%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= x -1.45e+154)
(/ (/ y (+ x (+ y 1.0))) (+ y x))
(if (<= x -5.2e-137)
(* (/ y (+ x 1.0)) (/ x (* (+ y x) (+ y x))))
(if (<= x -8e-234)
(* (/ x (+ y x)) (/ y (* (+ y x) (+ x 1.0))))
(/ (/ x (+ y 1.0)) (+ y x))))))
double code(double x, double y) {
double tmp;
if (x <= -1.45e+154) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (x <= -5.2e-137) {
tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x)));
} else if (x <= -8e-234) {
tmp = (x / (y + x)) * (y / ((y + x) * (x + 1.0)));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.45d+154)) then
tmp = (y / (x + (y + 1.0d0))) / (y + x)
else if (x <= (-5.2d-137)) then
tmp = (y / (x + 1.0d0)) * (x / ((y + x) * (y + x)))
else if (x <= (-8d-234)) then
tmp = (x / (y + x)) * (y / ((y + x) * (x + 1.0d0)))
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.45e+154) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (x <= -5.2e-137) {
tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x)));
} else if (x <= -8e-234) {
tmp = (x / (y + x)) * (y / ((y + x) * (x + 1.0)));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.45e+154: tmp = (y / (x + (y + 1.0))) / (y + x) elif x <= -5.2e-137: tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x))) elif x <= -8e-234: tmp = (x / (y + x)) * (y / ((y + x) * (x + 1.0))) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.45e+154) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(y + x)); elseif (x <= -5.2e-137) tmp = Float64(Float64(y / Float64(x + 1.0)) * Float64(x / Float64(Float64(y + x) * Float64(y + x)))); elseif (x <= -8e-234) tmp = Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(Float64(y + x) * Float64(x + 1.0)))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.45e+154) tmp = (y / (x + (y + 1.0))) / (y + x); elseif (x <= -5.2e-137) tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x))); elseif (x <= -8e-234) tmp = (x / (y + x)) * (y / ((y + x) * (x + 1.0))); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.45e+154], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-137], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8e-234], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{y + x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-137}:\\
\;\;\;\;\frac{y}{x + 1} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-234}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -1.4499999999999999e154Initial program 48.4%
times-frac82.8%
/-rgt-identity82.8%
associate-/l/82.8%
*-lft-identity82.8%
associate-+l+82.8%
Simplified82.8%
*-commutative82.8%
associate-/r*99.9%
associate-*r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 88.0%
if -1.4499999999999999e154 < x < -5.1999999999999999e-137Initial program 70.6%
times-frac95.2%
/-rgt-identity95.2%
associate-/l/95.2%
*-lft-identity95.2%
associate-+l+95.2%
Simplified95.2%
Taylor expanded in y around 0 89.3%
+-commutative89.3%
Simplified89.3%
if -5.1999999999999999e-137 < x < -7.9999999999999997e-234Initial program 74.1%
times-frac83.0%
/-rgt-identity83.0%
associate-/l/83.0%
*-lft-identity83.0%
associate-+l+83.0%
Simplified83.0%
*-commutative83.0%
associate-/r*99.9%
associate-*r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 87.2%
+-commutative74.9%
Simplified87.2%
expm1-log1p-u87.2%
expm1-udef51.3%
associate-/l*51.3%
Applied egg-rr51.3%
expm1-def93.0%
expm1-log1p93.0%
associate-/r/87.2%
*-rgt-identity87.2%
associate-*r/87.2%
associate-*r/87.1%
associate-/l/87.1%
associate-*r/87.2%
*-rgt-identity87.2%
*-commutative87.2%
Simplified87.2%
if -7.9999999999999997e-234 < x Initial program 70.1%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
*-commutative89.8%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 58.7%
+-commutative58.7%
Simplified58.7%
Final simplification71.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -1.32e+154)
(/ (/ y (+ x (+ y 1.0))) (+ y x))
(if (<= x -5.2e-137)
(* (/ y (+ x 1.0)) (/ x (* (+ y x) (+ y x))))
(if (<= x -9e-233)
(* t_0 (/ y (* (+ y x) (+ x 1.0))))
(/ 1.0 (/ (+ y (+ x (+ x 1.0))) t_0)))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -1.32e+154) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (x <= -5.2e-137) {
tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x)));
} else if (x <= -9e-233) {
tmp = t_0 * (y / ((y + x) * (x + 1.0)));
} else {
tmp = 1.0 / ((y + (x + (x + 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 = x / (y + x)
if (x <= (-1.32d+154)) then
tmp = (y / (x + (y + 1.0d0))) / (y + x)
else if (x <= (-5.2d-137)) then
tmp = (y / (x + 1.0d0)) * (x / ((y + x) * (y + x)))
else if (x <= (-9d-233)) then
tmp = t_0 * (y / ((y + x) * (x + 1.0d0)))
else
tmp = 1.0d0 / ((y + (x + (x + 1.0d0))) / t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -1.32e+154) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (x <= -5.2e-137) {
tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x)));
} else if (x <= -9e-233) {
tmp = t_0 * (y / ((y + x) * (x + 1.0)));
} else {
tmp = 1.0 / ((y + (x + (x + 1.0))) / t_0);
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -1.32e+154: tmp = (y / (x + (y + 1.0))) / (y + x) elif x <= -5.2e-137: tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x))) elif x <= -9e-233: tmp = t_0 * (y / ((y + x) * (x + 1.0))) else: tmp = 1.0 / ((y + (x + (x + 1.0))) / t_0) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -1.32e+154) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(y + x)); elseif (x <= -5.2e-137) tmp = Float64(Float64(y / Float64(x + 1.0)) * Float64(x / Float64(Float64(y + x) * Float64(y + x)))); elseif (x <= -9e-233) tmp = Float64(t_0 * Float64(y / Float64(Float64(y + x) * Float64(x + 1.0)))); else tmp = Float64(1.0 / Float64(Float64(y + Float64(x + Float64(x + 1.0))) / t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -1.32e+154) tmp = (y / (x + (y + 1.0))) / (y + x); elseif (x <= -5.2e-137) tmp = (y / (x + 1.0)) * (x / ((y + x) * (y + x))); elseif (x <= -9e-233) tmp = t_0 * (y / ((y + x) * (x + 1.0))); else tmp = 1.0 / ((y + (x + (x + 1.0))) / t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.32e+154], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-137], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9e-233], N[(t$95$0 * N[(y / N[(N[(y + x), $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{y + x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-137}:\\
\;\;\;\;\frac{y}{x + 1} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -9 \cdot 10^{-233}:\\
\;\;\;\;t_0 \cdot \frac{y}{\left(y + x\right) \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y + \left(x + \left(x + 1\right)\right)}{t_0}}\\
\end{array}
\end{array}
if x < -1.31999999999999998e154Initial program 48.4%
times-frac82.8%
/-rgt-identity82.8%
associate-/l/82.8%
*-lft-identity82.8%
associate-+l+82.8%
Simplified82.8%
*-commutative82.8%
associate-/r*99.9%
associate-*r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 88.0%
if -1.31999999999999998e154 < x < -5.1999999999999999e-137Initial program 70.6%
times-frac95.2%
/-rgt-identity95.2%
associate-/l/95.2%
*-lft-identity95.2%
associate-+l+95.2%
Simplified95.2%
Taylor expanded in y around 0 89.3%
+-commutative89.3%
Simplified89.3%
if -5.1999999999999999e-137 < x < -9.0000000000000004e-233Initial program 74.1%
times-frac83.0%
/-rgt-identity83.0%
associate-/l/83.0%
*-lft-identity83.0%
associate-+l+83.0%
Simplified83.0%
*-commutative83.0%
associate-/r*99.9%
associate-*r/100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 87.2%
+-commutative74.9%
Simplified87.2%
expm1-log1p-u87.2%
expm1-udef51.3%
associate-/l*51.3%
Applied egg-rr51.3%
expm1-def93.0%
expm1-log1p93.0%
associate-/r/87.2%
*-rgt-identity87.2%
associate-*r/87.2%
associate-*r/87.1%
associate-/l/87.1%
associate-*r/87.2%
*-rgt-identity87.2%
*-commutative87.2%
Simplified87.2%
if -9.0000000000000004e-233 < x Initial program 70.1%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
*-commutative89.8%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.7%
+-commutative99.7%
Applied egg-rr99.7%
clear-num99.0%
inv-pow99.0%
div-inv99.0%
clear-num99.0%
+-commutative99.0%
Applied egg-rr99.0%
unpow-199.0%
associate-*r/99.0%
+-commutative99.0%
Simplified99.0%
Taylor expanded in y around -inf 59.3%
mul-1-neg59.3%
unsub-neg59.3%
neg-mul-159.3%
unsub-neg59.3%
distribute-lft-in59.3%
metadata-eval59.3%
neg-mul-159.3%
unsub-neg59.3%
Simplified59.3%
Final simplification71.9%
(FPCore (x y) :precision binary64 (if (<= y 5.8e-21) (/ (* (/ x (+ y x)) (/ y (+ x 1.0))) (+ y x)) (* (/ y (+ x (+ y 1.0))) (/ x (* (+ y x) (+ y x))))))
double code(double x, double y) {
double tmp;
if (y <= 5.8e-21) {
tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x);
} else {
tmp = (y / (x + (y + 1.0))) * (x / ((y + x) * (y + x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 5.8d-21) then
tmp = ((x / (y + x)) * (y / (x + 1.0d0))) / (y + x)
else
tmp = (y / (x + (y + 1.0d0))) * (x / ((y + x) * (y + x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.8e-21) {
tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x);
} else {
tmp = (y / (x + (y + 1.0))) * (x / ((y + x) * (y + x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.8e-21: tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x) else: tmp = (y / (x + (y + 1.0))) * (x / ((y + x) * (y + x))) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.8e-21) tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(x + 1.0))) / Float64(y + x)); else tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) * Float64(x / Float64(Float64(y + x) * Float64(y + x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.8e-21) tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x); else tmp = (y / (x + (y + 1.0))) * (x / ((y + x) * (y + x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.8e-21], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.8 \cdot 10^{-21}:\\
\;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\end{array}
\end{array}
if y < 5.8e-21Initial program 67.8%
times-frac88.7%
/-rgt-identity88.7%
associate-/l/88.7%
*-lft-identity88.7%
associate-+l+88.7%
Simplified88.7%
*-commutative88.7%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 81.3%
+-commutative81.3%
Simplified81.3%
if 5.8e-21 < y Initial program 71.1%
times-frac93.6%
/-rgt-identity93.6%
associate-/l/93.6%
*-lft-identity93.6%
associate-+l+93.6%
Simplified93.6%
Final simplification84.2%
(FPCore (x y) :precision binary64 (if (<= y 9.5) (/ (* (/ x (+ y x)) (/ y (+ x 1.0))) (+ y x)) (/ x (* (+ y x) (+ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 9.5) {
tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x);
} else {
tmp = x / ((y + x) * (y + x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 9.5d0) then
tmp = ((x / (y + x)) * (y / (x + 1.0d0))) / (y + x)
else
tmp = x / ((y + x) * (y + x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 9.5) {
tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x);
} else {
tmp = x / ((y + x) * (y + x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 9.5: tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x) else: tmp = x / ((y + x) * (y + x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 9.5) tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(x + 1.0))) / Float64(y + x)); else tmp = Float64(x / Float64(Float64(y + x) * Float64(y + x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 9.5) tmp = ((x / (y + x)) * (y / (x + 1.0))) / (y + x); else tmp = x / ((y + x) * (y + x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 9.5], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.5:\\
\;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\end{array}
\end{array}
if y < 9.5Initial program 68.4%
times-frac88.9%
/-rgt-identity88.9%
associate-/l/88.9%
*-lft-identity88.9%
associate-+l+88.9%
Simplified88.9%
*-commutative88.9%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 81.4%
+-commutative81.4%
Simplified81.4%
if 9.5 < y Initial program 69.2%
times-frac93.2%
/-rgt-identity93.2%
associate-/l/93.2%
*-lft-identity93.2%
associate-+l+93.2%
Simplified93.2%
Taylor expanded in y around inf 83.8%
Final simplification82.0%
(FPCore (x y) :precision binary64 (* (/ x (+ y x)) (/ (/ y (+ x (+ y 1.0))) (+ y x))))
double code(double x, double y) {
return (x / (y + x)) * ((y / (x + (y + 1.0))) / (y + x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x / (y + x)) * ((y / (x + (y + 1.0d0))) / (y + x))
end function
public static double code(double x, double y) {
return (x / (y + x)) * ((y / (x + (y + 1.0))) / (y + x));
}
def code(x, y): return (x / (y + x)) * ((y / (x + (y + 1.0))) / (y + x))
function code(x, y) return Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(y + x))) end
function tmp = code(x, y) tmp = (x / (y + x)) * ((y / (x + (y + 1.0))) / (y + x)); end
code[x_, y_] := N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y + x} \cdot \frac{\frac{y}{x + \left(y + 1\right)}}{y + x}
\end{array}
Initial program 68.6%
times-frac89.8%
associate-+r+89.8%
associate-*l/84.0%
times-frac99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.1e-159)
(/ (/ y x) x)
(if (<= y 5.1e-138)
(/ y x)
(if (<= y 8.5e-61)
(- (/ x y) x)
(if (<= y 9.5) (/ 1.0 (* x (/ x y))) (/ x (* y y)))))))
double code(double x, double y) {
double tmp;
if (y <= -1.1e-159) {
tmp = (y / x) / x;
} else if (y <= 5.1e-138) {
tmp = y / x;
} else if (y <= 8.5e-61) {
tmp = (x / y) - x;
} else if (y <= 9.5) {
tmp = 1.0 / (x * (x / y));
} else {
tmp = x / (y * 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.1d-159)) then
tmp = (y / x) / x
else if (y <= 5.1d-138) then
tmp = y / x
else if (y <= 8.5d-61) then
tmp = (x / y) - x
else if (y <= 9.5d0) then
tmp = 1.0d0 / (x * (x / y))
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.1e-159) {
tmp = (y / x) / x;
} else if (y <= 5.1e-138) {
tmp = y / x;
} else if (y <= 8.5e-61) {
tmp = (x / y) - x;
} else if (y <= 9.5) {
tmp = 1.0 / (x * (x / y));
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.1e-159: tmp = (y / x) / x elif y <= 5.1e-138: tmp = y / x elif y <= 8.5e-61: tmp = (x / y) - x elif y <= 9.5: tmp = 1.0 / (x * (x / y)) else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.1e-159) tmp = Float64(Float64(y / x) / x); elseif (y <= 5.1e-138) tmp = Float64(y / x); elseif (y <= 8.5e-61) tmp = Float64(Float64(x / y) - x); elseif (y <= 9.5) tmp = Float64(1.0 / Float64(x * Float64(x / y))); else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.1e-159) tmp = (y / x) / x; elseif (y <= 5.1e-138) tmp = y / x; elseif (y <= 8.5e-61) tmp = (x / y) - x; elseif (y <= 9.5) tmp = 1.0 / (x * (x / y)); else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.1e-159], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 5.1e-138], N[(y / x), $MachinePrecision], If[LessEqual[y, 8.5e-61], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 9.5], N[(1.0 / N[(x * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-159}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{-138}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-61}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 9.5:\\
\;\;\;\;\frac{1}{x \cdot \frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < -1.1e-159Initial program 62.9%
times-frac90.6%
/-rgt-identity90.6%
associate-/l/90.6%
*-lft-identity90.6%
associate-+l+90.6%
Simplified90.6%
Taylor expanded in x around inf 32.7%
unpow232.7%
Simplified32.7%
associate-/r*32.7%
div-inv32.6%
Applied egg-rr32.6%
un-div-inv32.7%
Applied egg-rr32.7%
if -1.1e-159 < y < 5.1000000000000002e-138Initial program 64.0%
times-frac79.9%
/-rgt-identity79.9%
associate-/l/79.9%
*-lft-identity79.9%
associate-+l+79.9%
Simplified79.9%
Taylor expanded in y around 0 85.2%
Taylor expanded in x around 0 72.3%
if 5.1000000000000002e-138 < y < 8.50000000000000016e-61Initial program 85.7%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 38.0%
associate-/r*38.0%
+-commutative38.0%
Simplified38.0%
Taylor expanded in y around 0 38.0%
neg-mul-138.0%
unsub-neg38.0%
Simplified38.0%
if 8.50000000000000016e-61 < y < 9.5Initial program 92.8%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around inf 54.1%
unpow254.1%
Simplified54.1%
associate-/r*54.2%
div-inv54.2%
Applied egg-rr54.2%
clear-num54.0%
frac-times54.3%
metadata-eval54.3%
Applied egg-rr54.3%
if 9.5 < y Initial program 69.2%
times-frac93.2%
/-rgt-identity93.2%
associate-/l/93.2%
*-lft-identity93.2%
associate-+l+93.2%
Simplified93.2%
*-commutative93.2%
associate-/r*99.8%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 69.9%
unpow269.9%
Simplified69.9%
Final simplification52.9%
(FPCore (x y)
:precision binary64
(if (<= x -4.3e+154)
(/ (/ y x) (+ y x))
(if (<= x -1.35e-229)
(/ y (* (+ x (+ y 1.0)) (+ y x)))
(/ (/ x (+ y 1.0)) (+ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -4.3e+154) {
tmp = (y / x) / (y + x);
} else if (x <= -1.35e-229) {
tmp = y / ((x + (y + 1.0)) * (y + x));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-4.3d+154)) then
tmp = (y / x) / (y + x)
else if (x <= (-1.35d-229)) then
tmp = y / ((x + (y + 1.0d0)) * (y + x))
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -4.3e+154) {
tmp = (y / x) / (y + x);
} else if (x <= -1.35e-229) {
tmp = y / ((x + (y + 1.0)) * (y + x));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.3e+154: tmp = (y / x) / (y + x) elif x <= -1.35e-229: tmp = y / ((x + (y + 1.0)) * (y + x)) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -4.3e+154) tmp = Float64(Float64(y / x) / Float64(y + x)); elseif (x <= -1.35e-229) tmp = Float64(y / Float64(Float64(x + Float64(y + 1.0)) * Float64(y + x))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -4.3e+154) tmp = (y / x) / (y + x); elseif (x <= -1.35e-229) tmp = y / ((x + (y + 1.0)) * (y + x)); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.3e+154], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e-229], N[(y / N[(N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-229}:\\
\;\;\;\;\frac{y}{\left(x + \left(y + 1\right)\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -4.2999999999999998e154Initial program 48.4%
times-frac82.8%
/-rgt-identity82.8%
associate-/l/82.8%
*-lft-identity82.8%
associate-+l+82.8%
Simplified82.8%
*-commutative82.8%
associate-/r*99.9%
associate-*r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 87.0%
if -4.2999999999999998e154 < x < -1.3499999999999999e-229Initial program 71.6%
times-frac91.9%
/-rgt-identity91.9%
associate-/l/91.9%
*-lft-identity91.9%
associate-+l+91.9%
Simplified91.9%
*-commutative91.9%
associate-/r*99.7%
frac-times96.6%
Applied egg-rr96.6%
Taylor expanded in y around 0 77.0%
if -1.3499999999999999e-229 < x Initial program 70.1%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
*-commutative89.8%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 58.7%
+-commutative58.7%
Simplified58.7%
Final simplification67.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= x -2.65e+154)
(/ (/ y t_0) (+ y x))
(if (<= x -1.35e-229)
(/ y (* t_0 (+ y x)))
(/ (/ x (+ y 1.0)) (+ y x))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -2.65e+154) {
tmp = (y / t_0) / (y + x);
} else if (x <= -1.35e-229) {
tmp = y / (t_0 * (y + x));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
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 = x + (y + 1.0d0)
if (x <= (-2.65d+154)) then
tmp = (y / t_0) / (y + x)
else if (x <= (-1.35d-229)) then
tmp = y / (t_0 * (y + x))
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -2.65e+154) {
tmp = (y / t_0) / (y + x);
} else if (x <= -1.35e-229) {
tmp = y / (t_0 * (y + x));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if x <= -2.65e+154: tmp = (y / t_0) / (y + x) elif x <= -1.35e-229: tmp = y / (t_0 * (y + x)) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (x <= -2.65e+154) tmp = Float64(Float64(y / t_0) / Float64(y + x)); elseif (x <= -1.35e-229) tmp = Float64(y / Float64(t_0 * Float64(y + x))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (x <= -2.65e+154) tmp = (y / t_0) / (y + x); elseif (x <= -1.35e-229) tmp = y / (t_0 * (y + x)); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.65e+154], N[(N[(y / t$95$0), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e-229], N[(y / N[(t$95$0 * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -2.65 \cdot 10^{+154}:\\
\;\;\;\;\frac{\frac{y}{t_0}}{y + x}\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-229}:\\
\;\;\;\;\frac{y}{t_0 \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -2.65000000000000012e154Initial program 48.4%
times-frac82.8%
/-rgt-identity82.8%
associate-/l/82.8%
*-lft-identity82.8%
associate-+l+82.8%
Simplified82.8%
*-commutative82.8%
associate-/r*99.9%
associate-*r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 88.0%
if -2.65000000000000012e154 < x < -1.3499999999999999e-229Initial program 71.6%
times-frac91.9%
/-rgt-identity91.9%
associate-/l/91.9%
*-lft-identity91.9%
associate-+l+91.9%
Simplified91.9%
*-commutative91.9%
associate-/r*99.7%
frac-times96.6%
Applied egg-rr96.6%
Taylor expanded in y around 0 77.0%
if -1.3499999999999999e-229 < x Initial program 70.1%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
*-commutative89.8%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 58.7%
+-commutative58.7%
Simplified58.7%
Final simplification67.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (* x x))))
(if (<= y -9.6e-161)
t_0
(if (<= y 7e-138)
(/ y x)
(if (<= y 1.6e-60) (- (/ x y) x) (if (<= y 9.5) t_0 (/ x (* y y))))))))
double code(double x, double y) {
double t_0 = y / (x * x);
double tmp;
if (y <= -9.6e-161) {
tmp = t_0;
} else if (y <= 7e-138) {
tmp = y / x;
} else if (y <= 1.6e-60) {
tmp = (x / y) - x;
} else if (y <= 9.5) {
tmp = t_0;
} else {
tmp = x / (y * y);
}
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 / (x * x)
if (y <= (-9.6d-161)) then
tmp = t_0
else if (y <= 7d-138) then
tmp = y / x
else if (y <= 1.6d-60) then
tmp = (x / y) - x
else if (y <= 9.5d0) then
tmp = t_0
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (x * x);
double tmp;
if (y <= -9.6e-161) {
tmp = t_0;
} else if (y <= 7e-138) {
tmp = y / x;
} else if (y <= 1.6e-60) {
tmp = (x / y) - x;
} else if (y <= 9.5) {
tmp = t_0;
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): t_0 = y / (x * x) tmp = 0 if y <= -9.6e-161: tmp = t_0 elif y <= 7e-138: tmp = y / x elif y <= 1.6e-60: tmp = (x / y) - x elif y <= 9.5: tmp = t_0 else: tmp = x / (y * y) return tmp
function code(x, y) t_0 = Float64(y / Float64(x * x)) tmp = 0.0 if (y <= -9.6e-161) tmp = t_0; elseif (y <= 7e-138) tmp = Float64(y / x); elseif (y <= 1.6e-60) tmp = Float64(Float64(x / y) - x); elseif (y <= 9.5) tmp = t_0; else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (x * x); tmp = 0.0; if (y <= -9.6e-161) tmp = t_0; elseif (y <= 7e-138) tmp = y / x; elseif (y <= 1.6e-60) tmp = (x / y) - x; elseif (y <= 9.5) tmp = t_0; else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.6e-161], t$95$0, If[LessEqual[y, 7e-138], N[(y / x), $MachinePrecision], If[LessEqual[y, 1.6e-60], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 9.5], t$95$0, N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -9.6 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-138}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 9.5:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < -9.59999999999999995e-161 or 1.6000000000000001e-60 < y < 9.5Initial program 66.5%
times-frac91.5%
/-rgt-identity91.5%
associate-/l/91.5%
*-lft-identity91.5%
associate-+l+91.5%
Simplified91.5%
Taylor expanded in x around inf 35.4%
unpow235.4%
Simplified35.4%
if -9.59999999999999995e-161 < y < 6.9999999999999997e-138Initial program 65.0%
times-frac80.4%
/-rgt-identity80.4%
associate-/l/80.4%
*-lft-identity80.4%
associate-+l+80.4%
Simplified80.4%
Taylor expanded in y around 0 86.4%
Taylor expanded in x around 0 73.3%
if 6.9999999999999997e-138 < y < 1.6000000000000001e-60Initial program 85.7%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 38.0%
associate-/r*38.0%
+-commutative38.0%
Simplified38.0%
Taylor expanded in y around 0 38.0%
neg-mul-138.0%
unsub-neg38.0%
Simplified38.0%
if 9.5 < y Initial program 69.2%
times-frac93.2%
/-rgt-identity93.2%
associate-/l/93.2%
*-lft-identity93.2%
associate-+l+93.2%
Simplified93.2%
*-commutative93.2%
associate-/r*99.8%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 69.9%
unpow269.9%
Simplified69.9%
Final simplification52.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ y x) x)))
(if (<= y -1.35e-159)
t_0
(if (<= y 7e-138)
(/ y x)
(if (<= y 1.12e-60) (- (/ x y) x) (if (<= y 9.5) t_0 (/ x (* y y))))))))
double code(double x, double y) {
double t_0 = (y / x) / x;
double tmp;
if (y <= -1.35e-159) {
tmp = t_0;
} else if (y <= 7e-138) {
tmp = y / x;
} else if (y <= 1.12e-60) {
tmp = (x / y) - x;
} else if (y <= 9.5) {
tmp = t_0;
} else {
tmp = x / (y * y);
}
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 / x) / x
if (y <= (-1.35d-159)) then
tmp = t_0
else if (y <= 7d-138) then
tmp = y / x
else if (y <= 1.12d-60) then
tmp = (x / y) - x
else if (y <= 9.5d0) then
tmp = t_0
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / x) / x;
double tmp;
if (y <= -1.35e-159) {
tmp = t_0;
} else if (y <= 7e-138) {
tmp = y / x;
} else if (y <= 1.12e-60) {
tmp = (x / y) - x;
} else if (y <= 9.5) {
tmp = t_0;
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): t_0 = (y / x) / x tmp = 0 if y <= -1.35e-159: tmp = t_0 elif y <= 7e-138: tmp = y / x elif y <= 1.12e-60: tmp = (x / y) - x elif y <= 9.5: tmp = t_0 else: tmp = x / (y * y) return tmp
function code(x, y) t_0 = Float64(Float64(y / x) / x) tmp = 0.0 if (y <= -1.35e-159) tmp = t_0; elseif (y <= 7e-138) tmp = Float64(y / x); elseif (y <= 1.12e-60) tmp = Float64(Float64(x / y) - x); elseif (y <= 9.5) tmp = t_0; else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = (y / x) / x; tmp = 0.0; if (y <= -1.35e-159) tmp = t_0; elseif (y <= 7e-138) tmp = y / x; elseif (y <= 1.12e-60) tmp = (x / y) - x; elseif (y <= 9.5) tmp = t_0; else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[y, -1.35e-159], t$95$0, If[LessEqual[y, 7e-138], N[(y / x), $MachinePrecision], If[LessEqual[y, 1.12e-60], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 9.5], t$95$0, N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{-159}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-138}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-60}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 9.5:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < -1.35e-159 or 1.12e-60 < y < 9.5Initial program 67.1%
times-frac91.9%
/-rgt-identity91.9%
associate-/l/91.9%
*-lft-identity91.9%
associate-+l+91.9%
Simplified91.9%
Taylor expanded in x around inf 35.7%
unpow235.7%
Simplified35.7%
associate-/r*35.7%
div-inv35.6%
Applied egg-rr35.6%
un-div-inv35.7%
Applied egg-rr35.7%
if -1.35e-159 < y < 6.9999999999999997e-138Initial program 64.0%
times-frac79.9%
/-rgt-identity79.9%
associate-/l/79.9%
*-lft-identity79.9%
associate-+l+79.9%
Simplified79.9%
Taylor expanded in y around 0 85.2%
Taylor expanded in x around 0 72.3%
if 6.9999999999999997e-138 < y < 1.12e-60Initial program 85.7%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 38.0%
associate-/r*38.0%
+-commutative38.0%
Simplified38.0%
Taylor expanded in y around 0 38.0%
neg-mul-138.0%
unsub-neg38.0%
Simplified38.0%
if 9.5 < y Initial program 69.2%
times-frac93.2%
/-rgt-identity93.2%
associate-/l/93.2%
*-lft-identity93.2%
associate-+l+93.2%
Simplified93.2%
*-commutative93.2%
associate-/r*99.8%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 69.9%
unpow269.9%
Simplified69.9%
Final simplification52.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* y y))))
(if (<= y -3.65e+65)
t_0
(if (<= y 2.6e-138) (/ y x) (if (<= y 0.75) (- (/ x y) x) t_0)))))
double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (y <= -3.65e+65) {
tmp = t_0;
} else if (y <= 2.6e-138) {
tmp = y / x;
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = 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 = x / (y * y)
if (y <= (-3.65d+65)) then
tmp = t_0
else if (y <= 2.6d-138) then
tmp = y / x
else if (y <= 0.75d0) then
tmp = (x / y) - x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (y <= -3.65e+65) {
tmp = t_0;
} else if (y <= 2.6e-138) {
tmp = y / x;
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = x / (y * y) tmp = 0 if y <= -3.65e+65: tmp = t_0 elif y <= 2.6e-138: tmp = y / x elif y <= 0.75: tmp = (x / y) - x else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(x / Float64(y * y)) tmp = 0.0 if (y <= -3.65e+65) tmp = t_0; elseif (y <= 2.6e-138) tmp = Float64(y / x); elseif (y <= 0.75) tmp = Float64(Float64(x / y) - x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y * y); tmp = 0.0; if (y <= -3.65e+65) tmp = t_0; elseif (y <= 2.6e-138) tmp = y / x; elseif (y <= 0.75) tmp = (x / y) - x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.65e+65], t$95$0, If[LessEqual[y, 2.6e-138], N[(y / x), $MachinePrecision], If[LessEqual[y, 0.75], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;y \leq -3.65 \cdot 10^{+65}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-138}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < -3.64999999999999987e65 or 0.75 < y Initial program 58.9%
times-frac89.9%
/-rgt-identity89.9%
associate-/l/89.9%
*-lft-identity89.9%
associate-+l+89.9%
Simplified89.9%
*-commutative89.9%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 71.5%
unpow271.5%
Simplified71.5%
if -3.64999999999999987e65 < y < 2.6e-138Initial program 72.2%
times-frac85.9%
/-rgt-identity85.9%
associate-/l/85.9%
*-lft-identity85.9%
associate-+l+85.9%
Simplified85.9%
Taylor expanded in y around 0 72.7%
Taylor expanded in x around 0 52.5%
if 2.6e-138 < y < 0.75Initial program 88.4%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 37.4%
associate-/r*37.3%
+-commutative37.3%
Simplified37.3%
Taylor expanded in y around 0 37.3%
neg-mul-137.3%
unsub-neg37.3%
Simplified37.3%
Final simplification58.9%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (/ (/ y x) x) (if (<= x -1.16e-174) (- (/ y x) y) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -1.16e-174) {
tmp = (y / x) - y;
} else {
tmp = x / (y * (y + 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 <= (-1.0d0)) then
tmp = (y / x) / x
else if (x <= (-1.16d-174)) then
tmp = (y / x) - y
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -1.16e-174) {
tmp = (y / x) - y;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -1.16e-174: tmp = (y / x) - y else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) / x); elseif (x <= -1.16e-174) tmp = Float64(Float64(y / x) - y); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (y / x) / x; elseif (x <= -1.16e-174) tmp = (y / x) - y; else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.16e-174], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.16 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -1Initial program 56.1%
times-frac88.0%
/-rgt-identity88.0%
associate-/l/88.0%
*-lft-identity88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in x around inf 72.6%
unpow272.6%
Simplified72.6%
associate-/r*74.3%
div-inv74.2%
Applied egg-rr74.2%
un-div-inv74.3%
Applied egg-rr74.3%
if -1 < x < -1.16e-174Initial program 82.7%
times-frac99.8%
/-rgt-identity99.8%
associate-/l/99.8%
*-lft-identity99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in y around 0 46.1%
Taylor expanded in x around 0 46.1%
neg-mul-146.1%
unsub-neg46.1%
Simplified46.1%
if -1.16e-174 < x Initial program 69.7%
times-frac88.0%
/-rgt-identity88.0%
associate-/l/88.0%
*-lft-identity88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in x around 0 59.2%
Final simplification60.7%
(FPCore (x y) :precision binary64 (if (<= x -3.2e+157) (/ (/ y x) x) (if (<= x -1.16e-174) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -3.2e+157) {
tmp = (y / x) / x;
} else if (x <= -1.16e-174) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 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 <= (-3.2d+157)) then
tmp = (y / x) / x
else if (x <= (-1.16d-174)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -3.2e+157) {
tmp = (y / x) / x;
} else if (x <= -1.16e-174) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -3.2e+157: tmp = (y / x) / x elif x <= -1.16e-174: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -3.2e+157) tmp = Float64(Float64(y / x) / x); elseif (x <= -1.16e-174) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -3.2e+157) tmp = (y / x) / x; elseif (x <= -1.16e-174) tmp = y / (x * (x + 1.0)); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -3.2e+157], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.16e-174], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+157}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.16 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -3.1999999999999999e157Initial program 50.5%
times-frac82.0%
/-rgt-identity82.0%
associate-/l/82.0%
*-lft-identity82.0%
associate-+l+82.0%
Simplified82.0%
Taylor expanded in x around inf 82.0%
unpow282.0%
Simplified82.0%
associate-/r*90.5%
div-inv90.4%
Applied egg-rr90.4%
un-div-inv90.5%
Applied egg-rr90.5%
if -3.1999999999999999e157 < x < -1.16e-174Initial program 71.8%
times-frac96.0%
/-rgt-identity96.0%
associate-/l/96.0%
*-lft-identity96.0%
associate-+l+96.0%
Simplified96.0%
Taylor expanded in y around 0 56.9%
if -1.16e-174 < x Initial program 69.7%
times-frac88.0%
/-rgt-identity88.0%
associate-/l/88.0%
*-lft-identity88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in x around 0 59.2%
Final simplification61.3%
(FPCore (x y) :precision binary64 (if (<= x -5.8e+156) (/ (/ y x) x) (if (<= x -1.16e-174) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -5.8e+156) {
tmp = (y / x) / x;
} else if (x <= -1.16e-174) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 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 <= (-5.8d+156)) then
tmp = (y / x) / x
else if (x <= (-1.16d-174)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -5.8e+156) {
tmp = (y / x) / x;
} else if (x <= -1.16e-174) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.8e+156: tmp = (y / x) / x elif x <= -1.16e-174: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.8e+156) tmp = Float64(Float64(y / x) / x); elseif (x <= -1.16e-174) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.8e+156) tmp = (y / x) / x; elseif (x <= -1.16e-174) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.8e+156], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.16e-174], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+156}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.16 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -5.80000000000000021e156Initial program 50.5%
times-frac82.0%
/-rgt-identity82.0%
associate-/l/82.0%
*-lft-identity82.0%
associate-+l+82.0%
Simplified82.0%
Taylor expanded in x around inf 82.0%
unpow282.0%
Simplified82.0%
associate-/r*90.5%
div-inv90.4%
Applied egg-rr90.4%
un-div-inv90.5%
Applied egg-rr90.5%
if -5.80000000000000021e156 < x < -1.16e-174Initial program 71.8%
times-frac96.0%
/-rgt-identity96.0%
associate-/l/96.0%
*-lft-identity96.0%
associate-+l+96.0%
Simplified96.0%
Taylor expanded in y around 0 56.9%
if -1.16e-174 < x Initial program 69.7%
times-frac88.0%
/-rgt-identity88.0%
associate-/l/88.0%
*-lft-identity88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in x around 0 59.2%
associate-/r*60.0%
+-commutative60.0%
Simplified60.0%
Final simplification61.8%
(FPCore (x y) :precision binary64 (if (<= x -5.5e+14) (/ (/ y x) (+ y x)) (if (<= x -1.16e-174) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -5.5e+14) {
tmp = (y / x) / (y + x);
} else if (x <= -1.16e-174) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 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 <= (-5.5d+14)) then
tmp = (y / x) / (y + x)
else if (x <= (-1.16d-174)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -5.5e+14) {
tmp = (y / x) / (y + x);
} else if (x <= -1.16e-174) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.5e+14: tmp = (y / x) / (y + x) elif x <= -1.16e-174: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.5e+14) tmp = Float64(Float64(y / x) / Float64(y + x)); elseif (x <= -1.16e-174) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.5e+14) tmp = (y / x) / (y + x); elseif (x <= -1.16e-174) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.5e+14], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.16e-174], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\
\mathbf{elif}\;x \leq -1.16 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -5.5e14Initial program 52.0%
times-frac86.9%
/-rgt-identity86.9%
associate-/l/86.9%
*-lft-identity86.9%
associate-+l+86.9%
Simplified86.9%
*-commutative86.9%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 77.4%
if -5.5e14 < x < -1.16e-174Initial program 84.6%
times-frac99.8%
/-rgt-identity99.8%
associate-/l/99.8%
*-lft-identity99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in y around 0 47.8%
if -1.16e-174 < x Initial program 69.7%
times-frac88.0%
/-rgt-identity88.0%
associate-/l/88.0%
*-lft-identity88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in x around 0 59.2%
associate-/r*60.0%
+-commutative60.0%
Simplified60.0%
Final simplification61.5%
(FPCore (x y) :precision binary64 (if (<= x -1.16e-174) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -1.16e-174) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / y) / (y + 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 <= (-1.16d-174)) then
tmp = (y / (x + 1.0d0)) / (y + x)
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.16e-174) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.16e-174: tmp = (y / (x + 1.0)) / (y + x) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.16e-174) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.16e-174) tmp = (y / (x + 1.0)) / (y + x); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.16e-174], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.16 \cdot 10^{-174}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.16e-174Initial program 66.8%
times-frac92.7%
/-rgt-identity92.7%
associate-/l/92.7%
*-lft-identity92.7%
associate-+l+92.7%
Simplified92.7%
*-commutative92.7%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 64.0%
if -1.16e-174 < x Initial program 69.7%
times-frac88.0%
/-rgt-identity88.0%
associate-/l/88.0%
*-lft-identity88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in x around 0 59.2%
associate-/r*60.0%
+-commutative60.0%
Simplified60.0%
Final simplification61.6%
(FPCore (x y) :precision binary64 (if (<= x -1.16e-174) (/ (/ y (+ x 1.0)) x) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -1.16e-174) {
tmp = (y / (x + 1.0)) / x;
} else {
tmp = (x / y) / (y + 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 <= (-1.16d-174)) then
tmp = (y / (x + 1.0d0)) / x
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.16e-174) {
tmp = (y / (x + 1.0)) / x;
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.16e-174: tmp = (y / (x + 1.0)) / x else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.16e-174) tmp = Float64(Float64(y / Float64(x + 1.0)) / x); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.16e-174) tmp = (y / (x + 1.0)) / x; else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.16e-174], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.16 \cdot 10^{-174}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.16e-174Initial program 66.8%
times-frac92.7%
/-rgt-identity92.7%
associate-/l/92.7%
*-lft-identity92.7%
associate-+l+92.7%
Simplified92.7%
Taylor expanded in y around 0 62.7%
associate-/r*63.7%
+-commutative63.7%
Simplified63.7%
if -1.16e-174 < x Initial program 69.7%
times-frac88.0%
/-rgt-identity88.0%
associate-/l/88.0%
*-lft-identity88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in x around 0 59.2%
associate-/r*60.0%
+-commutative60.0%
Simplified60.0%
Final simplification61.4%
(FPCore (x y) :precision binary64 (if (<= x -8.6e-231) (/ y x) (- (/ x y) x)))
double code(double x, double y) {
double tmp;
if (x <= -8.6e-231) {
tmp = y / x;
} else {
tmp = (x / y) - x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-8.6d-231)) then
tmp = y / x
else
tmp = (x / y) - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -8.6e-231) {
tmp = y / x;
} else {
tmp = (x / y) - x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -8.6e-231: tmp = y / x else: tmp = (x / y) - x return tmp
function code(x, y) tmp = 0.0 if (x <= -8.6e-231) tmp = Float64(y / x); else tmp = Float64(Float64(x / y) - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -8.6e-231) tmp = y / x; else tmp = (x / y) - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -8.6e-231], N[(y / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{-231}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - x\\
\end{array}
\end{array}
if x < -8.59999999999999996e-231Initial program 66.5%
times-frac89.9%
/-rgt-identity89.9%
associate-/l/89.9%
*-lft-identity89.9%
associate-+l+89.9%
Simplified89.9%
Taylor expanded in y around 0 58.5%
Taylor expanded in x around 0 30.9%
if -8.59999999999999996e-231 < x Initial program 70.1%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
Taylor expanded in x around 0 57.5%
associate-/r*58.3%
+-commutative58.3%
Simplified58.3%
Taylor expanded in y around 0 20.7%
neg-mul-120.7%
unsub-neg20.7%
Simplified20.7%
Final simplification25.1%
(FPCore (x y) :precision binary64 (/ y x))
double code(double x, double y) {
return y / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y / x
end function
public static double code(double x, double y) {
return y / x;
}
def code(x, y): return y / x
function code(x, y) return Float64(y / x) end
function tmp = code(x, y) tmp = y / x; end
code[x_, y_] := N[(y / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{x}
\end{array}
Initial program 68.6%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
Taylor expanded in y around 0 49.8%
Taylor expanded in x around 0 26.1%
Final simplification26.1%
(FPCore (x y) :precision binary64 (- x))
double code(double x, double y) {
return -x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = -x
end function
public static double code(double x, double y) {
return -x;
}
def code(x, y): return -x
function code(x, y) return Float64(-x) end
function tmp = code(x, y) tmp = -x; end
code[x_, y_] := (-x)
\begin{array}{l}
\\
-x
\end{array}
Initial program 68.6%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
Taylor expanded in x around 0 50.2%
associate-/r*51.0%
+-commutative51.0%
Simplified51.0%
Taylor expanded in y around 0 15.8%
neg-mul-115.8%
unsub-neg15.8%
Simplified15.8%
Taylor expanded in y around inf 3.5%
neg-mul-13.5%
Simplified3.5%
Final simplification3.5%
(FPCore (x y) :precision binary64 (- y))
double code(double x, double y) {
return -y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = -y
end function
public static double code(double x, double y) {
return -y;
}
def code(x, y): return -y
function code(x, y) return Float64(-y) end
function tmp = code(x, y) tmp = -y; end
code[x_, y_] := (-y)
\begin{array}{l}
\\
-y
\end{array}
Initial program 68.6%
times-frac89.8%
/-rgt-identity89.8%
associate-/l/89.8%
*-lft-identity89.8%
associate-+l+89.8%
Simplified89.8%
*-commutative89.8%
associate-/r*99.7%
associate-*r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 50.8%
Taylor expanded in x around 0 16.1%
neg-mul-116.1%
unsub-neg16.1%
*-commutative16.1%
Simplified16.1%
Taylor expanded in x around inf 3.5%
neg-mul-13.5%
Simplified3.5%
Final simplification3.5%
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y): return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y) return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x)))) end
function tmp = code(x, y) tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x))); end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}
herbie shell --seed 2023185
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))