
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
(FPCore (x y) :precision binary64 (/ (* (/ y (+ x (+ y 1.0))) (/ x (+ y x))) (+ y x)))
double code(double x, double y) {
return ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y / (x + (y + 1.0d0))) * (x / (y + x))) / (y + x)
end function
public static double code(double x, double y) {
return ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x);
}
def code(x, y): return ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x)
function code(x, y) return Float64(Float64(Float64(y / Float64(x + Float64(y + 1.0))) * Float64(x / Float64(y + x))) / Float64(y + x)) end
function tmp = code(x, y) tmp = ((y / (x + (y + 1.0))) * (x / (y + x))) / (y + x); end
code[x_, y_] := N[(N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{y + x}}{y + x}
\end{array}
Initial program 72.0%
associate-*l*72.0%
+-commutative72.0%
+-commutative72.0%
+-commutative72.0%
associate-*l*72.0%
*-commutative72.0%
associate-*r/84.7%
*-commutative84.7%
distribute-rgt1-in68.3%
fma-def84.7%
+-commutative84.7%
+-commutative84.7%
cube-unmult84.8%
+-commutative84.8%
Simplified84.8%
associate-*r/72.0%
*-commutative72.0%
fma-udef60.7%
cube-mult60.6%
distribute-rgt1-in72.0%
*-commutative72.0%
+-commutative72.0%
associate-+r+72.0%
frac-times89.3%
*-commutative89.3%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(if (<= x -3750000000.0)
(/ (/ y (+ x (+ y 1.0))) (+ y x))
(if (<= x -8e-150)
(* (/ y (+ y 1.0)) (/ x (* (+ y x) (+ y x))))
(/ (/ x (+ y (+ x 1.0))) y))))
double code(double x, double y) {
double tmp;
if (x <= -3750000000.0) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (x <= -8e-150) {
tmp = (y / (y + 1.0)) * (x / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + 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 <= (-3750000000.0d0)) then
tmp = (y / (x + (y + 1.0d0))) / (y + x)
else if (x <= (-8d-150)) then
tmp = (y / (y + 1.0d0)) * (x / ((y + x) * (y + x)))
else
tmp = (x / (y + (x + 1.0d0))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -3750000000.0) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (x <= -8e-150) {
tmp = (y / (y + 1.0)) * (x / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -3750000000.0: tmp = (y / (x + (y + 1.0))) / (y + x) elif x <= -8e-150: tmp = (y / (y + 1.0)) * (x / ((y + x) * (y + x))) else: tmp = (x / (y + (x + 1.0))) / y return tmp
function code(x, y) tmp = 0.0 if (x <= -3750000000.0) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(y + x)); elseif (x <= -8e-150) tmp = Float64(Float64(y / Float64(y + 1.0)) * Float64(x / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -3750000000.0) tmp = (y / (x + (y + 1.0))) / (y + x); elseif (x <= -8e-150) tmp = (y / (y + 1.0)) * (x / ((y + x) * (y + x))); else tmp = (x / (y + (x + 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -3750000000.0], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8e-150], N[(N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3750000000:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{y + x}\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{y + 1} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if x < -3.75e9Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
associate-*r/63.7%
*-commutative63.7%
fma-udef38.5%
cube-mult38.5%
distribute-rgt1-in63.7%
*-commutative63.7%
+-commutative63.7%
associate-+r+63.7%
frac-times89.6%
*-commutative89.6%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 84.4%
if -3.75e9 < x < -8.00000000000000005e-150Initial program 82.5%
times-frac99.6%
+-commutative99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 99.1%
+-commutative99.1%
Simplified99.1%
if -8.00000000000000005e-150 < x Initial program 73.5%
associate-*l*73.5%
+-commutative73.5%
+-commutative73.5%
+-commutative73.5%
*-commutative73.5%
associate-*l*73.5%
times-frac87.4%
+-commutative87.4%
+-commutative87.4%
associate-+l+87.4%
Simplified87.4%
Taylor expanded in y around inf 48.2%
associate-*l/48.2%
*-un-lft-identity48.2%
Applied egg-rr48.2%
Final simplification62.8%
(FPCore (x y) :precision binary64 (if (<= x -2050000.0) (* (/ x (* (+ y x) (+ y x))) (/ y (+ y (+ x 1.0)))) (/ (/ x (/ (+ y x) (/ y (+ y 1.0)))) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -2050000.0) {
tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.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) :: tmp
if (x <= (-2050000.0d0)) then
tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0d0)))
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 tmp;
if (x <= -2050000.0) {
tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0)));
} else {
tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2050000.0: tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0))) else: tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -2050000.0) tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / Float64(Float64(y + x) / Float64(y / Float64(y + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2050000.0) tmp = (x / ((y + x) * (y + x))) * (y / (y + (x + 1.0))); else tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2050000.0], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(y + x), $MachinePrecision] / N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2050000:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{y + \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\frac{y + x}{\frac{y}{y + 1}}}}{y + x}\\
\end{array}
\end{array}
if x < -2.05e6Initial program 64.2%
times-frac89.8%
+-commutative89.8%
associate-+l+89.8%
Simplified89.8%
if -2.05e6 < x Initial program 74.7%
associate-*l*74.7%
+-commutative74.7%
+-commutative74.7%
+-commutative74.7%
associate-*l*74.7%
*-commutative74.7%
associate-*r/85.2%
*-commutative85.2%
distribute-rgt1-in77.6%
fma-def85.2%
+-commutative85.2%
+-commutative85.2%
cube-unmult85.2%
+-commutative85.2%
Simplified85.2%
associate-*r/74.7%
*-commutative74.7%
fma-udef67.9%
cube-mult67.9%
distribute-rgt1-in74.7%
*-commutative74.7%
+-commutative74.7%
associate-+r+74.7%
frac-times89.1%
*-commutative89.1%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times99.0%
*-un-lft-identity99.0%
associate-+r+99.0%
+-commutative99.0%
associate-+r+99.0%
+-commutative99.0%
Applied egg-rr99.0%
+-commutative99.0%
*-commutative99.0%
clear-num99.0%
associate-+r+99.0%
+-commutative99.0%
associate-+r+99.0%
*-rgt-identity99.0%
div-inv99.1%
*-rgt-identity99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 80.5%
+-commutative80.5%
Simplified80.5%
Final simplification82.8%
(FPCore (x y) :precision binary64 (if (<= x -2050000.0) (* (/ y (* (+ y x) (+ y x))) (/ x (+ y (+ x 1.0)))) (/ (/ x (/ (+ y x) (/ y (+ y 1.0)))) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -2050000.0) {
tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.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) :: tmp
if (x <= (-2050000.0d0)) then
tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0d0)))
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 tmp;
if (x <= -2050000.0) {
tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0)));
} else {
tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2050000.0: tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0))) else: tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -2050000.0) tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(y + x))) * Float64(x / Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / Float64(Float64(y + x) / Float64(y / Float64(y + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2050000.0) tmp = (y / ((y + x) * (y + x))) * (x / (y + (x + 1.0))); else tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2050000.0], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(y + x), $MachinePrecision] / N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2050000:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{y + \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\frac{y + x}{\frac{y}{y + 1}}}}{y + x}\\
\end{array}
\end{array}
if x < -2.05e6Initial program 64.2%
associate-*l*64.2%
+-commutative64.2%
+-commutative64.2%
+-commutative64.2%
*-commutative64.2%
associate-*l*64.2%
times-frac89.8%
+-commutative89.8%
+-commutative89.8%
associate-+l+89.8%
Simplified89.8%
if -2.05e6 < x Initial program 74.7%
associate-*l*74.7%
+-commutative74.7%
+-commutative74.7%
+-commutative74.7%
associate-*l*74.7%
*-commutative74.7%
associate-*r/85.2%
*-commutative85.2%
distribute-rgt1-in77.6%
fma-def85.2%
+-commutative85.2%
+-commutative85.2%
cube-unmult85.2%
+-commutative85.2%
Simplified85.2%
associate-*r/74.7%
*-commutative74.7%
fma-udef67.9%
cube-mult67.9%
distribute-rgt1-in74.7%
*-commutative74.7%
+-commutative74.7%
associate-+r+74.7%
frac-times89.1%
*-commutative89.1%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times99.0%
*-un-lft-identity99.0%
associate-+r+99.0%
+-commutative99.0%
associate-+r+99.0%
+-commutative99.0%
Applied egg-rr99.0%
+-commutative99.0%
*-commutative99.0%
clear-num99.0%
associate-+r+99.0%
+-commutative99.0%
associate-+r+99.0%
*-rgt-identity99.0%
div-inv99.1%
*-rgt-identity99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 80.5%
+-commutative80.5%
Simplified80.5%
Final simplification82.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y (+ x 1.0)))))
(if (<= y 1.8e-126)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= y 2.9e-7)
(/ t_0 y)
(if (<= y 3.65e+148) (/ x (* (+ y x) (+ y x))) (* t_0 (/ 1.0 y)))))))
double code(double x, double y) {
double t_0 = x / (y + (x + 1.0));
double tmp;
if (y <= 1.8e-126) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 2.9e-7) {
tmp = t_0 / y;
} else if (y <= 3.65e+148) {
tmp = x / ((y + x) * (y + x));
} else {
tmp = t_0 * (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 = x / (y + (x + 1.0d0))
if (y <= 1.8d-126) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (y <= 2.9d-7) then
tmp = t_0 / y
else if (y <= 3.65d+148) then
tmp = x / ((y + x) * (y + x))
else
tmp = t_0 * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + (x + 1.0));
double tmp;
if (y <= 1.8e-126) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 2.9e-7) {
tmp = t_0 / y;
} else if (y <= 3.65e+148) {
tmp = x / ((y + x) * (y + x));
} else {
tmp = t_0 * (1.0 / y);
}
return tmp;
}
def code(x, y): t_0 = x / (y + (x + 1.0)) tmp = 0 if y <= 1.8e-126: tmp = (y / (x + 1.0)) / (y + x) elif y <= 2.9e-7: tmp = t_0 / y elif y <= 3.65e+148: tmp = x / ((y + x) * (y + x)) else: tmp = t_0 * (1.0 / y) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + Float64(x + 1.0))) tmp = 0.0 if (y <= 1.8e-126) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (y <= 2.9e-7) tmp = Float64(t_0 / y); elseif (y <= 3.65e+148) tmp = Float64(x / Float64(Float64(y + x) * Float64(y + x))); else tmp = Float64(t_0 * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + (x + 1.0)); tmp = 0.0; if (y <= 1.8e-126) tmp = (y / (x + 1.0)) / (y + x); elseif (y <= 2.9e-7) tmp = t_0 / y; elseif (y <= 3.65e+148) tmp = x / ((y + x) * (y + x)); else tmp = t_0 * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.8e-126], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-7], N[(t$95$0 / y), $MachinePrecision], If[LessEqual[y, 3.65e+148], N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + \left(x + 1\right)}\\
\mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-7}:\\
\;\;\;\;\frac{t_0}{y}\\
\mathbf{elif}\;y \leq 3.65 \cdot 10^{+148}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{1}{y}\\
\end{array}
\end{array}
if y < 1.8e-126Initial program 70.1%
associate-*l*70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
associate-*l*70.1%
*-commutative70.1%
associate-*r/84.1%
*-commutative84.1%
distribute-rgt1-in65.4%
fma-def84.1%
+-commutative84.1%
+-commutative84.1%
cube-unmult84.1%
+-commutative84.1%
Simplified84.1%
associate-*r/70.0%
*-commutative70.0%
fma-udef56.7%
cube-mult56.7%
distribute-rgt1-in70.1%
*-commutative70.1%
+-commutative70.1%
associate-+r+70.1%
frac-times87.4%
*-commutative87.4%
associate-/r*99.7%
associate-*r/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 66.3%
+-commutative66.3%
Simplified66.3%
if 1.8e-126 < y < 2.8999999999999998e-7Initial program 91.4%
associate-*l*91.4%
+-commutative91.4%
+-commutative91.4%
+-commutative91.4%
*-commutative91.4%
associate-*l*91.4%
times-frac99.3%
+-commutative99.3%
+-commutative99.3%
associate-+l+99.3%
Simplified99.3%
Taylor expanded in y around inf 34.9%
associate-*l/35.1%
*-un-lft-identity35.1%
Applied egg-rr35.1%
if 2.8999999999999998e-7 < y < 3.65e148Initial program 69.5%
times-frac96.3%
+-commutative96.3%
associate-+l+96.3%
Simplified96.3%
Taylor expanded in y around inf 80.6%
if 3.65e148 < y Initial program 71.2%
associate-*l*71.2%
+-commutative71.2%
+-commutative71.2%
+-commutative71.2%
*-commutative71.2%
associate-*l*71.2%
times-frac85.4%
+-commutative85.4%
+-commutative85.4%
associate-+l+85.4%
Simplified85.4%
Taylor expanded in y around inf 83.7%
Final simplification66.7%
(FPCore (x y)
:precision binary64
(if (<= y 1.76e-152)
(/ (/ y (+ x (+ y 1.0))) (+ y x))
(if (<= y 29.0)
(* x (/ y (* (+ y x) (+ y x))))
(/ (/ x (+ y (+ x (+ x 1.0)))) (+ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 1.76e-152) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (y <= 29.0) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + (x + 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 (y <= 1.76d-152) then
tmp = (y / (x + (y + 1.0d0))) / (y + x)
else if (y <= 29.0d0) then
tmp = x * (y / ((y + x) * (y + x)))
else
tmp = (x / (y + (x + (x + 1.0d0)))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.76e-152) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (y <= 29.0) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.76e-152: tmp = (y / (x + (y + 1.0))) / (y + x) elif y <= 29.0: tmp = x * (y / ((y + x) * (y + x))) else: tmp = (x / (y + (x + (x + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.76e-152) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(y + x)); elseif (y <= 29.0) tmp = Float64(x * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + Float64(x + Float64(x + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.76e-152) tmp = (y / (x + (y + 1.0))) / (y + x); elseif (y <= 29.0) tmp = x * (y / ((y + x) * (y + x))); else tmp = (x / (y + (x + (x + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.76e-152], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 29.0], N[(x * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.76 \cdot 10^{-152}:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{y + x}\\
\mathbf{elif}\;y \leq 29:\\
\;\;\;\;x \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + \left(x + 1\right)\right)}}{y + x}\\
\end{array}
\end{array}
if y < 1.76000000000000001e-152Initial program 69.9%
associate-*l*69.9%
+-commutative69.9%
+-commutative69.9%
+-commutative69.9%
associate-*l*69.9%
*-commutative69.9%
associate-*r/83.8%
*-commutative83.8%
distribute-rgt1-in64.6%
fma-def83.7%
+-commutative83.7%
+-commutative83.7%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/69.9%
*-commutative69.9%
fma-udef56.3%
cube-mult56.3%
distribute-rgt1-in69.9%
*-commutative69.9%
+-commutative69.9%
associate-+r+69.9%
frac-times87.2%
*-commutative87.2%
associate-/r*99.7%
associate-*r/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 66.6%
if 1.76000000000000001e-152 < y < 29Initial program 90.1%
associate-*l*90.2%
+-commutative90.2%
+-commutative90.2%
+-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
times-frac99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 74.5%
+-commutative74.5%
Simplified74.5%
Taylor expanded in y around 0 73.2%
if 29 < y Initial program 68.5%
associate-*l*68.4%
+-commutative68.4%
+-commutative68.4%
+-commutative68.4%
associate-*l*68.5%
*-commutative68.5%
associate-*r/81.0%
*-commutative81.0%
distribute-rgt1-in72.6%
fma-def81.0%
+-commutative81.0%
+-commutative81.0%
cube-unmult81.1%
+-commutative81.1%
Simplified81.1%
associate-*r/68.5%
*-commutative68.5%
fma-udef66.5%
cube-mult66.4%
distribute-rgt1-in68.5%
*-commutative68.5%
+-commutative68.5%
associate-+r+68.5%
frac-times90.9%
*-commutative90.9%
associate-/r*99.8%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times99.7%
*-un-lft-identity99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around -inf 69.6%
mul-1-neg69.6%
unsub-neg69.6%
neg-mul-169.6%
+-commutative69.6%
unsub-neg69.6%
distribute-lft-in69.6%
metadata-eval69.6%
neg-mul-169.6%
unsub-neg69.6%
Simplified69.6%
Final simplification67.9%
(FPCore (x y) :precision binary64 (if (<= x -31000000000.0) (/ (/ y (+ x (+ y 1.0))) (+ y x)) (/ (/ x (/ (+ y x) (/ y (+ y 1.0)))) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -31000000000.0) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} 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) :: tmp
if (x <= (-31000000000.0d0)) then
tmp = (y / (x + (y + 1.0d0))) / (y + x)
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 tmp;
if (x <= -31000000000.0) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else {
tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -31000000000.0: tmp = (y / (x + (y + 1.0))) / (y + x) else: tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -31000000000.0) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(y + x)); else tmp = Float64(Float64(x / Float64(Float64(y + x) / Float64(y / Float64(y + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -31000000000.0) tmp = (y / (x + (y + 1.0))) / (y + x); else tmp = (x / ((y + x) / (y / (y + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -31000000000.0], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(y + x), $MachinePrecision] / N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -31000000000:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{\frac{y + x}{\frac{y}{y + 1}}}}{y + x}\\
\end{array}
\end{array}
if x < -3.1e10Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
associate-*r/63.7%
*-commutative63.7%
fma-udef38.5%
cube-mult38.5%
distribute-rgt1-in63.7%
*-commutative63.7%
+-commutative63.7%
associate-+r+63.7%
frac-times89.6%
*-commutative89.6%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 84.4%
if -3.1e10 < x Initial program 74.8%
associate-*l*74.8%
+-commutative74.8%
+-commutative74.8%
+-commutative74.8%
associate-*l*74.8%
*-commutative74.8%
associate-*r/85.3%
*-commutative85.3%
distribute-rgt1-in77.7%
fma-def85.3%
+-commutative85.3%
+-commutative85.3%
cube-unmult85.3%
+-commutative85.3%
Simplified85.3%
associate-*r/74.8%
*-commutative74.8%
fma-udef68.1%
cube-mult68.0%
distribute-rgt1-in74.8%
*-commutative74.8%
+-commutative74.8%
associate-+r+74.8%
frac-times89.2%
*-commutative89.2%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times99.0%
*-un-lft-identity99.0%
associate-+r+99.0%
+-commutative99.0%
associate-+r+99.0%
+-commutative99.0%
Applied egg-rr99.0%
+-commutative99.0%
*-commutative99.0%
clear-num99.0%
associate-+r+99.0%
+-commutative99.0%
associate-+r+99.0%
*-rgt-identity99.0%
div-inv99.1%
*-rgt-identity99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 80.5%
+-commutative80.5%
Simplified80.5%
Final simplification81.5%
(FPCore (x y)
:precision binary64
(if (<= y 1.76e-152)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= y 45.0)
(* x (/ y (* (+ y x) (+ y x))))
(/ (/ x (+ y (+ x 1.0))) y))))
double code(double x, double y) {
double tmp;
if (y <= 1.76e-152) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 45.0) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + 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 <= 1.76d-152) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (y <= 45.0d0) then
tmp = x * (y / ((y + x) * (y + x)))
else
tmp = (x / (y + (x + 1.0d0))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.76e-152) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 45.0) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.76e-152: tmp = (y / (x + 1.0)) / (y + x) elif y <= 45.0: tmp = x * (y / ((y + x) * (y + x))) else: tmp = (x / (y + (x + 1.0))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 1.76e-152) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (y <= 45.0) tmp = Float64(x * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.76e-152) tmp = (y / (x + 1.0)) / (y + x); elseif (y <= 45.0) tmp = x * (y / ((y + x) * (y + x))); else tmp = (x / (y + (x + 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.76e-152], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 45.0], N[(x * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.76 \cdot 10^{-152}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 45:\\
\;\;\;\;x \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if y < 1.76000000000000001e-152Initial program 69.9%
associate-*l*69.9%
+-commutative69.9%
+-commutative69.9%
+-commutative69.9%
associate-*l*69.9%
*-commutative69.9%
associate-*r/83.8%
*-commutative83.8%
distribute-rgt1-in64.6%
fma-def83.7%
+-commutative83.7%
+-commutative83.7%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/69.9%
*-commutative69.9%
fma-udef56.3%
cube-mult56.3%
distribute-rgt1-in69.9%
*-commutative69.9%
+-commutative69.9%
associate-+r+69.9%
frac-times87.2%
*-commutative87.2%
associate-/r*99.7%
associate-*r/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 66.1%
+-commutative66.1%
Simplified66.1%
if 1.76000000000000001e-152 < y < 45Initial program 90.1%
associate-*l*90.2%
+-commutative90.2%
+-commutative90.2%
+-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
times-frac99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 74.5%
+-commutative74.5%
Simplified74.5%
Taylor expanded in y around 0 73.2%
if 45 < y Initial program 68.5%
associate-*l*68.4%
+-commutative68.4%
+-commutative68.4%
+-commutative68.4%
*-commutative68.4%
associate-*l*68.5%
times-frac90.9%
+-commutative90.9%
+-commutative90.9%
associate-+l+90.9%
Simplified90.9%
Taylor expanded in y around inf 68.6%
associate-*l/68.6%
*-un-lft-identity68.6%
Applied egg-rr68.6%
Final simplification67.4%
(FPCore (x y)
:precision binary64
(if (<= y 1.76e-152)
(/ (/ y (+ x (+ y 1.0))) (+ y x))
(if (<= y 8.5)
(* x (/ y (* (+ y x) (+ y x))))
(/ (/ x (+ y (+ x 1.0))) y))))
double code(double x, double y) {
double tmp;
if (y <= 1.76e-152) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (y <= 8.5) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + 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 <= 1.76d-152) then
tmp = (y / (x + (y + 1.0d0))) / (y + x)
else if (y <= 8.5d0) then
tmp = x * (y / ((y + x) * (y + x)))
else
tmp = (x / (y + (x + 1.0d0))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.76e-152) {
tmp = (y / (x + (y + 1.0))) / (y + x);
} else if (y <= 8.5) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.76e-152: tmp = (y / (x + (y + 1.0))) / (y + x) elif y <= 8.5: tmp = x * (y / ((y + x) * (y + x))) else: tmp = (x / (y + (x + 1.0))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 1.76e-152) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(y + x)); elseif (y <= 8.5) tmp = Float64(x * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.76e-152) tmp = (y / (x + (y + 1.0))) / (y + x); elseif (y <= 8.5) tmp = x * (y / ((y + x) * (y + x))); else tmp = (x / (y + (x + 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.76e-152], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5], N[(x * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.76 \cdot 10^{-152}:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{y + x}\\
\mathbf{elif}\;y \leq 8.5:\\
\;\;\;\;x \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if y < 1.76000000000000001e-152Initial program 69.9%
associate-*l*69.9%
+-commutative69.9%
+-commutative69.9%
+-commutative69.9%
associate-*l*69.9%
*-commutative69.9%
associate-*r/83.8%
*-commutative83.8%
distribute-rgt1-in64.6%
fma-def83.7%
+-commutative83.7%
+-commutative83.7%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/69.9%
*-commutative69.9%
fma-udef56.3%
cube-mult56.3%
distribute-rgt1-in69.9%
*-commutative69.9%
+-commutative69.9%
associate-+r+69.9%
frac-times87.2%
*-commutative87.2%
associate-/r*99.7%
associate-*r/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 66.6%
if 1.76000000000000001e-152 < y < 8.5Initial program 90.1%
associate-*l*90.2%
+-commutative90.2%
+-commutative90.2%
+-commutative90.2%
*-commutative90.2%
associate-*l*90.1%
times-frac99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 74.5%
+-commutative74.5%
Simplified74.5%
Taylor expanded in y around 0 73.2%
if 8.5 < y Initial program 68.5%
associate-*l*68.4%
+-commutative68.4%
+-commutative68.4%
+-commutative68.4%
*-commutative68.4%
associate-*l*68.5%
times-frac90.9%
+-commutative90.9%
+-commutative90.9%
associate-+l+90.9%
Simplified90.9%
Taylor expanded in y around inf 68.6%
associate-*l/68.6%
*-un-lft-identity68.6%
Applied egg-rr68.6%
Final simplification67.7%
(FPCore (x y)
:precision binary64
(if (<= x -17500000000.0)
(/ (/ y x) x)
(if (or (<= x -3.9e-168) (not (<= x 6.8e-193)))
(* (/ 1.0 y) (/ x y))
(/ x y))))
double code(double x, double y) {
double tmp;
if (x <= -17500000000.0) {
tmp = (y / x) / x;
} else if ((x <= -3.9e-168) || !(x <= 6.8e-193)) {
tmp = (1.0 / y) * (x / y);
} 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 <= (-17500000000.0d0)) then
tmp = (y / x) / x
else if ((x <= (-3.9d-168)) .or. (.not. (x <= 6.8d-193))) then
tmp = (1.0d0 / y) * (x / y)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -17500000000.0) {
tmp = (y / x) / x;
} else if ((x <= -3.9e-168) || !(x <= 6.8e-193)) {
tmp = (1.0 / y) * (x / y);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -17500000000.0: tmp = (y / x) / x elif (x <= -3.9e-168) or not (x <= 6.8e-193): tmp = (1.0 / y) * (x / y) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -17500000000.0) tmp = Float64(Float64(y / x) / x); elseif ((x <= -3.9e-168) || !(x <= 6.8e-193)) tmp = Float64(Float64(1.0 / y) * Float64(x / y)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -17500000000.0) tmp = (y / x) / x; elseif ((x <= -3.9e-168) || ~((x <= 6.8e-193))) tmp = (1.0 / y) * (x / y); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -17500000000.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[Or[LessEqual[x, -3.9e-168], N[Not[LessEqual[x, 6.8e-193]], $MachinePrecision]], N[(N[(1.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -17500000000:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{-168} \lor \neg \left(x \leq 6.8 \cdot 10^{-193}\right):\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1.75e10Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
Taylor expanded in x around inf 76.8%
*-un-lft-identity76.8%
unpow276.8%
times-frac83.4%
Applied egg-rr83.4%
associate-*l/83.4%
*-lft-identity83.4%
Simplified83.4%
if -1.75e10 < x < -3.90000000000000012e-168 or 6.8000000000000004e-193 < x Initial program 79.6%
associate-*l*79.6%
+-commutative79.6%
+-commutative79.6%
+-commutative79.6%
*-commutative79.6%
associate-*l*79.6%
times-frac94.5%
+-commutative94.5%
+-commutative94.5%
associate-+l+94.5%
Simplified94.5%
Taylor expanded in y around inf 37.9%
Taylor expanded in y around inf 31.0%
if -3.90000000000000012e-168 < x < 6.8000000000000004e-193Initial program 60.1%
times-frac72.9%
+-commutative72.9%
associate-+l+72.9%
Simplified72.9%
Taylor expanded in x around 0 83.9%
+-commutative83.9%
Simplified83.9%
Taylor expanded in y around 0 74.9%
Final simplification52.2%
(FPCore (x y) :precision binary64 (if (<= y -2.45e+32) (/ (/ y x) x) (if (<= y 1.55e-126) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (y <= -2.45e+32) {
tmp = (y / x) / x;
} else if (y <= 1.55e-126) {
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 (y <= (-2.45d+32)) then
tmp = (y / x) / x
else if (y <= 1.55d-126) 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 (y <= -2.45e+32) {
tmp = (y / x) / x;
} else if (y <= 1.55e-126) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.45e+32: tmp = (y / x) / x elif y <= 1.55e-126: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.45e+32) tmp = Float64(Float64(y / x) / x); elseif (y <= 1.55e-126) 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 (y <= -2.45e+32) tmp = (y / x) / x; elseif (y <= 1.55e-126) tmp = y / (x * (x + 1.0)); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.45e+32], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 1.55e-126], 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}\;y \leq -2.45 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-126}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if y < -2.4500000000000001e32Initial program 57.2%
associate-*l*57.2%
+-commutative57.2%
+-commutative57.2%
+-commutative57.2%
associate-*l*57.2%
*-commutative57.2%
associate-*r/77.8%
*-commutative77.8%
distribute-rgt1-in36.2%
fma-def77.8%
+-commutative77.8%
+-commutative77.8%
cube-unmult77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in x around inf 27.6%
*-un-lft-identity27.6%
unpow227.6%
times-frac35.5%
Applied egg-rr35.5%
associate-*l/35.6%
*-lft-identity35.6%
Simplified35.6%
if -2.4500000000000001e32 < y < 1.5500000000000001e-126Initial program 76.5%
times-frac88.5%
+-commutative88.5%
associate-+l+88.5%
Simplified88.5%
Taylor expanded in y around 0 81.0%
if 1.5500000000000001e-126 < y Initial program 76.8%
times-frac93.8%
+-commutative93.8%
associate-+l+93.8%
Simplified93.8%
Taylor expanded in x around 0 55.7%
+-commutative55.7%
Simplified55.7%
Final simplification63.0%
(FPCore (x y) :precision binary64 (if (<= y -2.45e+32) (/ (/ y x) x) (if (<= y 6e-130) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (y <= -2.45e+32) {
tmp = (y / x) / x;
} else if (y <= 6e-130) {
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 (y <= (-2.45d+32)) then
tmp = (y / x) / x
else if (y <= 6d-130) 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 (y <= -2.45e+32) {
tmp = (y / x) / x;
} else if (y <= 6e-130) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.45e+32: tmp = (y / x) / x elif y <= 6e-130: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.45e+32) tmp = Float64(Float64(y / x) / x); elseif (y <= 6e-130) 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 (y <= -2.45e+32) tmp = (y / x) / x; elseif (y <= 6e-130) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.45e+32], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 6e-130], 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}\;y \leq -2.45 \cdot 10^{+32}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-130}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if y < -2.4500000000000001e32Initial program 57.2%
associate-*l*57.2%
+-commutative57.2%
+-commutative57.2%
+-commutative57.2%
associate-*l*57.2%
*-commutative57.2%
associate-*r/77.8%
*-commutative77.8%
distribute-rgt1-in36.2%
fma-def77.8%
+-commutative77.8%
+-commutative77.8%
cube-unmult77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in x around inf 27.6%
*-un-lft-identity27.6%
unpow227.6%
times-frac35.5%
Applied egg-rr35.5%
associate-*l/35.6%
*-lft-identity35.6%
Simplified35.6%
if -2.4500000000000001e32 < y < 5.99999999999999972e-130Initial program 76.5%
times-frac88.5%
+-commutative88.5%
associate-+l+88.5%
Simplified88.5%
Taylor expanded in y around 0 81.0%
if 5.99999999999999972e-130 < y Initial program 76.8%
associate-*l*76.8%
+-commutative76.8%
+-commutative76.8%
+-commutative76.8%
associate-*l*76.8%
*-commutative76.8%
associate-*r/86.2%
*-commutative86.2%
distribute-rgt1-in75.4%
fma-def86.2%
+-commutative86.2%
+-commutative86.2%
cube-unmult86.3%
+-commutative86.3%
Simplified86.3%
associate-*r/76.8%
*-commutative76.8%
fma-udef70.1%
cube-mult70.1%
distribute-rgt1-in76.8%
*-commutative76.8%
+-commutative76.8%
associate-+r+76.8%
frac-times93.8%
*-commutative93.8%
associate-/r*99.7%
associate-*r/99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
Applied egg-rr99.7%
clear-num99.7%
frac-times99.6%
*-un-lft-identity99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
+-commutative99.6%
*-commutative99.6%
clear-num99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
*-rgt-identity99.6%
div-inv99.6%
*-rgt-identity99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 55.7%
associate-/r*55.2%
Simplified55.2%
Final simplification62.8%
(FPCore (x y) :precision binary64 (if (<= y 1.8e-126) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
double tmp;
if (y <= 1.8e-126) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.8d-126) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-126) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.8e-126: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.8e-126) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.8e-126) tmp = (y / x) / (x + 1.0); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.8e-126], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if y < 1.8e-126Initial program 70.1%
times-frac87.4%
+-commutative87.4%
associate-+l+87.4%
Simplified87.4%
Taylor expanded in y around 0 63.3%
associate-/r*65.9%
+-commutative65.9%
Simplified65.9%
if 1.8e-126 < y Initial program 76.8%
associate-*l*76.8%
+-commutative76.8%
+-commutative76.8%
+-commutative76.8%
associate-*l*76.8%
*-commutative76.8%
associate-*r/86.2%
*-commutative86.2%
distribute-rgt1-in75.4%
fma-def86.2%
+-commutative86.2%
+-commutative86.2%
cube-unmult86.3%
+-commutative86.3%
Simplified86.3%
associate-*r/76.8%
*-commutative76.8%
fma-udef70.1%
cube-mult70.1%
distribute-rgt1-in76.8%
*-commutative76.8%
+-commutative76.8%
associate-+r+76.8%
frac-times93.8%
*-commutative93.8%
associate-/r*99.7%
associate-*r/99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 55.7%
+-commutative55.7%
Simplified55.7%
Final simplification62.9%
(FPCore (x y) :precision binary64 (if (<= y 1.8e-126) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
double tmp;
if (y <= 1.8e-126) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + (x + 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 <= 1.8d-126) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / (y + (x + 1.0d0))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-126) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.8e-126: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + (x + 1.0))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 1.8e-126) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.8e-126) tmp = (y / x) / (x + 1.0); else tmp = (x / (y + (x + 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.8e-126], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if y < 1.8e-126Initial program 70.1%
times-frac87.4%
+-commutative87.4%
associate-+l+87.4%
Simplified87.4%
Taylor expanded in y around 0 63.3%
associate-/r*65.9%
+-commutative65.9%
Simplified65.9%
if 1.8e-126 < y Initial program 76.8%
associate-*l*76.8%
+-commutative76.8%
+-commutative76.8%
+-commutative76.8%
*-commutative76.8%
associate-*l*76.8%
times-frac93.8%
+-commutative93.8%
+-commutative93.8%
associate-+l+93.8%
Simplified93.8%
Taylor expanded in y around inf 55.6%
associate-*l/55.7%
*-un-lft-identity55.7%
Applied egg-rr55.7%
Final simplification62.9%
(FPCore (x y) :precision binary64 (if (<= y 1.8e-126) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
double tmp;
if (y <= 1.8e-126) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (y + (x + 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 <= 1.8d-126) then
tmp = (y / (x + 1.0d0)) / (y + x)
else
tmp = (x / (y + (x + 1.0d0))) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.8e-126) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.8e-126: tmp = (y / (x + 1.0)) / (y + x) else: tmp = (x / (y + (x + 1.0))) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 1.8e-126) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); else tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.8e-126) tmp = (y / (x + 1.0)) / (y + x); else tmp = (x / (y + (x + 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.8e-126], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if y < 1.8e-126Initial program 70.1%
associate-*l*70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
associate-*l*70.1%
*-commutative70.1%
associate-*r/84.1%
*-commutative84.1%
distribute-rgt1-in65.4%
fma-def84.1%
+-commutative84.1%
+-commutative84.1%
cube-unmult84.1%
+-commutative84.1%
Simplified84.1%
associate-*r/70.0%
*-commutative70.0%
fma-udef56.7%
cube-mult56.7%
distribute-rgt1-in70.1%
*-commutative70.1%
+-commutative70.1%
associate-+r+70.1%
frac-times87.4%
*-commutative87.4%
associate-/r*99.7%
associate-*r/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 66.3%
+-commutative66.3%
Simplified66.3%
if 1.8e-126 < y Initial program 76.8%
associate-*l*76.8%
+-commutative76.8%
+-commutative76.8%
+-commutative76.8%
*-commutative76.8%
associate-*l*76.8%
times-frac93.8%
+-commutative93.8%
+-commutative93.8%
associate-+l+93.8%
Simplified93.8%
Taylor expanded in y around inf 55.6%
associate-*l/55.7%
*-un-lft-identity55.7%
Applied egg-rr55.7%
Final simplification63.2%
(FPCore (x y) :precision binary64 (if (<= x -6200000000.0) (/ (/ y x) x) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -6200000000.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 <= (-6200000000.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 <= -6200000000.0) {
tmp = (y / x) / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -6200000000.0: tmp = (y / x) / x else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -6200000000.0) tmp = Float64(Float64(y / 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 <= -6200000000.0) tmp = (y / x) / x; else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -6200000000.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6200000000:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -6.2e9Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
Taylor expanded in x around inf 76.8%
*-un-lft-identity76.8%
unpow276.8%
times-frac83.4%
Applied egg-rr83.4%
associate-*l/83.4%
*-lft-identity83.4%
Simplified83.4%
if -6.2e9 < x Initial program 74.8%
times-frac89.2%
+-commutative89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in x around 0 50.0%
+-commutative50.0%
Simplified50.0%
Final simplification58.3%
(FPCore (x y) :precision binary64 (if (<= y 1.8e-126) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (y <= 1.8e-126) {
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 (y <= 1.8d-126) 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 (y <= 1.8e-126) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.8e-126: tmp = (y / x) / (x + 1.0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.8e-126) 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 (y <= 1.8e-126) tmp = (y / x) / (x + 1.0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.8e-126], 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}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if y < 1.8e-126Initial program 70.1%
times-frac87.4%
+-commutative87.4%
associate-+l+87.4%
Simplified87.4%
Taylor expanded in y around 0 63.3%
associate-/r*65.9%
+-commutative65.9%
Simplified65.9%
if 1.8e-126 < y Initial program 76.8%
associate-*l*76.8%
+-commutative76.8%
+-commutative76.8%
+-commutative76.8%
associate-*l*76.8%
*-commutative76.8%
associate-*r/86.2%
*-commutative86.2%
distribute-rgt1-in75.4%
fma-def86.2%
+-commutative86.2%
+-commutative86.2%
cube-unmult86.3%
+-commutative86.3%
Simplified86.3%
associate-*r/76.8%
*-commutative76.8%
fma-udef70.1%
cube-mult70.1%
distribute-rgt1-in76.8%
*-commutative76.8%
+-commutative76.8%
associate-+r+76.8%
frac-times93.8%
*-commutative93.8%
associate-/r*99.7%
associate-*r/99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
Applied egg-rr99.7%
clear-num99.7%
frac-times99.6%
*-un-lft-identity99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
Applied egg-rr99.6%
+-commutative99.6%
*-commutative99.6%
clear-num99.6%
associate-+r+99.6%
+-commutative99.6%
associate-+r+99.6%
*-rgt-identity99.6%
div-inv99.6%
*-rgt-identity99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 55.7%
associate-/r*55.2%
Simplified55.2%
Final simplification62.8%
(FPCore (x y) :precision binary64 (if (<= x -2600000000.0) (/ 0.5 (+ y x)) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -2600000000.0) {
tmp = 0.5 / (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 <= (-2600000000.0d0)) then
tmp = 0.5d0 / (y + x)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2600000000.0) {
tmp = 0.5 / (y + x);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2600000000.0: tmp = 0.5 / (y + x) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2600000000.0) tmp = Float64(0.5 / Float64(y + x)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2600000000.0) tmp = 0.5 / (y + x); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2600000000.0], N[(0.5 / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2600000000:\\
\;\;\;\;\frac{0.5}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -2.6e9Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
associate-*r/63.7%
*-commutative63.7%
fma-udef38.5%
cube-mult38.5%
distribute-rgt1-in63.7%
*-commutative63.7%
+-commutative63.7%
associate-+r+63.7%
frac-times89.6%
*-commutative89.6%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times98.9%
*-un-lft-identity98.9%
associate-+r+98.9%
+-commutative98.9%
associate-+r+98.9%
+-commutative98.9%
Applied egg-rr98.9%
Taylor expanded in y around -inf 20.0%
mul-1-neg20.0%
unsub-neg20.0%
neg-mul-120.0%
+-commutative20.0%
unsub-neg20.0%
distribute-lft-in20.0%
metadata-eval20.0%
neg-mul-120.0%
unsub-neg20.0%
Simplified20.0%
Taylor expanded in x around inf 6.8%
if -2.6e9 < x Initial program 74.8%
times-frac89.2%
+-commutative89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in x around 0 50.0%
+-commutative50.0%
Simplified50.0%
Taylor expanded in y around 0 29.0%
Final simplification23.5%
(FPCore (x y) :precision binary64 (if (<= x -2100000000.0) (/ y (* x x)) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -2100000000.0) {
tmp = y / (x * 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 <= (-2100000000.0d0)) then
tmp = y / (x * x)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2100000000.0) {
tmp = y / (x * x);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2100000000.0: tmp = y / (x * x) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2100000000.0) tmp = Float64(y / Float64(x * x)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2100000000.0) tmp = y / (x * x); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2100000000.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2100000000:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -2.1e9Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
Taylor expanded in x around inf 76.8%
unpow276.8%
Applied egg-rr76.8%
if -2.1e9 < x Initial program 74.8%
times-frac89.2%
+-commutative89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in x around 0 50.0%
+-commutative50.0%
Simplified50.0%
Taylor expanded in y around 0 29.0%
Final simplification41.0%
(FPCore (x y) :precision binary64 (if (<= x -2100000000.0) (/ (/ y x) x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -2100000000.0) {
tmp = (y / x) / 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 <= (-2100000000.0d0)) then
tmp = (y / x) / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -2100000000.0) {
tmp = (y / x) / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2100000000.0: tmp = (y / x) / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2100000000.0) tmp = Float64(Float64(y / x) / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2100000000.0) tmp = (y / x) / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2100000000.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2100000000:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -2.1e9Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
Taylor expanded in x around inf 76.8%
*-un-lft-identity76.8%
unpow276.8%
times-frac83.4%
Applied egg-rr83.4%
associate-*l/83.4%
*-lft-identity83.4%
Simplified83.4%
if -2.1e9 < x Initial program 74.8%
times-frac89.2%
+-commutative89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in x around 0 50.0%
+-commutative50.0%
Simplified50.0%
Taylor expanded in y around 0 29.0%
Final simplification42.6%
(FPCore (x y) :precision binary64 (if (<= x -7500000000.0) (/ 0.5 x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -7500000000.0) {
tmp = 0.5 / 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 <= (-7500000000.0d0)) then
tmp = 0.5d0 / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -7500000000.0) {
tmp = 0.5 / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -7500000000.0: tmp = 0.5 / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -7500000000.0) tmp = Float64(0.5 / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -7500000000.0) tmp = 0.5 / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -7500000000.0], N[(0.5 / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7500000000:\\
\;\;\;\;\frac{0.5}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -7.5e9Initial program 63.7%
associate-*l*63.7%
+-commutative63.7%
+-commutative63.7%
+-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in40.1%
fma-def83.1%
+-commutative83.1%
+-commutative83.1%
cube-unmult83.1%
+-commutative83.1%
Simplified83.1%
associate-*r/63.7%
*-commutative63.7%
fma-udef38.5%
cube-mult38.5%
distribute-rgt1-in63.7%
*-commutative63.7%
+-commutative63.7%
associate-+r+63.7%
frac-times89.6%
*-commutative89.6%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times98.9%
*-un-lft-identity98.9%
associate-+r+98.9%
+-commutative98.9%
associate-+r+98.9%
+-commutative98.9%
Applied egg-rr98.9%
Taylor expanded in y around -inf 20.0%
mul-1-neg20.0%
unsub-neg20.0%
neg-mul-120.0%
+-commutative20.0%
unsub-neg20.0%
distribute-lft-in20.0%
metadata-eval20.0%
neg-mul-120.0%
unsub-neg20.0%
Simplified20.0%
Taylor expanded in x around inf 6.2%
if -7.5e9 < x Initial program 74.8%
times-frac89.2%
+-commutative89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in x around 0 50.0%
+-commutative50.0%
Simplified50.0%
Taylor expanded in y around 0 29.0%
Final simplification23.3%
(FPCore (x y) :precision binary64 (/ 0.5 x))
double code(double x, double y) {
return 0.5 / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 0.5d0 / x
end function
public static double code(double x, double y) {
return 0.5 / x;
}
def code(x, y): return 0.5 / x
function code(x, y) return Float64(0.5 / x) end
function tmp = code(x, y) tmp = 0.5 / x; end
code[x_, y_] := N[(0.5 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5}{x}
\end{array}
Initial program 72.0%
associate-*l*72.0%
+-commutative72.0%
+-commutative72.0%
+-commutative72.0%
associate-*l*72.0%
*-commutative72.0%
associate-*r/84.7%
*-commutative84.7%
distribute-rgt1-in68.3%
fma-def84.7%
+-commutative84.7%
+-commutative84.7%
cube-unmult84.8%
+-commutative84.8%
Simplified84.8%
associate-*r/72.0%
*-commutative72.0%
fma-udef60.7%
cube-mult60.6%
distribute-rgt1-in72.0%
*-commutative72.0%
+-commutative72.0%
associate-+r+72.0%
frac-times89.3%
*-commutative89.3%
associate-/r*99.7%
associate-*r/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times99.0%
*-un-lft-identity99.0%
associate-+r+99.0%
+-commutative99.0%
associate-+r+99.0%
+-commutative99.0%
Applied egg-rr99.0%
Taylor expanded in y around -inf 42.5%
mul-1-neg42.5%
unsub-neg42.5%
neg-mul-142.5%
+-commutative42.5%
unsub-neg42.5%
distribute-lft-in42.5%
metadata-eval42.5%
neg-mul-142.5%
unsub-neg42.5%
Simplified42.5%
Taylor expanded in x around inf 4.4%
Final simplification4.4%
(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 2023308
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))