
(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 18 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 x))) (+ x (+ y 1.0))) (+ y x)))
double code(double x, double y) {
return ((y * (x / (y + x))) / (x + (y + 1.0))) / (y + x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y * (x / (y + x))) / (x + (y + 1.0d0))) / (y + x)
end function
public static double code(double x, double y) {
return ((y * (x / (y + x))) / (x + (y + 1.0))) / (y + x);
}
def code(x, y): return ((y * (x / (y + x))) / (x + (y + 1.0))) / (y + x)
function code(x, y) return Float64(Float64(Float64(y * Float64(x / Float64(y + x))) / Float64(x + Float64(y + 1.0))) / Float64(y + x)) end
function tmp = code(x, y) tmp = ((y * (x / (y + x))) / (x + (y + 1.0))) / (y + x); end
code[x_, y_] := N[(N[(N[(y * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y \cdot \frac{x}{y + x}}{x + \left(y + 1\right)}}{y + x}
\end{array}
Initial program 71.2%
associate-/l*83.9%
+-commutative83.9%
+-commutative83.9%
+-commutative83.9%
*-commutative83.9%
distribute-rgt1-in64.1%
+-commutative64.1%
+-commutative64.1%
cube-unmult64.1%
+-commutative64.1%
Simplified64.1%
associate-*r/55.8%
cube-mult55.8%
distribute-rgt1-in71.2%
associate-/r*75.2%
associate-+r+75.2%
pow275.2%
Applied egg-rr75.2%
associate-/l*83.7%
+-commutative83.7%
unpow283.7%
times-frac99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
+-commutative99.6%
Applied egg-rr99.6%
*-un-lft-identity99.6%
+-commutative99.6%
times-frac99.7%
+-commutative99.7%
clear-num99.8%
Applied egg-rr99.8%
associate-*r/99.9%
*-commutative99.9%
associate-*l/99.9%
Simplified99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= x -5.6e+171)
(/ (/ y t_0) (+ x (* y 2.0)))
(if (<= x -4e-13)
(/ y (* (+ y x) t_0))
(if (<= x -4e-148)
(* x (/ y (* (+ y 1.0) (* (+ y x) (+ y x)))))
(/ (/ x y) (+ y 1.0)))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -5.6e+171) {
tmp = (y / t_0) / (x + (y * 2.0));
} else if (x <= -4e-13) {
tmp = y / ((y + x) * t_0);
} else if (x <= -4e-148) {
tmp = x * (y / ((y + 1.0) * ((y + x) * (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) :: t_0
real(8) :: tmp
t_0 = x + (y + 1.0d0)
if (x <= (-5.6d+171)) then
tmp = (y / t_0) / (x + (y * 2.0d0))
else if (x <= (-4d-13)) then
tmp = y / ((y + x) * t_0)
else if (x <= (-4d-148)) then
tmp = x * (y / ((y + 1.0d0) * ((y + x) * (y + x))))
else
tmp = (x / y) / (y + 1.0d0)
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 <= -5.6e+171) {
tmp = (y / t_0) / (x + (y * 2.0));
} else if (x <= -4e-13) {
tmp = y / ((y + x) * t_0);
} else if (x <= -4e-148) {
tmp = x * (y / ((y + 1.0) * ((y + x) * (y + x))));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if x <= -5.6e+171: tmp = (y / t_0) / (x + (y * 2.0)) elif x <= -4e-13: tmp = y / ((y + x) * t_0) elif x <= -4e-148: tmp = x * (y / ((y + 1.0) * ((y + x) * (y + x)))) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (x <= -5.6e+171) tmp = Float64(Float64(y / t_0) / Float64(x + Float64(y * 2.0))); elseif (x <= -4e-13) tmp = Float64(y / Float64(Float64(y + x) * t_0)); elseif (x <= -4e-148) tmp = Float64(x * Float64(y / Float64(Float64(y + 1.0) * Float64(Float64(y + x) * Float64(y + x))))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (x <= -5.6e+171) tmp = (y / t_0) / (x + (y * 2.0)); elseif (x <= -4e-13) tmp = y / ((y + x) * t_0); elseif (x <= -4e-148) tmp = x * (y / ((y + 1.0) * ((y + x) * (y + x)))); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+171], N[(N[(y / t$95$0), $MachinePrecision] / N[(x + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-13], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-148], N[(x * N[(y / N[(N[(y + 1.0), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-148}:\\
\;\;\;\;x \cdot \frac{y}{\left(y + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -5.60000000000000009e171Initial program 63.1%
associate-/l*88.0%
+-commutative88.0%
+-commutative88.0%
+-commutative88.0%
*-commutative88.0%
distribute-rgt1-in0.0%
+-commutative0.0%
+-commutative0.0%
cube-unmult0.0%
+-commutative0.0%
Simplified0.0%
associate-*r/0.0%
cube-mult0.0%
distribute-rgt1-in63.1%
associate-/r*63.1%
associate-+r+63.1%
pow263.1%
Applied egg-rr63.1%
associate-/l*88.0%
+-commutative88.0%
unpow288.0%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.9%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 96.4%
*-commutative96.4%
Simplified96.4%
if -5.60000000000000009e171 < x < -4.0000000000000001e-13Initial program 67.4%
*-commutative67.4%
associate-*l*67.3%
times-frac95.1%
+-commutative95.1%
distribute-lft-in95.0%
*-rgt-identity95.0%
pow295.0%
Applied egg-rr95.0%
associate-*r/95.1%
+-commutative95.1%
+-commutative95.1%
+-commutative95.1%
Simplified95.1%
unpow295.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 85.3%
distribute-rgt1-in85.4%
+-commutative85.4%
associate-+r+85.4%
+-commutative85.4%
Applied egg-rr85.4%
if -4.0000000000000001e-13 < x < -3.99999999999999974e-148Initial program 87.3%
associate-/l*92.8%
associate-+l+92.8%
Simplified92.8%
Taylor expanded in x around 0 92.8%
+-commutative92.8%
Simplified92.8%
if -3.99999999999999974e-148 < x Initial program 70.8%
associate-/l*82.1%
+-commutative82.1%
+-commutative82.1%
+-commutative82.1%
*-commutative82.1%
distribute-rgt1-in70.9%
+-commutative70.9%
+-commutative70.9%
cube-unmult71.0%
+-commutative71.0%
Simplified71.0%
associate-*r/60.9%
cube-mult60.8%
distribute-rgt1-in70.8%
associate-/r*73.1%
associate-+r+73.1%
pow273.1%
Applied egg-rr73.1%
associate-/l*78.8%
+-commutative78.8%
unpow278.8%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 57.0%
associate-/r*58.9%
+-commutative58.9%
Simplified58.9%
Final simplification69.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= x -9e+170)
(/ (/ y t_0) (+ x (* y 2.0)))
(if (<= x -4e-13)
(/ y (* (+ y x) t_0))
(* (/ x (+ y x)) (/ (/ y (+ y 1.0)) (+ y x)))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -9e+170) {
tmp = (y / t_0) / (x + (y * 2.0));
} else if (x <= -4e-13) {
tmp = y / ((y + x) * t_0);
} else {
tmp = (x / (y + x)) * ((y / (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 <= (-9d+170)) then
tmp = (y / t_0) / (x + (y * 2.0d0))
else if (x <= (-4d-13)) then
tmp = y / ((y + x) * t_0)
else
tmp = (x / (y + x)) * ((y / (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 <= -9e+170) {
tmp = (y / t_0) / (x + (y * 2.0));
} else if (x <= -4e-13) {
tmp = y / ((y + x) * t_0);
} else {
tmp = (x / (y + x)) * ((y / (y + 1.0)) / (y + x));
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if x <= -9e+170: tmp = (y / t_0) / (x + (y * 2.0)) elif x <= -4e-13: tmp = y / ((y + x) * t_0) else: tmp = (x / (y + x)) * ((y / (y + 1.0)) / (y + x)) return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (x <= -9e+170) tmp = Float64(Float64(y / t_0) / Float64(x + Float64(y * 2.0))); elseif (x <= -4e-13) tmp = Float64(y / Float64(Float64(y + x) * t_0)); else tmp = Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / 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 <= -9e+170) tmp = (y / t_0) / (x + (y * 2.0)); elseif (x <= -4e-13) tmp = y / ((y + x) * t_0); else tmp = (x / (y + x)) * ((y / (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, -9e+170], N[(N[(y / t$95$0), $MachinePrecision] / N[(x + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-13], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -9 \cdot 10^{+170}:\\
\;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-13}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{\frac{y}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -9.00000000000000044e170Initial program 63.1%
associate-/l*88.0%
+-commutative88.0%
+-commutative88.0%
+-commutative88.0%
*-commutative88.0%
distribute-rgt1-in0.0%
+-commutative0.0%
+-commutative0.0%
cube-unmult0.0%
+-commutative0.0%
Simplified0.0%
associate-*r/0.0%
cube-mult0.0%
distribute-rgt1-in63.1%
associate-/r*63.1%
associate-+r+63.1%
pow263.1%
Applied egg-rr63.1%
associate-/l*88.0%
+-commutative88.0%
unpow288.0%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.9%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 96.4%
*-commutative96.4%
Simplified96.4%
if -9.00000000000000044e170 < x < -4.0000000000000001e-13Initial program 67.4%
*-commutative67.4%
associate-*l*67.3%
times-frac95.1%
+-commutative95.1%
distribute-lft-in95.0%
*-rgt-identity95.0%
pow295.0%
Applied egg-rr95.0%
associate-*r/95.1%
+-commutative95.1%
+-commutative95.1%
+-commutative95.1%
Simplified95.1%
unpow295.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 85.3%
distribute-rgt1-in85.4%
+-commutative85.4%
associate-+r+85.4%
+-commutative85.4%
Applied egg-rr85.4%
if -4.0000000000000001e-13 < x Initial program 73.1%
associate-/l*83.6%
+-commutative83.6%
+-commutative83.6%
+-commutative83.6%
*-commutative83.6%
distribute-rgt1-in71.3%
+-commutative71.3%
+-commutative71.3%
cube-unmult71.3%
+-commutative71.3%
Simplified71.3%
associate-*r/61.8%
cube-mult61.8%
distribute-rgt1-in73.1%
associate-/r*76.0%
associate-+r+76.0%
pow276.0%
Applied egg-rr76.0%
associate-/l*80.9%
+-commutative80.9%
unpow280.9%
times-frac99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 84.7%
+-commutative84.7%
Simplified84.7%
Final simplification85.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= x -2.8e+171)
(/ (/ y t_0) (+ x (* y 2.0)))
(if (<= x -2.7e-67) (/ y (* (+ y x) t_0)) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -2.8e+171) {
tmp = (y / t_0) / (x + (y * 2.0));
} else if (x <= -2.7e-67) {
tmp = y / ((y + x) * t_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) :: t_0
real(8) :: tmp
t_0 = x + (y + 1.0d0)
if (x <= (-2.8d+171)) then
tmp = (y / t_0) / (x + (y * 2.0d0))
else if (x <= (-2.7d-67)) then
tmp = y / ((y + x) * t_0)
else
tmp = (x / y) / (y + 1.0d0)
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.8e+171) {
tmp = (y / t_0) / (x + (y * 2.0));
} else if (x <= -2.7e-67) {
tmp = y / ((y + x) * t_0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if x <= -2.8e+171: tmp = (y / t_0) / (x + (y * 2.0)) elif x <= -2.7e-67: tmp = y / ((y + x) * t_0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (x <= -2.8e+171) tmp = Float64(Float64(y / t_0) / Float64(x + Float64(y * 2.0))); elseif (x <= -2.7e-67) tmp = Float64(y / Float64(Float64(y + x) * t_0)); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (x <= -2.8e+171) tmp = (y / t_0) / (x + (y * 2.0)); elseif (x <= -2.7e-67) tmp = y / ((y + x) * t_0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+171], N[(N[(y / t$95$0), $MachinePrecision] / N[(x + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.7e-67], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{t\_0}}{x + y \cdot 2}\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -2.80000000000000004e171Initial program 63.1%
associate-/l*88.0%
+-commutative88.0%
+-commutative88.0%
+-commutative88.0%
*-commutative88.0%
distribute-rgt1-in0.0%
+-commutative0.0%
+-commutative0.0%
cube-unmult0.0%
+-commutative0.0%
Simplified0.0%
associate-*r/0.0%
cube-mult0.0%
distribute-rgt1-in63.1%
associate-/r*63.1%
associate-+r+63.1%
pow263.1%
Applied egg-rr63.1%
associate-/l*88.0%
+-commutative88.0%
unpow288.0%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.9%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 96.4%
*-commutative96.4%
Simplified96.4%
if -2.80000000000000004e171 < x < -2.70000000000000016e-67Initial program 69.3%
*-commutative69.3%
associate-*l*69.3%
times-frac96.1%
+-commutative96.1%
distribute-lft-in96.0%
*-rgt-identity96.0%
pow296.0%
Applied egg-rr96.0%
associate-*r/96.1%
+-commutative96.1%
+-commutative96.1%
+-commutative96.1%
Simplified96.1%
unpow296.1%
Applied egg-rr96.1%
Taylor expanded in y around 0 84.4%
distribute-rgt1-in84.4%
+-commutative84.4%
associate-+r+84.4%
+-commutative84.4%
Applied egg-rr84.4%
if -2.70000000000000016e-67 < x Initial program 72.8%
associate-/l*83.7%
+-commutative83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
distribute-rgt1-in71.8%
+-commutative71.8%
+-commutative71.8%
cube-unmult71.9%
+-commutative71.9%
Simplified71.9%
associate-*r/62.1%
cube-mult62.1%
distribute-rgt1-in72.8%
associate-/r*74.9%
associate-+r+74.9%
pow274.9%
Applied egg-rr74.9%
associate-/l*80.1%
+-commutative80.1%
unpow280.1%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.2%
associate-/r*61.9%
+-commutative61.9%
Simplified61.9%
Final simplification69.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= x -1.65e+171)
(/ (/ y (+ y x)) t_0)
(if (<= x -1.45e-67) (/ y (* (+ y x) t_0)) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -1.65e+171) {
tmp = (y / (y + x)) / t_0;
} else if (x <= -1.45e-67) {
tmp = y / ((y + x) * t_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) :: t_0
real(8) :: tmp
t_0 = x + (y + 1.0d0)
if (x <= (-1.65d+171)) then
tmp = (y / (y + x)) / t_0
else if (x <= (-1.45d-67)) then
tmp = y / ((y + x) * t_0)
else
tmp = (x / y) / (y + 1.0d0)
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 <= -1.65e+171) {
tmp = (y / (y + x)) / t_0;
} else if (x <= -1.45e-67) {
tmp = y / ((y + x) * t_0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if x <= -1.65e+171: tmp = (y / (y + x)) / t_0 elif x <= -1.45e-67: tmp = y / ((y + x) * t_0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (x <= -1.65e+171) tmp = Float64(Float64(y / Float64(y + x)) / t_0); elseif (x <= -1.45e-67) tmp = Float64(y / Float64(Float64(y + x) * t_0)); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (x <= -1.65e+171) tmp = (y / (y + x)) / t_0; elseif (x <= -1.45e-67) tmp = y / ((y + x) * t_0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+171], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[x, -1.45e-67], N[(y / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{t\_0}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.64999999999999996e171Initial program 63.1%
Taylor expanded in x around inf 63.1%
associate-+r+63.1%
*-commutative63.1%
associate-*l*63.1%
+-commutative63.1%
times-frac88.0%
Applied egg-rr88.0%
*-rgt-identity88.0%
associate-*l/88.0%
*-inverses88.0%
associate-/r*96.2%
*-inverses96.2%
*-commutative96.2%
associate-*l/96.2%
*-inverses96.2%
associate-*l/96.2%
*-rgt-identity96.2%
*-lft-identity96.2%
Simplified96.2%
if -1.64999999999999996e171 < x < -1.45000000000000002e-67Initial program 69.3%
*-commutative69.3%
associate-*l*69.3%
times-frac96.1%
+-commutative96.1%
distribute-lft-in96.0%
*-rgt-identity96.0%
pow296.0%
Applied egg-rr96.0%
associate-*r/96.1%
+-commutative96.1%
+-commutative96.1%
+-commutative96.1%
Simplified96.1%
unpow296.1%
Applied egg-rr96.1%
Taylor expanded in y around 0 84.4%
distribute-rgt1-in84.4%
+-commutative84.4%
associate-+r+84.4%
+-commutative84.4%
Applied egg-rr84.4%
if -1.45000000000000002e-67 < x Initial program 72.8%
associate-/l*83.7%
+-commutative83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
distribute-rgt1-in71.8%
+-commutative71.8%
+-commutative71.8%
cube-unmult71.9%
+-commutative71.9%
Simplified71.9%
associate-*r/62.1%
cube-mult62.1%
distribute-rgt1-in72.8%
associate-/r*74.9%
associate-+r+74.9%
pow274.9%
Applied egg-rr74.9%
associate-/l*80.1%
+-commutative80.1%
unpow280.1%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.2%
associate-/r*61.9%
+-commutative61.9%
Simplified61.9%
Final simplification69.5%
(FPCore (x y)
:precision binary64
(if (<= x -1.35e+171)
(/ (/ y (+ y x)) (+ x 1.0))
(if (<= x -7.8e-67)
(/ y (* (+ y x) (+ x (+ y 1.0))))
(/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -1.35e+171) {
tmp = (y / (y + x)) / (x + 1.0);
} else if (x <= -7.8e-67) {
tmp = y / ((y + x) * (x + (y + 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 <= (-1.35d+171)) then
tmp = (y / (y + x)) / (x + 1.0d0)
else if (x <= (-7.8d-67)) then
tmp = y / ((y + x) * (x + (y + 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 <= -1.35e+171) {
tmp = (y / (y + x)) / (x + 1.0);
} else if (x <= -7.8e-67) {
tmp = y / ((y + x) * (x + (y + 1.0)));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.35e+171: tmp = (y / (y + x)) / (x + 1.0) elif x <= -7.8e-67: tmp = y / ((y + x) * (x + (y + 1.0))) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.35e+171) tmp = Float64(Float64(y / Float64(y + x)) / Float64(x + 1.0)); elseif (x <= -7.8e-67) tmp = Float64(y / Float64(Float64(y + x) * Float64(x + Float64(y + 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 <= -1.35e+171) tmp = (y / (y + x)) / (x + 1.0); elseif (x <= -7.8e-67) tmp = y / ((y + x) * (x + (y + 1.0))); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.35e+171], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.8e-67], N[(y / N[(N[(y + x), $MachinePrecision] * N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+171}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(x + \left(y + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.3499999999999999e171Initial program 63.1%
Taylor expanded in x around inf 63.1%
associate-+r+63.1%
*-commutative63.1%
associate-*l*63.1%
+-commutative63.1%
times-frac88.0%
Applied egg-rr88.0%
*-rgt-identity88.0%
associate-*l/88.0%
*-inverses88.0%
associate-/r*96.2%
*-inverses96.2%
*-commutative96.2%
associate-*l/96.2%
*-inverses96.2%
associate-*l/96.2%
*-rgt-identity96.2%
*-lft-identity96.2%
Simplified96.2%
Taylor expanded in y around 0 96.1%
+-commutative96.1%
Simplified96.1%
if -1.3499999999999999e171 < x < -7.7999999999999997e-67Initial program 69.3%
*-commutative69.3%
associate-*l*69.3%
times-frac96.1%
+-commutative96.1%
distribute-lft-in96.0%
*-rgt-identity96.0%
pow296.0%
Applied egg-rr96.0%
associate-*r/96.1%
+-commutative96.1%
+-commutative96.1%
+-commutative96.1%
Simplified96.1%
unpow296.1%
Applied egg-rr96.1%
Taylor expanded in y around 0 84.4%
distribute-rgt1-in84.4%
+-commutative84.4%
associate-+r+84.4%
+-commutative84.4%
Applied egg-rr84.4%
if -7.7999999999999997e-67 < x Initial program 72.8%
associate-/l*83.7%
+-commutative83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
distribute-rgt1-in71.8%
+-commutative71.8%
+-commutative71.8%
cube-unmult71.9%
+-commutative71.9%
Simplified71.9%
associate-*r/62.1%
cube-mult62.1%
distribute-rgt1-in72.8%
associate-/r*74.9%
associate-+r+74.9%
pow274.9%
Applied egg-rr74.9%
associate-/l*80.1%
+-commutative80.1%
unpow280.1%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.2%
associate-/r*61.9%
+-commutative61.9%
Simplified61.9%
Final simplification69.5%
(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 71.2%
associate-/l*83.9%
+-commutative83.9%
+-commutative83.9%
+-commutative83.9%
*-commutative83.9%
distribute-rgt1-in64.1%
+-commutative64.1%
+-commutative64.1%
cube-unmult64.1%
+-commutative64.1%
Simplified64.1%
associate-*r/55.8%
cube-mult55.8%
distribute-rgt1-in71.2%
associate-/r*75.2%
associate-+r+75.2%
pow275.2%
Applied egg-rr75.2%
associate-/l*83.7%
+-commutative83.7%
unpow283.7%
times-frac99.8%
Applied egg-rr99.8%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (/ y (* x x)) (if (<= x -2.25e-91) (/ y x) (/ 1.0 (/ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = y / (x * x);
} else if (x <= -2.25e-91) {
tmp = y / x;
} else {
tmp = 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.0d0)) then
tmp = y / (x * x)
else if (x <= (-2.25d-91)) then
tmp = y / x
else
tmp = 1.0d0 / (y / x)
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 <= -2.25e-91) {
tmp = y / x;
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = y / (x * x) elif x <= -2.25e-91: tmp = y / x else: tmp = 1.0 / (y / x) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(y / Float64(x * x)); elseif (x <= -2.25e-91) tmp = Float64(y / x); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = y / (x * x); elseif (x <= -2.25e-91) tmp = y / x; else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.25e-91], N[(y / x), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -2.25 \cdot 10^{-91}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if x < -1Initial program 64.8%
associate-/l*85.3%
associate-+l+85.3%
Simplified85.3%
Taylor expanded in y around 0 70.2%
+-commutative70.2%
Simplified70.2%
Taylor expanded in x around inf 68.9%
if -1 < x < -2.24999999999999988e-91Initial program 78.2%
associate-/l*85.4%
+-commutative85.4%
+-commutative85.4%
+-commutative85.4%
*-commutative85.4%
distribute-rgt1-in74.9%
+-commutative74.9%
+-commutative74.9%
cube-unmult74.9%
+-commutative74.9%
Simplified74.9%
associate-*r/67.7%
cube-mult67.7%
distribute-rgt1-in78.2%
associate-/r*92.3%
associate-+r+92.3%
pow292.3%
Applied egg-rr92.3%
associate-/l*92.3%
+-commutative92.3%
unpow292.3%
times-frac99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 92.6%
+-commutative92.6%
Simplified92.6%
Taylor expanded in y around 0 41.4%
if -2.24999999999999988e-91 < x Initial program 72.6%
associate-/l*83.2%
associate-+l+83.2%
Simplified83.2%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Taylor expanded in y around 0 36.0%
clear-num36.1%
inv-pow36.1%
Applied egg-rr36.1%
unpow-136.1%
Simplified36.1%
(FPCore (x y) :precision binary64 (if (<= x -8.8e-67) (/ (/ y (+ y x)) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -8.8e-67) {
tmp = (y / (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 <= (-8.8d-67)) then
tmp = (y / (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 <= -8.8e-67) {
tmp = (y / (y + x)) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -8.8e-67: tmp = (y / (y + x)) / (x + 1.0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -8.8e-67) tmp = Float64(Float64(y / Float64(y + 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 <= -8.8e-67) tmp = (y / (y + x)) / (x + 1.0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -8.8e-67], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -8.8000000000000004e-67Initial program 67.2%
Taylor expanded in x around inf 65.7%
associate-+r+65.7%
*-commutative65.7%
associate-*l*65.7%
+-commutative65.7%
times-frac75.3%
Applied egg-rr75.3%
*-rgt-identity75.3%
associate-*l/75.3%
*-inverses75.3%
associate-/r*70.5%
*-inverses70.5%
*-commutative70.5%
associate-*l/70.5%
*-inverses70.5%
associate-*l/70.5%
*-rgt-identity70.5%
*-lft-identity70.5%
Simplified70.5%
Taylor expanded in y around 0 69.6%
+-commutative69.6%
Simplified69.6%
if -8.8000000000000004e-67 < x Initial program 72.8%
associate-/l*83.7%
+-commutative83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
distribute-rgt1-in71.8%
+-commutative71.8%
+-commutative71.8%
cube-unmult71.9%
+-commutative71.9%
Simplified71.9%
associate-*r/62.1%
cube-mult62.1%
distribute-rgt1-in72.8%
associate-/r*74.9%
associate-+r+74.9%
pow274.9%
Applied egg-rr74.9%
associate-/l*80.1%
+-commutative80.1%
unpow280.1%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.2%
associate-/r*61.9%
+-commutative61.9%
Simplified61.9%
(FPCore (x y) :precision binary64 (if (<= x -8.8e-67) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -8.8e-67) {
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 <= (-8.8d-67)) 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 <= -8.8e-67) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -8.8e-67: tmp = (y / x) / (x + 1.0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -8.8e-67) tmp = Float64(Float64(y / 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 <= -8.8e-67) tmp = (y / x) / (x + 1.0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -8.8e-67], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -8.8000000000000004e-67Initial program 67.2%
associate-/l*84.4%
+-commutative84.4%
+-commutative84.4%
+-commutative84.4%
*-commutative84.4%
distribute-rgt1-in44.6%
+-commutative44.6%
+-commutative44.6%
cube-unmult44.7%
+-commutative44.7%
Simplified44.7%
associate-*r/40.1%
cube-mult40.1%
distribute-rgt1-in67.2%
associate-/r*76.0%
associate-+r+76.0%
pow276.0%
Applied egg-rr76.0%
associate-/l*92.7%
+-commutative92.7%
unpow292.7%
times-frac99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times99.9%
*-un-lft-identity99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 67.9%
associate-/r*69.2%
+-commutative69.2%
Simplified69.2%
if -8.8000000000000004e-67 < x Initial program 72.8%
associate-/l*83.7%
+-commutative83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
distribute-rgt1-in71.8%
+-commutative71.8%
+-commutative71.8%
cube-unmult71.9%
+-commutative71.9%
Simplified71.9%
associate-*r/62.1%
cube-mult62.1%
distribute-rgt1-in72.8%
associate-/r*74.9%
associate-+r+74.9%
pow274.9%
Applied egg-rr74.9%
associate-/l*80.1%
+-commutative80.1%
unpow280.1%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.2%
associate-/r*61.9%
+-commutative61.9%
Simplified61.9%
(FPCore (x y) :precision binary64 (if (<= x -6e-67) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -6e-67) {
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 <= (-6d-67)) 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 <= -6e-67) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -6e-67: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -6e-67) 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 <= -6e-67) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -6e-67], 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 -6 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -6.00000000000000065e-67Initial program 67.2%
associate-/l*84.4%
associate-+l+84.4%
Simplified84.4%
Taylor expanded in y around 0 67.9%
+-commutative67.9%
Simplified67.9%
if -6.00000000000000065e-67 < x Initial program 72.8%
associate-/l*83.7%
+-commutative83.7%
+-commutative83.7%
+-commutative83.7%
*-commutative83.7%
distribute-rgt1-in71.8%
+-commutative71.8%
+-commutative71.8%
cube-unmult71.9%
+-commutative71.9%
Simplified71.9%
associate-*r/62.1%
cube-mult62.1%
distribute-rgt1-in72.8%
associate-/r*74.9%
associate-+r+74.9%
pow274.9%
Applied egg-rr74.9%
associate-/l*80.1%
+-commutative80.1%
unpow280.1%
times-frac99.9%
Applied egg-rr99.9%
clear-num99.7%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 60.2%
associate-/r*61.9%
+-commutative61.9%
Simplified61.9%
(FPCore (x y) :precision binary64 (if (<= x -8.8e-67) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -8.8e-67) {
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 <= (-8.8d-67)) 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 <= -8.8e-67) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -8.8e-67: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -8.8e-67) 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 <= -8.8e-67) tmp = y / (x * (x + 1.0)); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -8.8e-67], 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 -8.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -8.8000000000000004e-67Initial program 67.2%
associate-/l*84.4%
associate-+l+84.4%
Simplified84.4%
Taylor expanded in y around 0 67.9%
+-commutative67.9%
Simplified67.9%
if -8.8000000000000004e-67 < x Initial program 72.8%
associate-/l*83.7%
associate-+l+83.7%
Simplified83.7%
Taylor expanded in x around 0 60.2%
+-commutative60.2%
Simplified60.2%
(FPCore (x y) :precision binary64 (if (<= x -23000.0) (/ y (* x x)) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -23000.0) {
tmp = y / (x * 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 <= (-23000.0d0)) then
tmp = y / (x * 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 <= -23000.0) {
tmp = y / (x * x);
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -23000.0: tmp = y / (x * x) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -23000.0) tmp = Float64(y / Float64(x * x)); 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 <= -23000.0) tmp = y / (x * x); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -23000.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -23000:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -23000Initial program 63.6%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in y around 0 72.6%
+-commutative72.6%
Simplified72.6%
Taylor expanded in x around inf 71.3%
if -23000 < x Initial program 73.4%
associate-/l*83.6%
associate-+l+83.6%
Simplified83.6%
Taylor expanded in x around 0 59.5%
+-commutative59.5%
Simplified59.5%
(FPCore (x y) :precision binary64 (if (<= x -2.15e-94) (/ y x) (/ 1.0 (/ y x))))
double code(double x, double y) {
double tmp;
if (x <= -2.15e-94) {
tmp = y / x;
} else {
tmp = 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 <= (-2.15d-94)) then
tmp = y / x
else
tmp = 1.0d0 / (y / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2.15e-94) {
tmp = y / x;
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.15e-94: tmp = y / x else: tmp = 1.0 / (y / x) return tmp
function code(x, y) tmp = 0.0 if (x <= -2.15e-94) tmp = Float64(y / x); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.15e-94) tmp = y / x; else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.15e-94], N[(y / x), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.15 \cdot 10^{-94}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if x < -2.1499999999999999e-94Initial program 68.1%
associate-/l*85.4%
+-commutative85.4%
+-commutative85.4%
+-commutative85.4%
*-commutative85.4%
distribute-rgt1-in48.2%
+-commutative48.2%
+-commutative48.2%
cube-unmult48.2%
+-commutative48.2%
Simplified48.2%
associate-*r/42.7%
cube-mult42.7%
distribute-rgt1-in68.1%
associate-/r*76.3%
associate-+r+76.3%
pow276.3%
Applied egg-rr76.3%
associate-/l*91.9%
+-commutative91.9%
unpow291.9%
times-frac99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 68.0%
+-commutative68.0%
Simplified68.0%
Taylor expanded in y around 0 34.3%
if -2.1499999999999999e-94 < x Initial program 72.6%
associate-/l*83.2%
associate-+l+83.2%
Simplified83.2%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Taylor expanded in y around 0 36.0%
clear-num36.1%
inv-pow36.1%
Applied egg-rr36.1%
unpow-136.1%
Simplified36.1%
(FPCore (x y) :precision binary64 (if (<= x -4.9e-95) (/ y x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -4.9e-95) {
tmp = 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 <= (-4.9d-95)) then
tmp = y / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -4.9e-95) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.9e-95: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -4.9e-95) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -4.9e-95) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.9e-95], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{-95}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -4.9e-95Initial program 68.1%
associate-/l*85.4%
+-commutative85.4%
+-commutative85.4%
+-commutative85.4%
*-commutative85.4%
distribute-rgt1-in48.2%
+-commutative48.2%
+-commutative48.2%
cube-unmult48.2%
+-commutative48.2%
Simplified48.2%
associate-*r/42.7%
cube-mult42.7%
distribute-rgt1-in68.1%
associate-/r*76.3%
associate-+r+76.3%
pow276.3%
Applied egg-rr76.3%
associate-/l*91.9%
+-commutative91.9%
unpow291.9%
times-frac99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 68.0%
+-commutative68.0%
Simplified68.0%
Taylor expanded in y around 0 34.3%
if -4.9e-95 < x Initial program 72.6%
associate-/l*83.2%
associate-+l+83.2%
Simplified83.2%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Taylor expanded in y around 0 36.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 71.2%
associate-/l*83.9%
associate-+l+83.9%
Simplified83.9%
Taylor expanded in x around 0 52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in y around 0 27.0%
(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 71.2%
Taylor expanded in x around inf 46.7%
Taylor expanded in y around inf 4.2%
(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 71.2%
associate-/l*83.9%
associate-+l+83.9%
Simplified83.9%
Taylor expanded in x around 0 52.4%
+-commutative52.4%
Simplified52.4%
Taylor expanded in y around 0 14.2%
mul-1-neg14.2%
*-commutative14.2%
distribute-rgt-neg-in14.2%
Simplified14.2%
Taylor expanded in y around inf 3.5%
mul-1-neg3.5%
Simplified3.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 2024157
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))