
(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 19 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 (* (/ 1.0 (+ y x)) (* (/ y (+ y (+ 1.0 x))) (/ x (+ y x)))))
double code(double x, double y) {
return (1.0 / (y + x)) * ((y / (y + (1.0 + x))) * (x / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 / (y + x)) * ((y / (y + (1.0d0 + x))) * (x / (y + x)))
end function
public static double code(double x, double y) {
return (1.0 / (y + x)) * ((y / (y + (1.0 + x))) * (x / (y + x)));
}
def code(x, y): return (1.0 / (y + x)) * ((y / (y + (1.0 + x))) * (x / (y + x)))
function code(x, y) return Float64(Float64(1.0 / Float64(y + x)) * Float64(Float64(y / Float64(y + Float64(1.0 + x))) * Float64(x / Float64(y + x)))) end
function tmp = code(x, y) tmp = (1.0 / (y + x)) * ((y / (y + (1.0 + x))) * (x / (y + x))); end
code[x_, y_] := N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y + x} \cdot \left(\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}\right)
\end{array}
Initial program 72.0%
associate-+r+72.0%
*-un-lft-identity72.0%
associate-*l*72.0%
times-frac78.2%
+-commutative78.2%
*-commutative78.2%
+-commutative78.2%
+-commutative78.2%
associate-+l+78.2%
Applied egg-rr78.2%
*-commutative78.2%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ 1.0 (+ y x))))
(if (<= x -1.55e+97)
(/ (/ t_0 (/ (+ y x) x)) (/ x y))
(if (<= x -1.5e-32)
(* x (/ (/ y (* (+ y x) (+ y x))) (+ x (+ 1.0 y))))
(* t_0 (* (/ x (+ y x)) (/ y (+ 1.0 y))))))))
double code(double x, double y) {
double t_0 = 1.0 / (y + x);
double tmp;
if (x <= -1.55e+97) {
tmp = (t_0 / ((y + x) / x)) / (x / y);
} else if (x <= -1.5e-32) {
tmp = x * ((y / ((y + x) * (y + x))) / (x + (1.0 + y)));
} else {
tmp = t_0 * ((x / (y + x)) * (y / (1.0 + 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 = 1.0d0 / (y + x)
if (x <= (-1.55d+97)) then
tmp = (t_0 / ((y + x) / x)) / (x / y)
else if (x <= (-1.5d-32)) then
tmp = x * ((y / ((y + x) * (y + x))) / (x + (1.0d0 + y)))
else
tmp = t_0 * ((x / (y + x)) * (y / (1.0d0 + y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 / (y + x);
double tmp;
if (x <= -1.55e+97) {
tmp = (t_0 / ((y + x) / x)) / (x / y);
} else if (x <= -1.5e-32) {
tmp = x * ((y / ((y + x) * (y + x))) / (x + (1.0 + y)));
} else {
tmp = t_0 * ((x / (y + x)) * (y / (1.0 + y)));
}
return tmp;
}
def code(x, y): t_0 = 1.0 / (y + x) tmp = 0 if x <= -1.55e+97: tmp = (t_0 / ((y + x) / x)) / (x / y) elif x <= -1.5e-32: tmp = x * ((y / ((y + x) * (y + x))) / (x + (1.0 + y))) else: tmp = t_0 * ((x / (y + x)) * (y / (1.0 + y))) return tmp
function code(x, y) t_0 = Float64(1.0 / Float64(y + x)) tmp = 0.0 if (x <= -1.55e+97) tmp = Float64(Float64(t_0 / Float64(Float64(y + x) / x)) / Float64(x / y)); elseif (x <= -1.5e-32) tmp = Float64(x * Float64(Float64(y / Float64(Float64(y + x) * Float64(y + x))) / Float64(x + Float64(1.0 + y)))); else tmp = Float64(t_0 * Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(1.0 + y)))); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 / (y + x); tmp = 0.0; if (x <= -1.55e+97) tmp = (t_0 / ((y + x) / x)) / (x / y); elseif (x <= -1.5e-32) tmp = x * ((y / ((y + x) * (y + x))) / (x + (1.0 + y))); else tmp = t_0 * ((x / (y + x)) * (y / (1.0 + y))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.55e+97], N[(N[(t$95$0 / N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-32], N[(x * N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y + x}\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{+97}:\\
\;\;\;\;\frac{\frac{t\_0}{\frac{y + x}{x}}}{\frac{x}{y}}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \frac{\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}}{x + \left(1 + y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\frac{x}{y + x} \cdot \frac{y}{1 + y}\right)\\
\end{array}
\end{array}
if x < -1.54999999999999991e97Initial program 65.5%
associate-+r+65.5%
*-un-lft-identity65.5%
associate-*l*65.5%
times-frac73.0%
+-commutative73.0%
*-commutative73.0%
+-commutative73.0%
+-commutative73.0%
associate-+l+73.0%
Applied egg-rr73.0%
*-commutative73.0%
times-frac99.8%
+-commutative99.8%
Simplified99.8%
*-commutative99.8%
frac-times73.0%
*-commutative73.0%
clear-num73.0%
frac-times72.3%
metadata-eval72.3%
*-commutative72.3%
times-frac96.2%
+-commutative96.2%
Applied egg-rr96.2%
associate-/l/99.8%
associate-/r*99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 90.9%
if -1.54999999999999991e97 < x < -1.5e-32Initial program 78.4%
associate-/r*87.2%
+-commutative87.2%
+-commutative87.2%
associate-/l*92.2%
+-commutative92.2%
associate-*r/85.1%
+-commutative85.1%
+-commutative85.1%
+-commutative85.1%
associate-+l+85.1%
Simplified85.1%
if -1.5e-32 < x Initial program 72.6%
associate-+r+72.6%
*-un-lft-identity72.6%
associate-*l*72.7%
times-frac78.2%
+-commutative78.2%
*-commutative78.2%
+-commutative78.2%
+-commutative78.2%
associate-+l+78.2%
Applied egg-rr78.2%
*-commutative78.2%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 84.4%
+-commutative84.4%
Simplified84.4%
Final simplification85.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ y (+ 1.0 x))))
(if (<= y 7.2e-145)
(* (/ 1.0 (+ y x)) (/ y (+ 1.0 x)))
(if (<= y 3.2e+157) (* x (/ (/ 1.0 t_0) (+ y x))) (/ (/ x y) t_0)))))
double code(double x, double y) {
double t_0 = y + (1.0 + x);
double tmp;
if (y <= 7.2e-145) {
tmp = (1.0 / (y + x)) * (y / (1.0 + x));
} else if (y <= 3.2e+157) {
tmp = x * ((1.0 / t_0) / (y + x));
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y + (1.0d0 + x)
if (y <= 7.2d-145) then
tmp = (1.0d0 / (y + x)) * (y / (1.0d0 + x))
else if (y <= 3.2d+157) then
tmp = x * ((1.0d0 / t_0) / (y + x))
else
tmp = (x / y) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y + (1.0 + x);
double tmp;
if (y <= 7.2e-145) {
tmp = (1.0 / (y + x)) * (y / (1.0 + x));
} else if (y <= 3.2e+157) {
tmp = x * ((1.0 / t_0) / (y + x));
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
def code(x, y): t_0 = y + (1.0 + x) tmp = 0 if y <= 7.2e-145: tmp = (1.0 / (y + x)) * (y / (1.0 + x)) elif y <= 3.2e+157: tmp = x * ((1.0 / t_0) / (y + x)) else: tmp = (x / y) / t_0 return tmp
function code(x, y) t_0 = Float64(y + Float64(1.0 + x)) tmp = 0.0 if (y <= 7.2e-145) tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / Float64(1.0 + x))); elseif (y <= 3.2e+157) tmp = Float64(x * Float64(Float64(1.0 / t_0) / Float64(y + x))); else tmp = Float64(Float64(x / y) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = y + (1.0 + x); tmp = 0.0; if (y <= 7.2e-145) tmp = (1.0 / (y + x)) * (y / (1.0 + x)); elseif (y <= 3.2e+157) tmp = x * ((1.0 / t_0) / (y + x)); else tmp = (x / y) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.2e-145], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+157], N[(x * N[(N[(1.0 / t$95$0), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y + \left(1 + x\right)\\
\mathbf{if}\;y \leq 7.2 \cdot 10^{-145}:\\
\;\;\;\;\frac{1}{y + x} \cdot \frac{y}{1 + x}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+157}:\\
\;\;\;\;x \cdot \frac{\frac{1}{t\_0}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
\end{array}
\end{array}
if y < 7.2000000000000001e-145Initial program 70.8%
associate-+r+70.8%
*-un-lft-identity70.8%
associate-*l*70.9%
times-frac75.4%
+-commutative75.4%
*-commutative75.4%
+-commutative75.4%
+-commutative75.4%
associate-+l+75.4%
Applied egg-rr75.4%
*-commutative75.4%
times-frac99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 55.4%
+-commutative55.4%
Simplified55.4%
if 7.2000000000000001e-145 < y < 3.1999999999999999e157Initial program 77.6%
associate-+r+77.6%
*-un-lft-identity77.6%
associate-*l*77.6%
times-frac89.6%
+-commutative89.6%
*-commutative89.6%
+-commutative89.6%
+-commutative89.6%
associate-+l+89.6%
Applied egg-rr89.6%
*-commutative89.6%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
associate-*r*99.8%
clear-num99.7%
un-div-inv99.7%
frac-times94.0%
*-un-lft-identity94.0%
+-commutative94.0%
Applied egg-rr94.0%
associate-/r/88.7%
associate-/r*88.8%
+-commutative88.8%
Simplified88.8%
Taylor expanded in y around inf 76.8%
if 3.1999999999999999e157 < y Initial program 63.2%
associate-/r*63.2%
+-commutative63.2%
+-commutative63.2%
associate-/l*85.2%
+-commutative85.2%
associate-*r/85.2%
+-commutative85.2%
+-commutative85.2%
+-commutative85.2%
associate-+l+85.2%
Simplified85.2%
Taylor expanded in y around inf 85.4%
add085.4%
associate-/l/85.2%
un-div-inv85.2%
associate-+r+85.2%
+-commutative85.2%
associate-+r+85.2%
+-commutative85.2%
Applied egg-rr85.2%
associate-/l/96.1%
add096.1%
+-commutative96.1%
Simplified96.1%
Final simplification65.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ 1.0 (+ y x))))
(if (<= y 7.2e-145)
(* t_0 (/ y (+ 1.0 x)))
(if (<= y 8.5e+157)
(* x (/ (/ 1.0 (+ y (+ 1.0 x))) (+ y x)))
(/ t_0 (/ (+ y x) x))))))
double code(double x, double y) {
double t_0 = 1.0 / (y + x);
double tmp;
if (y <= 7.2e-145) {
tmp = t_0 * (y / (1.0 + x));
} else if (y <= 8.5e+157) {
tmp = x * ((1.0 / (y + (1.0 + x))) / (y + x));
} else {
tmp = t_0 / ((y + x) / 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 = 1.0d0 / (y + x)
if (y <= 7.2d-145) then
tmp = t_0 * (y / (1.0d0 + x))
else if (y <= 8.5d+157) then
tmp = x * ((1.0d0 / (y + (1.0d0 + x))) / (y + x))
else
tmp = t_0 / ((y + x) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 / (y + x);
double tmp;
if (y <= 7.2e-145) {
tmp = t_0 * (y / (1.0 + x));
} else if (y <= 8.5e+157) {
tmp = x * ((1.0 / (y + (1.0 + x))) / (y + x));
} else {
tmp = t_0 / ((y + x) / x);
}
return tmp;
}
def code(x, y): t_0 = 1.0 / (y + x) tmp = 0 if y <= 7.2e-145: tmp = t_0 * (y / (1.0 + x)) elif y <= 8.5e+157: tmp = x * ((1.0 / (y + (1.0 + x))) / (y + x)) else: tmp = t_0 / ((y + x) / x) return tmp
function code(x, y) t_0 = Float64(1.0 / Float64(y + x)) tmp = 0.0 if (y <= 7.2e-145) tmp = Float64(t_0 * Float64(y / Float64(1.0 + x))); elseif (y <= 8.5e+157) tmp = Float64(x * Float64(Float64(1.0 / Float64(y + Float64(1.0 + x))) / Float64(y + x))); else tmp = Float64(t_0 / Float64(Float64(y + x) / x)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 / (y + x); tmp = 0.0; if (y <= 7.2e-145) tmp = t_0 * (y / (1.0 + x)); elseif (y <= 8.5e+157) tmp = x * ((1.0 / (y + (1.0 + x))) / (y + x)); else tmp = t_0 / ((y + x) / x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.2e-145], N[(t$95$0 * N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+157], N[(x * N[(N[(1.0 / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y + x}\\
\mathbf{if}\;y \leq 7.2 \cdot 10^{-145}:\\
\;\;\;\;t\_0 \cdot \frac{y}{1 + x}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+157}:\\
\;\;\;\;x \cdot \frac{\frac{1}{y + \left(1 + x\right)}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{\frac{y + x}{x}}\\
\end{array}
\end{array}
if y < 7.2000000000000001e-145Initial program 70.8%
associate-+r+70.8%
*-un-lft-identity70.8%
associate-*l*70.9%
times-frac75.4%
+-commutative75.4%
*-commutative75.4%
+-commutative75.4%
+-commutative75.4%
associate-+l+75.4%
Applied egg-rr75.4%
*-commutative75.4%
times-frac99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 55.4%
+-commutative55.4%
Simplified55.4%
if 7.2000000000000001e-145 < y < 8.4999999999999998e157Initial program 77.6%
associate-+r+77.6%
*-un-lft-identity77.6%
associate-*l*77.6%
times-frac89.6%
+-commutative89.6%
*-commutative89.6%
+-commutative89.6%
+-commutative89.6%
associate-+l+89.6%
Applied egg-rr89.6%
*-commutative89.6%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
associate-*r*99.8%
clear-num99.7%
un-div-inv99.7%
frac-times94.0%
*-un-lft-identity94.0%
+-commutative94.0%
Applied egg-rr94.0%
associate-/r/88.7%
associate-/r*88.8%
+-commutative88.8%
Simplified88.8%
Taylor expanded in y around inf 76.8%
if 8.4999999999999998e157 < y Initial program 63.2%
associate-+r+63.2%
*-un-lft-identity63.2%
associate-*l*63.2%
times-frac63.2%
+-commutative63.2%
*-commutative63.2%
+-commutative63.2%
+-commutative63.2%
associate-+l+63.2%
Applied egg-rr63.2%
*-commutative63.2%
times-frac100.0%
+-commutative100.0%
Simplified100.0%
*-commutative100.0%
frac-times63.2%
*-commutative63.2%
clear-num63.2%
frac-times63.2%
metadata-eval63.2%
*-commutative63.2%
times-frac96.5%
+-commutative96.5%
Applied egg-rr96.5%
associate-/l/99.9%
associate-/r*99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 96.1%
Final simplification65.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ 1.0 (+ y x))) (t_1 (+ y (+ 1.0 x))))
(if (<= y 7.2e-145)
(* t_0 (/ y t_1))
(if (<= y 4.3e+157)
(* x (/ (/ 1.0 t_1) (+ y x)))
(/ t_0 (/ (+ y x) x))))))
double code(double x, double y) {
double t_0 = 1.0 / (y + x);
double t_1 = y + (1.0 + x);
double tmp;
if (y <= 7.2e-145) {
tmp = t_0 * (y / t_1);
} else if (y <= 4.3e+157) {
tmp = x * ((1.0 / t_1) / (y + x));
} else {
tmp = t_0 / ((y + x) / 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) :: t_1
real(8) :: tmp
t_0 = 1.0d0 / (y + x)
t_1 = y + (1.0d0 + x)
if (y <= 7.2d-145) then
tmp = t_0 * (y / t_1)
else if (y <= 4.3d+157) then
tmp = x * ((1.0d0 / t_1) / (y + x))
else
tmp = t_0 / ((y + x) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 / (y + x);
double t_1 = y + (1.0 + x);
double tmp;
if (y <= 7.2e-145) {
tmp = t_0 * (y / t_1);
} else if (y <= 4.3e+157) {
tmp = x * ((1.0 / t_1) / (y + x));
} else {
tmp = t_0 / ((y + x) / x);
}
return tmp;
}
def code(x, y): t_0 = 1.0 / (y + x) t_1 = y + (1.0 + x) tmp = 0 if y <= 7.2e-145: tmp = t_0 * (y / t_1) elif y <= 4.3e+157: tmp = x * ((1.0 / t_1) / (y + x)) else: tmp = t_0 / ((y + x) / x) return tmp
function code(x, y) t_0 = Float64(1.0 / Float64(y + x)) t_1 = Float64(y + Float64(1.0 + x)) tmp = 0.0 if (y <= 7.2e-145) tmp = Float64(t_0 * Float64(y / t_1)); elseif (y <= 4.3e+157) tmp = Float64(x * Float64(Float64(1.0 / t_1) / Float64(y + x))); else tmp = Float64(t_0 / Float64(Float64(y + x) / x)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 / (y + x); t_1 = y + (1.0 + x); tmp = 0.0; if (y <= 7.2e-145) tmp = t_0 * (y / t_1); elseif (y <= 4.3e+157) tmp = x * ((1.0 / t_1) / (y + x)); else tmp = t_0 / ((y + x) / x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.2e-145], N[(t$95$0 * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e+157], N[(x * N[(N[(1.0 / t$95$1), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y + x}\\
t_1 := y + \left(1 + x\right)\\
\mathbf{if}\;y \leq 7.2 \cdot 10^{-145}:\\
\;\;\;\;t\_0 \cdot \frac{y}{t\_1}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+157}:\\
\;\;\;\;x \cdot \frac{\frac{1}{t\_1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{\frac{y + x}{x}}\\
\end{array}
\end{array}
if y < 7.2000000000000001e-145Initial program 70.8%
associate-+r+70.8%
*-un-lft-identity70.8%
associate-*l*70.9%
times-frac75.4%
+-commutative75.4%
*-commutative75.4%
+-commutative75.4%
+-commutative75.4%
associate-+l+75.4%
Applied egg-rr75.4%
*-commutative75.4%
times-frac99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 56.1%
if 7.2000000000000001e-145 < y < 4.3e157Initial program 77.6%
associate-+r+77.6%
*-un-lft-identity77.6%
associate-*l*77.6%
times-frac89.6%
+-commutative89.6%
*-commutative89.6%
+-commutative89.6%
+-commutative89.6%
associate-+l+89.6%
Applied egg-rr89.6%
*-commutative89.6%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
associate-*r*99.8%
clear-num99.7%
un-div-inv99.7%
frac-times94.0%
*-un-lft-identity94.0%
+-commutative94.0%
Applied egg-rr94.0%
associate-/r/88.7%
associate-/r*88.8%
+-commutative88.8%
Simplified88.8%
Taylor expanded in y around inf 76.8%
if 4.3e157 < y Initial program 63.2%
associate-+r+63.2%
*-un-lft-identity63.2%
associate-*l*63.2%
times-frac63.2%
+-commutative63.2%
*-commutative63.2%
+-commutative63.2%
+-commutative63.2%
associate-+l+63.2%
Applied egg-rr63.2%
*-commutative63.2%
times-frac100.0%
+-commutative100.0%
Simplified100.0%
*-commutative100.0%
frac-times63.2%
*-commutative63.2%
clear-num63.2%
frac-times63.2%
metadata-eval63.2%
*-commutative63.2%
times-frac96.5%
+-commutative96.5%
Applied egg-rr96.5%
associate-/l/99.9%
associate-/r*99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 96.1%
Final simplification65.7%
(FPCore (x y) :precision binary64 (if (<= y 2.6e+157) (* (/ y (+ y x)) (/ x (* (+ y x) (+ y (+ 1.0 x))))) (* (/ 1.0 (+ y x)) (* (/ x (+ y x)) (/ y (+ 1.0 y))))))
double code(double x, double y) {
double tmp;
if (y <= 2.6e+157) {
tmp = (y / (y + x)) * (x / ((y + x) * (y + (1.0 + x))));
} else {
tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.6d+157) then
tmp = (y / (y + x)) * (x / ((y + x) * (y + (1.0d0 + x))))
else
tmp = (1.0d0 / (y + x)) * ((x / (y + x)) * (y / (1.0d0 + y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.6e+157) {
tmp = (y / (y + x)) * (x / ((y + x) * (y + (1.0 + x))));
} else {
tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.6e+157: tmp = (y / (y + x)) * (x / ((y + x) * (y + (1.0 + x)))) else: tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.6e+157) tmp = Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(Float64(y + x) * Float64(y + Float64(1.0 + x))))); else tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(1.0 + y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.6e+157) tmp = (y / (y + x)) * (x / ((y + x) * (y + (1.0 + x)))); else tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.6e+157], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+157}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + \left(1 + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y + x} \cdot \left(\frac{x}{y + x} \cdot \frac{y}{1 + y}\right)\\
\end{array}
\end{array}
if y < 2.60000000000000011e157Initial program 72.9%
associate-+r+72.9%
*-commutative72.9%
associate-*l*73.0%
times-frac95.1%
+-commutative95.1%
+-commutative95.1%
+-commutative95.1%
associate-+l+95.1%
Applied egg-rr95.1%
if 2.60000000000000011e157 < y Initial program 63.2%
associate-+r+63.2%
*-un-lft-identity63.2%
associate-*l*63.2%
times-frac63.2%
+-commutative63.2%
*-commutative63.2%
+-commutative63.2%
+-commutative63.2%
associate-+l+63.2%
Applied egg-rr63.2%
*-commutative63.2%
times-frac100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 96.2%
+-commutative96.2%
Simplified96.2%
Final simplification95.2%
(FPCore (x y) :precision binary64 (if (<= y 2.6e+157) (/ (/ y (* (+ y x) (+ y (+ 1.0 x)))) (/ (+ y x) x)) (* (/ 1.0 (+ y x)) (* (/ x (+ y x)) (/ y (+ 1.0 y))))))
double code(double x, double y) {
double tmp;
if (y <= 2.6e+157) {
tmp = (y / ((y + x) * (y + (1.0 + x)))) / ((y + x) / x);
} else {
tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.6d+157) then
tmp = (y / ((y + x) * (y + (1.0d0 + x)))) / ((y + x) / x)
else
tmp = (1.0d0 / (y + x)) * ((x / (y + x)) * (y / (1.0d0 + y)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.6e+157) {
tmp = (y / ((y + x) * (y + (1.0 + x)))) / ((y + x) / x);
} else {
tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.6e+157: tmp = (y / ((y + x) * (y + (1.0 + x)))) / ((y + x) / x) else: tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y))) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.6e+157) tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(y + Float64(1.0 + x)))) / Float64(Float64(y + x) / x)); else tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(1.0 + y)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.6e+157) tmp = (y / ((y + x) * (y + (1.0 + x)))) / ((y + x) / x); else tmp = (1.0 / (y + x)) * ((x / (y + x)) * (y / (1.0 + y))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.6e+157], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+157}:\\
\;\;\;\;\frac{\frac{y}{\left(y + x\right) \cdot \left(y + \left(1 + x\right)\right)}}{\frac{y + x}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y + x} \cdot \left(\frac{x}{y + x} \cdot \frac{y}{1 + y}\right)\\
\end{array}
\end{array}
if y < 2.60000000000000011e157Initial program 72.9%
associate-+r+72.9%
*-un-lft-identity72.9%
associate-*l*73.0%
times-frac79.8%
+-commutative79.8%
*-commutative79.8%
+-commutative79.8%
+-commutative79.8%
associate-+l+79.8%
Applied egg-rr79.8%
*-commutative79.8%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
associate-*r*99.7%
clear-num99.7%
un-div-inv99.7%
frac-times95.1%
*-un-lft-identity95.1%
+-commutative95.1%
Applied egg-rr95.1%
if 2.60000000000000011e157 < y Initial program 63.2%
associate-+r+63.2%
*-un-lft-identity63.2%
associate-*l*63.2%
times-frac63.2%
+-commutative63.2%
*-commutative63.2%
+-commutative63.2%
+-commutative63.2%
associate-+l+63.2%
Applied egg-rr63.2%
*-commutative63.2%
times-frac100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 96.2%
+-commutative96.2%
Simplified96.2%
Final simplification95.2%
(FPCore (x y) :precision binary64 (if (<= x -360000000000.0) (* (/ 1.0 (+ y x)) (/ y (+ y (+ 1.0 x)))) (/ (/ y (* (+ y x) (+ 1.0 y))) (/ (+ y x) x))))
double code(double x, double y) {
double tmp;
if (x <= -360000000000.0) {
tmp = (1.0 / (y + x)) * (y / (y + (1.0 + x)));
} else {
tmp = (y / ((y + x) * (1.0 + y))) / ((y + x) / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-360000000000.0d0)) then
tmp = (1.0d0 / (y + x)) * (y / (y + (1.0d0 + x)))
else
tmp = (y / ((y + x) * (1.0d0 + y))) / ((y + x) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -360000000000.0) {
tmp = (1.0 / (y + x)) * (y / (y + (1.0 + x)));
} else {
tmp = (y / ((y + x) * (1.0 + y))) / ((y + x) / x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -360000000000.0: tmp = (1.0 / (y + x)) * (y / (y + (1.0 + x))) else: tmp = (y / ((y + x) * (1.0 + y))) / ((y + x) / x) return tmp
function code(x, y) tmp = 0.0 if (x <= -360000000000.0) tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / Float64(y + Float64(1.0 + x)))); else tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(1.0 + y))) / Float64(Float64(y + x) / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -360000000000.0) tmp = (1.0 / (y + x)) * (y / (y + (1.0 + x))); else tmp = (y / ((y + x) * (1.0 + y))) / ((y + x) / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -360000000000.0], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -360000000000:\\
\;\;\;\;\frac{1}{y + x} \cdot \frac{y}{y + \left(1 + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{\left(y + x\right) \cdot \left(1 + y\right)}}{\frac{y + x}{x}}\\
\end{array}
\end{array}
if x < -3.6e11Initial program 65.8%
associate-+r+65.8%
*-un-lft-identity65.8%
associate-*l*65.8%
times-frac74.6%
+-commutative74.6%
*-commutative74.6%
+-commutative74.6%
+-commutative74.6%
associate-+l+74.6%
Applied egg-rr74.6%
*-commutative74.6%
times-frac99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 84.7%
if -3.6e11 < x Initial program 73.8%
associate-+r+73.8%
*-un-lft-identity73.8%
associate-*l*73.8%
times-frac79.2%
+-commutative79.2%
*-commutative79.2%
+-commutative79.2%
+-commutative79.2%
associate-+l+79.2%
Applied egg-rr79.2%
*-commutative79.2%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 84.3%
+-commutative84.3%
Simplified84.3%
associate-*r*84.3%
clear-num84.2%
un-div-inv84.3%
frac-times84.3%
*-un-lft-identity84.3%
+-commutative84.3%
Applied egg-rr84.3%
Final simplification84.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (+ y x) x)))
(if (<= x -7000000000.0)
(/ (/ (/ 1.0 (+ y x)) t_0) (/ x y))
(/ (/ y (* (+ y x) (+ 1.0 y))) t_0))))
double code(double x, double y) {
double t_0 = (y + x) / x;
double tmp;
if (x <= -7000000000.0) {
tmp = ((1.0 / (y + x)) / t_0) / (x / y);
} else {
tmp = (y / ((y + x) * (1.0 + y))) / t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y + x) / x
if (x <= (-7000000000.0d0)) then
tmp = ((1.0d0 / (y + x)) / t_0) / (x / y)
else
tmp = (y / ((y + x) * (1.0d0 + y))) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y + x) / x;
double tmp;
if (x <= -7000000000.0) {
tmp = ((1.0 / (y + x)) / t_0) / (x / y);
} else {
tmp = (y / ((y + x) * (1.0 + y))) / t_0;
}
return tmp;
}
def code(x, y): t_0 = (y + x) / x tmp = 0 if x <= -7000000000.0: tmp = ((1.0 / (y + x)) / t_0) / (x / y) else: tmp = (y / ((y + x) * (1.0 + y))) / t_0 return tmp
function code(x, y) t_0 = Float64(Float64(y + x) / x) tmp = 0.0 if (x <= -7000000000.0) tmp = Float64(Float64(Float64(1.0 / Float64(y + x)) / t_0) / Float64(x / y)); else tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(1.0 + y))) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = (y + x) / x; tmp = 0.0; if (x <= -7000000000.0) tmp = ((1.0 / (y + x)) / t_0) / (x / y); else tmp = (y / ((y + x) * (1.0 + y))) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[x, -7000000000.0], N[(N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] / N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y + x}{x}\\
\mathbf{if}\;x \leq -7000000000:\\
\;\;\;\;\frac{\frac{\frac{1}{y + x}}{t\_0}}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{\left(y + x\right) \cdot \left(1 + y\right)}}{t\_0}\\
\end{array}
\end{array}
if x < -7e9Initial program 65.8%
associate-+r+65.8%
*-un-lft-identity65.8%
associate-*l*65.8%
times-frac74.6%
+-commutative74.6%
*-commutative74.6%
+-commutative74.6%
+-commutative74.6%
associate-+l+74.6%
Applied egg-rr74.6%
*-commutative74.6%
times-frac99.8%
+-commutative99.8%
Simplified99.8%
*-commutative99.8%
frac-times74.6%
*-commutative74.6%
clear-num74.6%
frac-times73.1%
metadata-eval73.1%
*-commutative73.1%
times-frac96.0%
+-commutative96.0%
Applied egg-rr96.0%
associate-/l/99.7%
associate-/r*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 86.3%
if -7e9 < x Initial program 73.8%
associate-+r+73.8%
*-un-lft-identity73.8%
associate-*l*73.8%
times-frac79.2%
+-commutative79.2%
*-commutative79.2%
+-commutative79.2%
+-commutative79.2%
associate-+l+79.2%
Applied egg-rr79.2%
*-commutative79.2%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 84.3%
+-commutative84.3%
Simplified84.3%
associate-*r*84.3%
clear-num84.2%
un-div-inv84.3%
frac-times84.3%
*-un-lft-identity84.3%
+-commutative84.3%
Applied egg-rr84.3%
Final simplification84.8%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (* (/ 1.0 x) (/ y x)) (if (<= x -1.8e-154) (* y (/ 1.0 (+ y x))) (/ x y))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.8e-154) {
tmp = y * (1.0 / (y + x));
} else {
tmp = x / y;
}
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 = (1.0d0 / x) * (y / x)
else if (x <= (-1.8d-154)) then
tmp = y * (1.0d0 / (y + x))
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.8e-154) {
tmp = y * (1.0 / (y + x));
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (1.0 / x) * (y / x) elif x <= -1.8e-154: tmp = y * (1.0 / (y + x)) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(1.0 / x) * Float64(y / x)); elseif (x <= -1.8e-154) tmp = Float64(y * Float64(1.0 / Float64(y + x))); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (1.0 / x) * (y / x); elseif (x <= -1.8e-154) tmp = y * (1.0 / (y + x)); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(1.0 / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.8e-154], N[(y * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-154}:\\
\;\;\;\;y \cdot \frac{1}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1Initial program 67.5%
associate-+r+67.5%
*-un-lft-identity67.5%
associate-*l*67.5%
times-frac75.9%
+-commutative75.9%
*-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-+l+75.9%
Applied egg-rr75.9%
*-commutative75.9%
times-frac99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 81.5%
Taylor expanded in y around 0 81.1%
if -1 < x < -1.8000000000000001e-154Initial program 76.4%
associate-+r+76.4%
*-un-lft-identity76.4%
associate-*l*76.4%
times-frac81.0%
+-commutative81.0%
*-commutative81.0%
+-commutative81.0%
+-commutative81.0%
associate-+l+81.0%
Applied egg-rr81.0%
*-commutative81.0%
times-frac99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in y around 0 44.7%
if -1.8000000000000001e-154 < x Initial program 72.8%
associate-/r*78.2%
+-commutative78.2%
+-commutative78.2%
associate-/l*88.3%
+-commutative88.3%
associate-*r/85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
associate-+l+85.3%
Simplified85.3%
Taylor expanded in x around 0 63.5%
Taylor expanded in y around 0 41.1%
Final simplification50.7%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (* (/ 1.0 x) (/ y x)) (if (<= x -1.8e-154) (* y (/ 1.0 (+ y x))) (/ x (* y (+ 1.0 y))))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.8e-154) {
tmp = y * (1.0 / (y + x));
} else {
tmp = x / (y * (1.0 + y));
}
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 = (1.0d0 / x) * (y / x)
else if (x <= (-1.8d-154)) then
tmp = y * (1.0d0 / (y + x))
else
tmp = x / (y * (1.0d0 + y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.8e-154) {
tmp = y * (1.0 / (y + x));
} else {
tmp = x / (y * (1.0 + y));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (1.0 / x) * (y / x) elif x <= -1.8e-154: tmp = y * (1.0 / (y + x)) else: tmp = x / (y * (1.0 + y)) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(1.0 / x) * Float64(y / x)); elseif (x <= -1.8e-154) tmp = Float64(y * Float64(1.0 / Float64(y + x))); else tmp = Float64(x / Float64(y * Float64(1.0 + y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (1.0 / x) * (y / x); elseif (x <= -1.8e-154) tmp = y * (1.0 / (y + x)); else tmp = x / (y * (1.0 + y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(1.0 / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.8e-154], N[(y * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-154}:\\
\;\;\;\;y \cdot \frac{1}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\end{array}
\end{array}
if x < -1Initial program 67.5%
associate-+r+67.5%
*-un-lft-identity67.5%
associate-*l*67.5%
times-frac75.9%
+-commutative75.9%
*-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-+l+75.9%
Applied egg-rr75.9%
*-commutative75.9%
times-frac99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 81.5%
Taylor expanded in y around 0 81.1%
if -1 < x < -1.8000000000000001e-154Initial program 76.4%
associate-+r+76.4%
*-un-lft-identity76.4%
associate-*l*76.4%
times-frac81.0%
+-commutative81.0%
*-commutative81.0%
+-commutative81.0%
+-commutative81.0%
associate-+l+81.0%
Applied egg-rr81.0%
*-commutative81.0%
times-frac99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in x around 0 96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in y around 0 44.7%
if -1.8000000000000001e-154 < x Initial program 72.8%
associate-/r*78.2%
+-commutative78.2%
+-commutative78.2%
associate-/l*88.3%
+-commutative88.3%
associate-*r/85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
associate-+l+85.3%
Simplified85.3%
Taylor expanded in x around 0 63.5%
Final simplification65.2%
(FPCore (x y) :precision binary64 (if (<= y 1.75e-56) (* (/ 1.0 (+ y x)) (/ y (+ 1.0 x))) (/ (/ x y) (+ y (+ 1.0 x)))))
double code(double x, double y) {
double tmp;
if (y <= 1.75e-56) {
tmp = (1.0 / (y + x)) * (y / (1.0 + x));
} else {
tmp = (x / y) / (y + (1.0 + x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.75d-56) then
tmp = (1.0d0 / (y + x)) * (y / (1.0d0 + x))
else
tmp = (x / y) / (y + (1.0d0 + x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.75e-56) {
tmp = (1.0 / (y + x)) * (y / (1.0 + x));
} else {
tmp = (x / y) / (y + (1.0 + x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.75e-56: tmp = (1.0 / (y + x)) * (y / (1.0 + x)) else: tmp = (x / y) / (y + (1.0 + x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.75e-56) tmp = Float64(Float64(1.0 / Float64(y + x)) * Float64(y / Float64(1.0 + x))); else tmp = Float64(Float64(x / y) / Float64(y + Float64(1.0 + x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.75e-56) tmp = (1.0 / (y + x)) * (y / (1.0 + x)); else tmp = (x / y) / (y + (1.0 + x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.75e-56], N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.75 \cdot 10^{-56}:\\
\;\;\;\;\frac{1}{y + x} \cdot \frac{y}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + \left(1 + x\right)}\\
\end{array}
\end{array}
if y < 1.7499999999999999e-56Initial program 72.2%
associate-+r+72.2%
*-un-lft-identity72.2%
associate-*l*72.2%
times-frac76.8%
+-commutative76.8%
*-commutative76.8%
+-commutative76.8%
+-commutative76.8%
associate-+l+76.8%
Applied egg-rr76.8%
*-commutative76.8%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 57.0%
+-commutative57.0%
Simplified57.0%
if 1.7499999999999999e-56 < y Initial program 71.6%
associate-/r*81.6%
+-commutative81.6%
+-commutative81.6%
associate-/l*89.8%
+-commutative89.8%
associate-*r/86.2%
+-commutative86.2%
+-commutative86.2%
+-commutative86.2%
associate-+l+86.2%
Simplified86.2%
Taylor expanded in y around inf 67.8%
add067.8%
associate-/l/67.8%
un-div-inv67.8%
associate-+r+67.8%
+-commutative67.8%
associate-+r+67.8%
+-commutative67.8%
Applied egg-rr67.8%
associate-/l/70.1%
add070.1%
+-commutative70.1%
Simplified70.1%
Final simplification60.9%
(FPCore (x y) :precision binary64 (if (<= y 3.1e-56) (/ y (* x (+ 1.0 x))) (/ (/ x y) (+ y (+ 1.0 x)))))
double code(double x, double y) {
double tmp;
if (y <= 3.1e-56) {
tmp = y / (x * (1.0 + x));
} else {
tmp = (x / y) / (y + (1.0 + x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 3.1d-56) then
tmp = y / (x * (1.0d0 + x))
else
tmp = (x / y) / (y + (1.0d0 + x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 3.1e-56) {
tmp = y / (x * (1.0 + x));
} else {
tmp = (x / y) / (y + (1.0 + x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 3.1e-56: tmp = y / (x * (1.0 + x)) else: tmp = (x / y) / (y + (1.0 + x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 3.1e-56) tmp = Float64(y / Float64(x * Float64(1.0 + x))); else tmp = Float64(Float64(x / y) / Float64(y + Float64(1.0 + x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 3.1e-56) tmp = y / (x * (1.0 + x)); else tmp = (x / y) / (y + (1.0 + x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 3.1e-56], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.1 \cdot 10^{-56}:\\
\;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + \left(1 + x\right)}\\
\end{array}
\end{array}
if y < 3.09999999999999987e-56Initial program 72.2%
associate-/r*76.5%
+-commutative76.5%
+-commutative76.5%
associate-/l*88.6%
+-commutative88.6%
associate-*r/85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
associate-+l+85.3%
Simplified85.3%
Taylor expanded in y around 0 55.2%
+-commutative55.2%
Simplified55.2%
if 3.09999999999999987e-56 < y Initial program 71.6%
associate-/r*81.6%
+-commutative81.6%
+-commutative81.6%
associate-/l*89.8%
+-commutative89.8%
associate-*r/86.2%
+-commutative86.2%
+-commutative86.2%
+-commutative86.2%
associate-+l+86.2%
Simplified86.2%
Taylor expanded in y around inf 67.8%
add067.8%
associate-/l/67.8%
un-div-inv67.8%
associate-+r+67.8%
+-commutative67.8%
associate-+r+67.8%
+-commutative67.8%
Applied egg-rr67.8%
associate-/l/70.1%
add070.1%
+-commutative70.1%
Simplified70.1%
Final simplification59.7%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (* (/ 1.0 x) (/ y x)) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else {
tmp = x / y;
}
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 = (1.0d0 / x) * (y / x)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (1.0 / x) * (y / x) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(1.0 / x) * Float64(y / x)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (1.0 / x) * (y / x); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(1.0 / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1Initial program 67.5%
associate-+r+67.5%
*-un-lft-identity67.5%
associate-*l*67.5%
times-frac75.9%
+-commutative75.9%
*-commutative75.9%
+-commutative75.9%
+-commutative75.9%
associate-+l+75.9%
Applied egg-rr75.9%
*-commutative75.9%
times-frac99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 81.5%
Taylor expanded in y around 0 81.1%
if -1 < x Initial program 73.4%
associate-/r*78.7%
+-commutative78.7%
+-commutative78.7%
associate-/l*90.1%
+-commutative90.1%
associate-*r/87.6%
+-commutative87.6%
+-commutative87.6%
+-commutative87.6%
associate-+l+87.6%
Simplified87.6%
Taylor expanded in x around 0 62.1%
Taylor expanded in y around 0 36.8%
Final simplification47.0%
(FPCore (x y) :precision binary64 (if (<= y 2.5e-56) (/ y (* x (+ 1.0 x))) (/ x (* y (+ 1.0 y)))))
double code(double x, double y) {
double tmp;
if (y <= 2.5e-56) {
tmp = y / (x * (1.0 + x));
} else {
tmp = x / (y * (1.0 + y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.5d-56) then
tmp = y / (x * (1.0d0 + x))
else
tmp = x / (y * (1.0d0 + y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.5e-56) {
tmp = y / (x * (1.0 + x));
} else {
tmp = x / (y * (1.0 + y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.5e-56: tmp = y / (x * (1.0 + x)) else: tmp = x / (y * (1.0 + y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.5e-56) tmp = Float64(y / Float64(x * Float64(1.0 + x))); else tmp = Float64(x / Float64(y * Float64(1.0 + y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.5e-56) tmp = y / (x * (1.0 + x)); else tmp = x / (y * (1.0 + y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.5e-56], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.5 \cdot 10^{-56}:\\
\;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\end{array}
\end{array}
if y < 2.49999999999999999e-56Initial program 72.2%
associate-/r*76.5%
+-commutative76.5%
+-commutative76.5%
associate-/l*88.6%
+-commutative88.6%
associate-*r/85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
associate-+l+85.3%
Simplified85.3%
Taylor expanded in y around 0 55.2%
+-commutative55.2%
Simplified55.2%
if 2.49999999999999999e-56 < y Initial program 71.6%
associate-/r*81.6%
+-commutative81.6%
+-commutative81.6%
associate-/l*89.8%
+-commutative89.8%
associate-*r/86.2%
+-commutative86.2%
+-commutative86.2%
+-commutative86.2%
associate-+l+86.2%
Simplified86.2%
Taylor expanded in x around 0 66.2%
Final simplification58.5%
(FPCore (x y) :precision binary64 (if (<= y 3.45e-56) (/ y (* x (+ 1.0 x))) (/ (/ x y) (+ 1.0 y))))
double code(double x, double y) {
double tmp;
if (y <= 3.45e-56) {
tmp = y / (x * (1.0 + x));
} else {
tmp = (x / y) / (1.0 + y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 3.45d-56) then
tmp = y / (x * (1.0d0 + x))
else
tmp = (x / y) / (1.0d0 + y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 3.45e-56) {
tmp = y / (x * (1.0 + x));
} else {
tmp = (x / y) / (1.0 + y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 3.45e-56: tmp = y / (x * (1.0 + x)) else: tmp = (x / y) / (1.0 + y) return tmp
function code(x, y) tmp = 0.0 if (y <= 3.45e-56) tmp = Float64(y / Float64(x * Float64(1.0 + x))); else tmp = Float64(Float64(x / y) / Float64(1.0 + y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 3.45e-56) tmp = y / (x * (1.0 + x)); else tmp = (x / y) / (1.0 + y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 3.45e-56], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.45 \cdot 10^{-56}:\\
\;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{1 + y}\\
\end{array}
\end{array}
if y < 3.4499999999999998e-56Initial program 72.2%
associate-/r*76.5%
+-commutative76.5%
+-commutative76.5%
associate-/l*88.6%
+-commutative88.6%
associate-*r/85.3%
+-commutative85.3%
+-commutative85.3%
+-commutative85.3%
associate-+l+85.3%
Simplified85.3%
Taylor expanded in y around 0 55.2%
+-commutative55.2%
Simplified55.2%
if 3.4499999999999998e-56 < y Initial program 71.6%
associate-/r*81.6%
+-commutative81.6%
+-commutative81.6%
associate-/l*89.8%
+-commutative89.8%
associate-*r/86.2%
+-commutative86.2%
+-commutative86.2%
+-commutative86.2%
associate-+l+86.2%
Simplified86.2%
Taylor expanded in x around 0 66.2%
associate-/r*69.6%
+-commutative69.6%
Simplified69.6%
Final simplification59.5%
(FPCore (x y) :precision binary64 (/ x (+ y x)))
double code(double x, double y) {
return x / (y + x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / (y + x)
end function
public static double code(double x, double y) {
return x / (y + x);
}
def code(x, y): return x / (y + x)
function code(x, y) return Float64(x / Float64(y + x)) end
function tmp = code(x, y) tmp = x / (y + x); end
code[x_, y_] := N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y + x}
\end{array}
Initial program 72.0%
associate-+r+72.0%
*-un-lft-identity72.0%
associate-*l*72.0%
times-frac78.2%
+-commutative78.2%
*-commutative78.2%
+-commutative78.2%
+-commutative78.2%
associate-+l+78.2%
Applied egg-rr78.2%
*-commutative78.2%
times-frac99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 52.5%
+-commutative52.5%
Simplified52.5%
Taylor expanded in y around 0 29.2%
add029.2%
associate-*l/29.3%
*-un-lft-identity29.3%
Applied egg-rr29.3%
add029.3%
Simplified29.3%
Final simplification29.3%
(FPCore (x y) :precision binary64 (/ 1.0 y))
double code(double x, double y) {
return 1.0 / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / y
end function
public static double code(double x, double y) {
return 1.0 / y;
}
def code(x, y): return 1.0 / y
function code(x, y) return Float64(1.0 / y) end
function tmp = code(x, y) tmp = 1.0 / y; end
code[x_, y_] := N[(1.0 / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y}
\end{array}
Initial program 72.0%
associate-/r*78.1%
+-commutative78.1%
+-commutative78.1%
associate-/l*89.0%
+-commutative89.0%
associate-*r/85.6%
+-commutative85.6%
+-commutative85.6%
+-commutative85.6%
associate-+l+85.6%
Simplified85.6%
Taylor expanded in y around inf 52.1%
Taylor expanded in x around inf 4.0%
Final simplification4.0%
(FPCore (x y) :precision binary64 (/ x y))
double code(double x, double y) {
return x / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / y
end function
public static double code(double x, double y) {
return x / y;
}
def code(x, y): return x / y
function code(x, y) return Float64(x / y) end
function tmp = code(x, y) tmp = x / y; end
code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 72.0%
associate-/r*78.1%
+-commutative78.1%
+-commutative78.1%
associate-/l*89.0%
+-commutative89.0%
associate-*r/85.6%
+-commutative85.6%
+-commutative85.6%
+-commutative85.6%
associate-+l+85.6%
Simplified85.6%
Taylor expanded in x around 0 51.5%
Taylor expanded in y around 0 28.9%
Final simplification28.9%
(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 2024046
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:alt
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))