
(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 21 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 (+ y x)) (/ (/ x (+ y (+ x 1.0))) (+ y x))))
double code(double x, double y) {
return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y / (y + x)) * ((x / (y + (x + 1.0d0))) / (y + x))
end function
public static double code(double x, double y) {
return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x));
}
def code(x, y): return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x))
function code(x, y) return Float64(Float64(y / Float64(y + x)) * Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + x))) end
function tmp = code(x, y) tmp = (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x)); end
code[x_, y_] := N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{y + x} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{y + x}
\end{array}
Initial program 71.7%
associate-+r+71.7%
*-commutative71.7%
frac-times90.0%
associate-*l/85.2%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(if (<= y 1.55e-212)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= y 0.00012)
(* x (/ (/ y (+ y x)) (+ y x)))
(if (<= y 2.95e+21)
(/ (/ x (+ y 1.0)) (+ y x))
(if (<= y 1.3e+154)
(* (/ y (* (+ y x) (+ y x))) (/ x y))
(* (/ 1.0 y) (/ x (+ x (+ y 1.0)))))))))
double code(double x, double y) {
double tmp;
if (y <= 1.55e-212) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 0.00012) {
tmp = x * ((y / (y + x)) / (y + x));
} else if (y <= 2.95e+21) {
tmp = (x / (y + 1.0)) / (y + x);
} else if (y <= 1.3e+154) {
tmp = (y / ((y + x) * (y + x))) * (x / y);
} else {
tmp = (1.0 / y) * (x / (x + (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.55d-212) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (y <= 0.00012d0) then
tmp = x * ((y / (y + x)) / (y + x))
else if (y <= 2.95d+21) then
tmp = (x / (y + 1.0d0)) / (y + x)
else if (y <= 1.3d+154) then
tmp = (y / ((y + x) * (y + x))) * (x / y)
else
tmp = (1.0d0 / y) * (x / (x + (y + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.55e-212) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 0.00012) {
tmp = x * ((y / (y + x)) / (y + x));
} else if (y <= 2.95e+21) {
tmp = (x / (y + 1.0)) / (y + x);
} else if (y <= 1.3e+154) {
tmp = (y / ((y + x) * (y + x))) * (x / y);
} else {
tmp = (1.0 / y) * (x / (x + (y + 1.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.55e-212: tmp = (y / (x + 1.0)) / (y + x) elif y <= 0.00012: tmp = x * ((y / (y + x)) / (y + x)) elif y <= 2.95e+21: tmp = (x / (y + 1.0)) / (y + x) elif y <= 1.3e+154: tmp = (y / ((y + x) * (y + x))) * (x / y) else: tmp = (1.0 / y) * (x / (x + (y + 1.0))) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.55e-212) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (y <= 0.00012) tmp = Float64(x * Float64(Float64(y / Float64(y + x)) / Float64(y + x))); elseif (y <= 2.95e+21) tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); elseif (y <= 1.3e+154) tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(y + x))) * Float64(x / y)); else tmp = Float64(Float64(1.0 / y) * Float64(x / Float64(x + Float64(y + 1.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.55e-212) tmp = (y / (x + 1.0)) / (y + x); elseif (y <= 0.00012) tmp = x * ((y / (y + x)) / (y + x)); elseif (y <= 2.95e+21) tmp = (x / (y + 1.0)) / (y + x); elseif (y <= 1.3e+154) tmp = (y / ((y + x) * (y + x))) * (x / y); else tmp = (1.0 / y) * (x / (x + (y + 1.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.55e-212], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00012], N[(x * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+21], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+154], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{-212}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 0.00012:\\
\;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
if y < 1.55000000000000003e-212Initial program 69.5%
associate-*l*69.5%
+-commutative69.5%
+-commutative69.5%
+-commutative69.5%
associate-*l*69.5%
associate-*l/81.7%
*-commutative81.7%
*-commutative81.7%
distribute-rgt1-in52.0%
fma-def81.7%
+-commutative81.7%
+-commutative81.7%
cube-unmult81.7%
+-commutative81.7%
Simplified81.7%
associate-*r/69.5%
fma-udef46.5%
cube-mult46.5%
distribute-rgt1-in69.5%
associate-+r+69.5%
*-commutative69.5%
frac-times88.9%
associate-*l/82.3%
associate-/r*86.7%
associate-+r+86.7%
+-commutative86.7%
associate-+l+86.7%
Applied egg-rr86.7%
Taylor expanded in y around 0 50.9%
+-commutative50.9%
Simplified50.9%
if 1.55000000000000003e-212 < y < 1.20000000000000003e-4Initial program 83.1%
associate-*l*83.2%
+-commutative83.2%
+-commutative83.2%
+-commutative83.2%
associate-*l*83.1%
*-commutative83.1%
times-frac91.6%
+-commutative91.6%
+-commutative91.6%
+-commutative91.6%
associate-+l+91.6%
Simplified91.6%
Taylor expanded in y around 0 91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in x around 0 69.5%
associate-/r*77.5%
div-inv77.5%
Applied egg-rr77.5%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
if 1.20000000000000003e-4 < y < 2.95e21Initial program 99.6%
associate-*l*99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-*l*99.6%
associate-*l/92.4%
*-commutative92.4%
*-commutative92.4%
distribute-rgt1-in92.2%
fma-def92.2%
+-commutative92.2%
+-commutative92.2%
cube-unmult92.7%
+-commutative92.7%
Simplified92.7%
associate-*r/100.0%
fma-udef100.0%
cube-mult99.4%
distribute-rgt1-in99.6%
associate-+r+99.6%
*-commutative99.6%
frac-times99.3%
associate-*l/99.8%
associate-/r*100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
+-commutative99.8%
Simplified99.8%
if 2.95e21 < y < 1.29999999999999994e154Initial program 70.8%
associate-*l*70.8%
+-commutative70.8%
+-commutative70.8%
+-commutative70.8%
associate-*l*70.8%
*-commutative70.8%
times-frac96.0%
+-commutative96.0%
+-commutative96.0%
+-commutative96.0%
associate-+l+96.0%
Simplified96.0%
Taylor expanded in y around inf 85.1%
if 1.29999999999999994e154 < y Initial program 64.6%
associate-*l*64.6%
+-commutative64.6%
+-commutative64.6%
+-commutative64.6%
associate-*l*64.6%
*-commutative64.6%
times-frac87.1%
+-commutative87.1%
+-commutative87.1%
+-commutative87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in y around inf 92.3%
Final simplification65.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (* (+ y x) (+ y x)))))
(if (<= y 4e-164)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= y 0.14)
(* t_0 (/ x (+ x 1.0)))
(if (<= y 2.95e+21)
(/ (/ x (+ y 1.0)) (+ y x))
(if (<= y 9e+153)
(* t_0 (/ x y))
(* (/ 1.0 y) (/ x (+ x (+ y 1.0))))))))))
double code(double x, double y) {
double t_0 = y / ((y + x) * (y + x));
double tmp;
if (y <= 4e-164) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 0.14) {
tmp = t_0 * (x / (x + 1.0));
} else if (y <= 2.95e+21) {
tmp = (x / (y + 1.0)) / (y + x);
} else if (y <= 9e+153) {
tmp = t_0 * (x / y);
} else {
tmp = (1.0 / y) * (x / (x + (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 = y / ((y + x) * (y + x))
if (y <= 4d-164) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (y <= 0.14d0) then
tmp = t_0 * (x / (x + 1.0d0))
else if (y <= 2.95d+21) then
tmp = (x / (y + 1.0d0)) / (y + x)
else if (y <= 9d+153) then
tmp = t_0 * (x / y)
else
tmp = (1.0d0 / y) * (x / (x + (y + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / ((y + x) * (y + x));
double tmp;
if (y <= 4e-164) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 0.14) {
tmp = t_0 * (x / (x + 1.0));
} else if (y <= 2.95e+21) {
tmp = (x / (y + 1.0)) / (y + x);
} else if (y <= 9e+153) {
tmp = t_0 * (x / y);
} else {
tmp = (1.0 / y) * (x / (x + (y + 1.0)));
}
return tmp;
}
def code(x, y): t_0 = y / ((y + x) * (y + x)) tmp = 0 if y <= 4e-164: tmp = (y / (x + 1.0)) / (y + x) elif y <= 0.14: tmp = t_0 * (x / (x + 1.0)) elif y <= 2.95e+21: tmp = (x / (y + 1.0)) / (y + x) elif y <= 9e+153: tmp = t_0 * (x / y) else: tmp = (1.0 / y) * (x / (x + (y + 1.0))) return tmp
function code(x, y) t_0 = Float64(y / Float64(Float64(y + x) * Float64(y + x))) tmp = 0.0 if (y <= 4e-164) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (y <= 0.14) tmp = Float64(t_0 * Float64(x / Float64(x + 1.0))); elseif (y <= 2.95e+21) tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); elseif (y <= 9e+153) tmp = Float64(t_0 * Float64(x / y)); else tmp = Float64(Float64(1.0 / y) * Float64(x / Float64(x + Float64(y + 1.0)))); end return tmp end
function tmp_2 = code(x, y) t_0 = y / ((y + x) * (y + x)); tmp = 0.0; if (y <= 4e-164) tmp = (y / (x + 1.0)) / (y + x); elseif (y <= 0.14) tmp = t_0 * (x / (x + 1.0)); elseif (y <= 2.95e+21) tmp = (x / (y + 1.0)) / (y + x); elseif (y <= 9e+153) tmp = t_0 * (x / y); else tmp = (1.0 / y) * (x / (x + (y + 1.0))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4e-164], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.14], N[(t$95$0 * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+21], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+153], N[(t$95$0 * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{if}\;y \leq 4 \cdot 10^{-164}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 0.14:\\
\;\;\;\;t_0 \cdot \frac{x}{x + 1}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+21}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+153}:\\
\;\;\;\;t_0 \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
if y < 3.99999999999999985e-164Initial program 69.0%
associate-*l*69.0%
+-commutative69.0%
+-commutative69.0%
+-commutative69.0%
associate-*l*69.0%
associate-*l/80.8%
*-commutative80.8%
*-commutative80.8%
distribute-rgt1-in52.5%
fma-def80.8%
+-commutative80.8%
+-commutative80.8%
cube-unmult80.8%
+-commutative80.8%
Simplified80.8%
associate-*r/69.0%
fma-udef47.0%
cube-mult47.0%
distribute-rgt1-in69.0%
associate-+r+69.0%
*-commutative69.0%
frac-times87.7%
associate-*l/81.2%
associate-/r*85.5%
associate-+r+85.5%
+-commutative85.5%
associate-+l+85.5%
Applied egg-rr85.5%
Taylor expanded in y around 0 51.8%
+-commutative51.8%
Simplified51.8%
if 3.99999999999999985e-164 < y < 0.14000000000000001Initial program 89.7%
associate-*l*89.8%
+-commutative89.8%
+-commutative89.8%
+-commutative89.8%
associate-*l*89.7%
*-commutative89.7%
times-frac99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in y around 0 99.4%
+-commutative99.4%
Simplified99.4%
if 0.14000000000000001 < y < 2.95e21Initial program 99.6%
associate-*l*99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
associate-*l*99.6%
associate-*l/92.4%
*-commutative92.4%
*-commutative92.4%
distribute-rgt1-in92.2%
fma-def92.2%
+-commutative92.2%
+-commutative92.2%
cube-unmult92.7%
+-commutative92.7%
Simplified92.7%
associate-*r/100.0%
fma-udef100.0%
cube-mult99.4%
distribute-rgt1-in99.6%
associate-+r+99.6%
*-commutative99.6%
frac-times99.3%
associate-*l/99.8%
associate-/r*100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
+-commutative99.8%
Simplified99.8%
if 2.95e21 < y < 9.0000000000000002e153Initial program 70.8%
associate-*l*70.8%
+-commutative70.8%
+-commutative70.8%
+-commutative70.8%
associate-*l*70.8%
*-commutative70.8%
times-frac96.0%
+-commutative96.0%
+-commutative96.0%
+-commutative96.0%
associate-+l+96.0%
Simplified96.0%
Taylor expanded in y around inf 85.1%
if 9.0000000000000002e153 < y Initial program 64.6%
associate-*l*64.6%
+-commutative64.6%
+-commutative64.6%
+-commutative64.6%
associate-*l*64.6%
*-commutative64.6%
times-frac87.1%
+-commutative87.1%
+-commutative87.1%
+-commutative87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in y around inf 92.3%
Final simplification67.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (/ x y) (/ 1.0 y))))
(if (<= x -1.0)
(/ (/ y x) x)
(if (<= x -5.3e-107)
(/ y x)
(if (<= x -8.8e-148)
t_0
(if (<= x -1.85e-171)
(/ y x)
(if (or (<= x -8e-184) (not (<= x 2.7e-125))) t_0 (/ x y))))))))
double code(double x, double y) {
double t_0 = (x / y) * (1.0 / y);
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -5.3e-107) {
tmp = y / x;
} else if (x <= -8.8e-148) {
tmp = t_0;
} else if (x <= -1.85e-171) {
tmp = y / x;
} else if ((x <= -8e-184) || !(x <= 2.7e-125)) {
tmp = t_0;
} else {
tmp = x / 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) * (1.0d0 / y)
if (x <= (-1.0d0)) then
tmp = (y / x) / x
else if (x <= (-5.3d-107)) then
tmp = y / x
else if (x <= (-8.8d-148)) then
tmp = t_0
else if (x <= (-1.85d-171)) then
tmp = y / x
else if ((x <= (-8d-184)) .or. (.not. (x <= 2.7d-125))) then
tmp = t_0
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / y) * (1.0 / y);
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -5.3e-107) {
tmp = y / x;
} else if (x <= -8.8e-148) {
tmp = t_0;
} else if (x <= -1.85e-171) {
tmp = y / x;
} else if ((x <= -8e-184) || !(x <= 2.7e-125)) {
tmp = t_0;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): t_0 = (x / y) * (1.0 / y) tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -5.3e-107: tmp = y / x elif x <= -8.8e-148: tmp = t_0 elif x <= -1.85e-171: tmp = y / x elif (x <= -8e-184) or not (x <= 2.7e-125): tmp = t_0 else: tmp = x / y return tmp
function code(x, y) t_0 = Float64(Float64(x / y) * Float64(1.0 / y)) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) / x); elseif (x <= -5.3e-107) tmp = Float64(y / x); elseif (x <= -8.8e-148) tmp = t_0; elseif (x <= -1.85e-171) tmp = Float64(y / x); elseif ((x <= -8e-184) || !(x <= 2.7e-125)) tmp = t_0; else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / y) * (1.0 / y); tmp = 0.0; if (x <= -1.0) tmp = (y / x) / x; elseif (x <= -5.3e-107) tmp = y / x; elseif (x <= -8.8e-148) tmp = t_0; elseif (x <= -1.85e-171) tmp = y / x; elseif ((x <= -8e-184) || ~((x <= 2.7e-125))) tmp = t_0; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -5.3e-107], N[(y / x), $MachinePrecision], If[LessEqual[x, -8.8e-148], t$95$0, If[LessEqual[x, -1.85e-171], N[(y / x), $MachinePrecision], If[Or[LessEqual[x, -8e-184], N[Not[LessEqual[x, 2.7e-125]], $MachinePrecision]], t$95$0, N[(x / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y} \cdot \frac{1}{y}\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -5.3 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-148}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-171}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-184} \lor \neg \left(x \leq 2.7 \cdot 10^{-125}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1Initial program 61.6%
associate-+r+61.6%
*-commutative61.6%
frac-times85.6%
associate-*l/85.6%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 74.1%
Taylor expanded in y around 0 73.8%
un-div-inv73.8%
Applied egg-rr73.8%
if -1 < x < -5.3e-107 or -8.80000000000000068e-148 < x < -1.85000000000000006e-171Initial program 88.0%
associate-*l*88.0%
+-commutative88.0%
+-commutative88.0%
+-commutative88.0%
associate-*l*88.0%
*-commutative88.0%
times-frac96.2%
+-commutative96.2%
+-commutative96.2%
+-commutative96.2%
associate-+l+96.2%
Simplified96.2%
Taylor expanded in y around 0 69.2%
+-commutative69.2%
Simplified69.2%
Taylor expanded in x around 0 66.4%
Taylor expanded in y around 0 33.4%
if -5.3e-107 < x < -8.80000000000000068e-148 or -1.85000000000000006e-171 < x < -8.0000000000000005e-184 or 2.6999999999999998e-125 < x Initial program 72.5%
associate-*l*72.5%
+-commutative72.5%
+-commutative72.5%
+-commutative72.5%
associate-*l*72.5%
*-commutative72.5%
times-frac95.2%
+-commutative95.2%
+-commutative95.2%
+-commutative95.2%
associate-+l+95.2%
Simplified95.2%
Taylor expanded in y around inf 49.9%
Taylor expanded in y around inf 43.6%
if -8.0000000000000005e-184 < x < 2.6999999999999998e-125Initial program 71.3%
associate-*l*71.4%
+-commutative71.4%
+-commutative71.4%
+-commutative71.4%
associate-*l*71.3%
associate-*l/79.8%
*-commutative79.8%
*-commutative79.8%
distribute-rgt1-in70.1%
fma-def79.8%
+-commutative79.8%
+-commutative79.8%
cube-unmult79.8%
+-commutative79.8%
Simplified79.8%
associate-*r/71.3%
fma-udef61.6%
cube-mult61.6%
distribute-rgt1-in71.3%
associate-+r+71.3%
*-commutative71.3%
frac-times83.1%
associate-*l/71.3%
associate-/r*71.9%
associate-+r+71.9%
+-commutative71.9%
associate-+l+71.9%
Applied egg-rr71.9%
Taylor expanded in x around 0 71.9%
*-commutative71.9%
+-commutative71.9%
Simplified71.9%
Taylor expanded in y around 0 54.2%
Taylor expanded in x around 0 70.9%
Final simplification56.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ y (+ y x)) (+ y x))))
(if (<= y 5.8e-211)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= y 6e-5)
(* x t_0)
(if (or (<= y 6e+44) (not (<= y 3.8e+76)))
(/ (/ x (+ y (+ x 1.0))) (+ y x))
t_0)))))
double code(double x, double y) {
double t_0 = (y / (y + x)) / (y + x);
double tmp;
if (y <= 5.8e-211) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 6e-5) {
tmp = x * t_0;
} else if ((y <= 6e+44) || !(y <= 3.8e+76)) {
tmp = (x / (y + (x + 1.0))) / (y + x);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y / (y + x)) / (y + x)
if (y <= 5.8d-211) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (y <= 6d-5) then
tmp = x * t_0
else if ((y <= 6d+44) .or. (.not. (y <= 3.8d+76))) then
tmp = (x / (y + (x + 1.0d0))) / (y + x)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / (y + x)) / (y + x);
double tmp;
if (y <= 5.8e-211) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 6e-5) {
tmp = x * t_0;
} else if ((y <= 6e+44) || !(y <= 3.8e+76)) {
tmp = (x / (y + (x + 1.0))) / (y + x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (y / (y + x)) / (y + x) tmp = 0 if y <= 5.8e-211: tmp = (y / (x + 1.0)) / (y + x) elif y <= 6e-5: tmp = x * t_0 elif (y <= 6e+44) or not (y <= 3.8e+76): tmp = (x / (y + (x + 1.0))) / (y + x) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(y / Float64(y + x)) / Float64(y + x)) tmp = 0.0 if (y <= 5.8e-211) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (y <= 6e-5) tmp = Float64(x * t_0); elseif ((y <= 6e+44) || !(y <= 3.8e+76)) tmp = Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (y / (y + x)) / (y + x); tmp = 0.0; if (y <= 5.8e-211) tmp = (y / (x + 1.0)) / (y + x); elseif (y <= 6e-5) tmp = x * t_0; elseif ((y <= 6e+44) || ~((y <= 3.8e+76))) tmp = (x / (y + (x + 1.0))) / (y + x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.8e-211], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-5], N[(x * t$95$0), $MachinePrecision], If[Or[LessEqual[y, 6e+44], N[Not[LessEqual[y, 3.8e+76]], $MachinePrecision]], N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{if}\;y \leq 5.8 \cdot 10^{-211}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-5}:\\
\;\;\;\;x \cdot t_0\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+44} \lor \neg \left(y \leq 3.8 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y < 5.80000000000000029e-211Initial program 69.5%
associate-*l*69.5%
+-commutative69.5%
+-commutative69.5%
+-commutative69.5%
associate-*l*69.5%
associate-*l/81.7%
*-commutative81.7%
*-commutative81.7%
distribute-rgt1-in52.0%
fma-def81.7%
+-commutative81.7%
+-commutative81.7%
cube-unmult81.7%
+-commutative81.7%
Simplified81.7%
associate-*r/69.5%
fma-udef46.5%
cube-mult46.5%
distribute-rgt1-in69.5%
associate-+r+69.5%
*-commutative69.5%
frac-times88.9%
associate-*l/82.3%
associate-/r*86.7%
associate-+r+86.7%
+-commutative86.7%
associate-+l+86.7%
Applied egg-rr86.7%
Taylor expanded in y around 0 50.9%
+-commutative50.9%
Simplified50.9%
if 5.80000000000000029e-211 < y < 6.00000000000000015e-5Initial program 83.1%
associate-*l*83.2%
+-commutative83.2%
+-commutative83.2%
+-commutative83.2%
associate-*l*83.1%
*-commutative83.1%
times-frac91.6%
+-commutative91.6%
+-commutative91.6%
+-commutative91.6%
associate-+l+91.6%
Simplified91.6%
Taylor expanded in y around 0 91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in x around 0 69.5%
associate-/r*77.5%
div-inv77.5%
Applied egg-rr77.5%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
if 6.00000000000000015e-5 < y < 5.99999999999999974e44 or 3.80000000000000024e76 < y Initial program 71.1%
associate-+r+71.1%
*-commutative71.1%
frac-times91.4%
associate-*l/91.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 86.0%
if 5.99999999999999974e44 < y < 3.80000000000000024e76Initial program 66.1%
associate-*l*66.1%
+-commutative66.1%
+-commutative66.1%
+-commutative66.1%
associate-*l*66.1%
associate-*l/99.5%
*-commutative99.5%
*-commutative99.5%
distribute-rgt1-in66.1%
fma-def99.5%
+-commutative99.5%
+-commutative99.5%
cube-unmult99.5%
+-commutative99.5%
Simplified99.5%
associate-*r/66.1%
fma-udef66.1%
cube-mult66.1%
distribute-rgt1-in66.1%
associate-+r+66.1%
*-commutative66.1%
frac-times99.5%
associate-*l/99.5%
associate-/r*99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+l+99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 50.2%
Final simplification63.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ y (+ x 1.0))))
(if (<= y 4e+101)
(* y (/ (/ x (* (+ y x) t_0)) (+ y x)))
(/ (/ x t_0) (+ y (* x 2.0))))))
double code(double x, double y) {
double t_0 = y + (x + 1.0);
double tmp;
if (y <= 4e+101) {
tmp = y * ((x / ((y + x) * t_0)) / (y + x));
} else {
tmp = (x / t_0) / (y + (x * 2.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y + (x + 1.0d0)
if (y <= 4d+101) then
tmp = y * ((x / ((y + x) * t_0)) / (y + x))
else
tmp = (x / t_0) / (y + (x * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y + (x + 1.0);
double tmp;
if (y <= 4e+101) {
tmp = y * ((x / ((y + x) * t_0)) / (y + x));
} else {
tmp = (x / t_0) / (y + (x * 2.0));
}
return tmp;
}
def code(x, y): t_0 = y + (x + 1.0) tmp = 0 if y <= 4e+101: tmp = y * ((x / ((y + x) * t_0)) / (y + x)) else: tmp = (x / t_0) / (y + (x * 2.0)) return tmp
function code(x, y) t_0 = Float64(y + Float64(x + 1.0)) tmp = 0.0 if (y <= 4e+101) tmp = Float64(y * Float64(Float64(x / Float64(Float64(y + x) * t_0)) / Float64(y + x))); else tmp = Float64(Float64(x / t_0) / Float64(y + Float64(x * 2.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = y + (x + 1.0); tmp = 0.0; if (y <= 4e+101) tmp = y * ((x / ((y + x) * t_0)) / (y + x)); else tmp = (x / t_0) / (y + (x * 2.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4e+101], N[(y * N[(N[(x / N[(N[(y + x), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t$95$0), $MachinePrecision] / N[(y + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y + \left(x + 1\right)\\
\mathbf{if}\;y \leq 4 \cdot 10^{+101}:\\
\;\;\;\;y \cdot \frac{\frac{x}{\left(y + x\right) \cdot t_0}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t_0}}{y + x \cdot 2}\\
\end{array}
\end{array}
if y < 3.9999999999999999e101Initial program 73.6%
associate-*l*73.6%
+-commutative73.6%
+-commutative73.6%
+-commutative73.6%
associate-*l*73.6%
associate-*l/84.2%
*-commutative84.2%
*-commutative84.2%
distribute-rgt1-in61.2%
fma-def84.2%
+-commutative84.2%
+-commutative84.2%
cube-unmult84.3%
+-commutative84.3%
Simplified84.3%
associate-*r/73.6%
fma-udef55.9%
cube-mult55.9%
distribute-rgt1-in73.6%
associate-+r+73.6%
*-commutative73.6%
frac-times90.5%
associate-*l/84.7%
associate-/r*88.0%
associate-+r+88.0%
+-commutative88.0%
associate-+l+88.0%
Applied egg-rr88.0%
associate-/l/84.7%
frac-times99.9%
associate-*l/99.8%
*-un-lft-identity99.8%
times-frac94.4%
/-rgt-identity94.4%
associate-/l/94.3%
+-commutative94.3%
+-commutative94.3%
Applied egg-rr94.3%
if 3.9999999999999999e101 < y Initial program 62.9%
associate-+r+62.9%
*-commutative62.9%
frac-times87.8%
associate-*l/87.8%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times99.8%
*-un-lft-identity99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 88.0%
*-commutative88.0%
Simplified88.0%
Final simplification93.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ y (+ y x)) (+ y x))))
(if (<= y 2.25e-212)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= y 0.016)
(* x t_0)
(if (<= y 6e+44)
(/ (/ x (+ y 1.0)) (+ y x))
(if (<= y 4e+76) t_0 (/ (/ x (+ y x)) (+ y x))))))))
double code(double x, double y) {
double t_0 = (y / (y + x)) / (y + x);
double tmp;
if (y <= 2.25e-212) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 0.016) {
tmp = x * t_0;
} else if (y <= 6e+44) {
tmp = (x / (y + 1.0)) / (y + x);
} else if (y <= 4e+76) {
tmp = t_0;
} else {
tmp = (x / (y + x)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y / (y + x)) / (y + x)
if (y <= 2.25d-212) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (y <= 0.016d0) then
tmp = x * t_0
else if (y <= 6d+44) then
tmp = (x / (y + 1.0d0)) / (y + x)
else if (y <= 4d+76) then
tmp = t_0
else
tmp = (x / (y + x)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / (y + x)) / (y + x);
double tmp;
if (y <= 2.25e-212) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 0.016) {
tmp = x * t_0;
} else if (y <= 6e+44) {
tmp = (x / (y + 1.0)) / (y + x);
} else if (y <= 4e+76) {
tmp = t_0;
} else {
tmp = (x / (y + x)) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = (y / (y + x)) / (y + x) tmp = 0 if y <= 2.25e-212: tmp = (y / (x + 1.0)) / (y + x) elif y <= 0.016: tmp = x * t_0 elif y <= 6e+44: tmp = (x / (y + 1.0)) / (y + x) elif y <= 4e+76: tmp = t_0 else: tmp = (x / (y + x)) / (y + x) return tmp
function code(x, y) t_0 = Float64(Float64(y / Float64(y + x)) / Float64(y + x)) tmp = 0.0 if (y <= 2.25e-212) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (y <= 0.016) tmp = Float64(x * t_0); elseif (y <= 6e+44) tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); elseif (y <= 4e+76) tmp = t_0; else tmp = Float64(Float64(x / Float64(y + x)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = (y / (y + x)) / (y + x); tmp = 0.0; if (y <= 2.25e-212) tmp = (y / (x + 1.0)) / (y + x); elseif (y <= 0.016) tmp = x * t_0; elseif (y <= 6e+44) tmp = (x / (y + 1.0)) / (y + x); elseif (y <= 4e+76) tmp = t_0; else tmp = (x / (y + x)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.25e-212], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.016], N[(x * t$95$0), $MachinePrecision], If[LessEqual[y, 6e+44], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+76], t$95$0, N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{if}\;y \leq 2.25 \cdot 10^{-212}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 0.016:\\
\;\;\;\;x \cdot t_0\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+44}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+76}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{y + x}\\
\end{array}
\end{array}
if y < 2.2499999999999999e-212Initial program 69.5%
associate-*l*69.5%
+-commutative69.5%
+-commutative69.5%
+-commutative69.5%
associate-*l*69.5%
associate-*l/81.7%
*-commutative81.7%
*-commutative81.7%
distribute-rgt1-in52.0%
fma-def81.7%
+-commutative81.7%
+-commutative81.7%
cube-unmult81.7%
+-commutative81.7%
Simplified81.7%
associate-*r/69.5%
fma-udef46.5%
cube-mult46.5%
distribute-rgt1-in69.5%
associate-+r+69.5%
*-commutative69.5%
frac-times88.9%
associate-*l/82.3%
associate-/r*86.7%
associate-+r+86.7%
+-commutative86.7%
associate-+l+86.7%
Applied egg-rr86.7%
Taylor expanded in y around 0 50.9%
+-commutative50.9%
Simplified50.9%
if 2.2499999999999999e-212 < y < 0.016Initial program 83.1%
associate-*l*83.2%
+-commutative83.2%
+-commutative83.2%
+-commutative83.2%
associate-*l*83.1%
*-commutative83.1%
times-frac91.6%
+-commutative91.6%
+-commutative91.6%
+-commutative91.6%
associate-+l+91.6%
Simplified91.6%
Taylor expanded in y around 0 91.6%
+-commutative91.6%
Simplified91.6%
Taylor expanded in x around 0 69.5%
associate-/r*77.5%
div-inv77.5%
Applied egg-rr77.5%
associate-*r/77.5%
*-rgt-identity77.5%
Simplified77.5%
if 0.016 < y < 5.99999999999999974e44Initial program 99.8%
associate-*l*99.9%
+-commutative99.9%
+-commutative99.9%
+-commutative99.9%
associate-*l*99.8%
associate-*l/95.6%
*-commutative95.6%
*-commutative95.6%
distribute-rgt1-in95.5%
fma-def95.5%
+-commutative95.5%
+-commutative95.5%
cube-unmult95.8%
+-commutative95.8%
Simplified95.8%
associate-*r/100.0%
fma-udef100.0%
cube-mult99.7%
distribute-rgt1-in99.8%
associate-+r+99.8%
*-commutative99.8%
frac-times99.4%
associate-*l/99.8%
associate-/r*99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 93.0%
*-commutative93.0%
+-commutative93.0%
Simplified93.0%
Taylor expanded in x around 0 92.9%
+-commutative92.9%
Simplified92.9%
if 5.99999999999999974e44 < y < 4.0000000000000002e76Initial program 66.1%
associate-*l*66.1%
+-commutative66.1%
+-commutative66.1%
+-commutative66.1%
associate-*l*66.1%
associate-*l/99.5%
*-commutative99.5%
*-commutative99.5%
distribute-rgt1-in66.1%
fma-def99.5%
+-commutative99.5%
+-commutative99.5%
cube-unmult99.5%
+-commutative99.5%
Simplified99.5%
associate-*r/66.1%
fma-udef66.1%
cube-mult66.1%
distribute-rgt1-in66.1%
associate-+r+66.1%
*-commutative66.1%
frac-times99.5%
associate-*l/99.5%
associate-/r*99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+l+99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 50.2%
if 4.0000000000000002e76 < y Initial program 63.4%
associate-*l*63.4%
+-commutative63.4%
+-commutative63.4%
+-commutative63.4%
associate-*l*63.4%
associate-*l/82.8%
*-commutative82.8%
*-commutative82.8%
distribute-rgt1-in78.9%
fma-def82.8%
+-commutative82.8%
+-commutative82.8%
cube-unmult82.8%
+-commutative82.8%
Simplified82.8%
associate-*r/63.4%
fma-udef61.5%
cube-mult61.5%
distribute-rgt1-in63.4%
associate-+r+63.4%
*-commutative63.4%
frac-times89.2%
associate-*l/89.2%
associate-/r*99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 70.1%
*-commutative70.1%
+-commutative70.1%
Simplified70.1%
Taylor expanded in y around inf 84.1%
Final simplification63.5%
(FPCore (x y)
:precision binary64
(if (<= x -0.0056)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= x -2e-147)
(* x (/ y (* (+ y x) (+ y x))))
(if (<= x -2.7e-208)
(* (/ y (+ y x)) (/ x (+ y x)))
(/ (/ x (+ y (+ x 1.0))) y)))))
double code(double x, double y) {
double tmp;
if (x <= -0.0056) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (x <= -2e-147) {
tmp = x * (y / ((y + x) * (y + x)));
} else if (x <= -2.7e-208) {
tmp = (y / (y + x)) * (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 <= (-0.0056d0)) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (x <= (-2d-147)) then
tmp = x * (y / ((y + x) * (y + x)))
else if (x <= (-2.7d-208)) then
tmp = (y / (y + x)) * (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 <= -0.0056) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (x <= -2e-147) {
tmp = x * (y / ((y + x) * (y + x)));
} else if (x <= -2.7e-208) {
tmp = (y / (y + x)) * (x / (y + x));
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -0.0056: tmp = (y / (x + 1.0)) / (y + x) elif x <= -2e-147: tmp = x * (y / ((y + x) * (y + x))) elif x <= -2.7e-208: tmp = (y / (y + x)) * (x / (y + x)) else: tmp = (x / (y + (x + 1.0))) / y return tmp
function code(x, y) tmp = 0.0 if (x <= -0.0056) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (x <= -2e-147) tmp = Float64(x * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); elseif (x <= -2.7e-208) tmp = Float64(Float64(y / Float64(y + x)) * Float64(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 <= -0.0056) tmp = (y / (x + 1.0)) / (y + x); elseif (x <= -2e-147) tmp = x * (y / ((y + x) * (y + x))); elseif (x <= -2.7e-208) tmp = (y / (y + x)) * (x / (y + x)); else tmp = (x / (y + (x + 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -0.0056], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2e-147], N[(x * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.7e-208], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $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 -0.0056:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-147}:\\
\;\;\;\;x \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-208}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{x}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if x < -0.00559999999999999994Initial program 62.4%
associate-*l*62.4%
+-commutative62.4%
+-commutative62.4%
+-commutative62.4%
associate-*l*62.4%
associate-*l/80.5%
*-commutative80.5%
*-commutative80.5%
distribute-rgt1-in37.3%
fma-def80.5%
+-commutative80.5%
+-commutative80.5%
cube-unmult80.6%
+-commutative80.6%
Simplified80.6%
associate-*r/62.4%
fma-udef29.5%
cube-mult29.6%
distribute-rgt1-in62.4%
associate-+r+62.4%
*-commutative62.4%
frac-times85.8%
associate-*l/85.9%
associate-/r*99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 74.6%
+-commutative74.6%
Simplified74.6%
if -0.00559999999999999994 < x < -1.9999999999999999e-147Initial program 95.7%
associate-*l*95.7%
+-commutative95.7%
+-commutative95.7%
+-commutative95.7%
associate-*l*95.7%
*-commutative95.7%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 70.4%
+-commutative70.4%
Simplified70.4%
Taylor expanded in x around 0 70.4%
if -1.9999999999999999e-147 < x < -2.7e-208Initial program 78.7%
associate-*l*78.7%
+-commutative78.7%
+-commutative78.7%
+-commutative78.7%
associate-*l*78.7%
associate-*l/79.6%
*-commutative79.6%
*-commutative79.6%
distribute-rgt1-in74.4%
fma-def79.6%
+-commutative79.6%
+-commutative79.6%
cube-unmult79.7%
+-commutative79.7%
Simplified79.7%
associate-*r/78.8%
fma-udef73.5%
cube-mult73.4%
distribute-rgt1-in78.7%
associate-+r+78.7%
*-commutative78.7%
frac-times84.1%
associate-*l/78.7%
associate-/r*79.6%
associate-+r+79.6%
+-commutative79.6%
associate-+l+79.6%
Applied egg-rr79.6%
Taylor expanded in x around 0 79.6%
*-commutative79.6%
+-commutative79.6%
Simplified79.6%
Taylor expanded in y around 0 50.8%
associate-/l/49.9%
*-commutative49.9%
times-frac71.1%
Applied egg-rr71.1%
if -2.7e-208 < x Initial program 69.0%
associate-*l*69.0%
+-commutative69.0%
+-commutative69.0%
+-commutative69.0%
associate-*l*69.0%
*-commutative69.0%
times-frac90.1%
+-commutative90.1%
+-commutative90.1%
+-commutative90.1%
associate-+l+90.1%
Simplified90.1%
Taylor expanded in y around inf 61.9%
associate-*l/61.9%
*-un-lft-identity61.9%
associate-+r+61.9%
+-commutative61.9%
associate-+r+61.9%
Applied egg-rr61.9%
Final simplification66.2%
(FPCore (x y) :precision binary64 (if (<= x -5.2e-11) (* (/ y (* (+ y x) (+ y x))) (/ x (+ x 1.0))) (* (/ y (+ y x)) (/ (/ x (+ y 1.0)) (+ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -5.2e-11) {
tmp = (y / ((y + x) * (y + x))) * (x / (x + 1.0));
} else {
tmp = (y / (y + x)) * ((x / (y + 1.0)) / (y + x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-5.2d-11)) then
tmp = (y / ((y + x) * (y + x))) * (x / (x + 1.0d0))
else
tmp = (y / (y + x)) * ((x / (y + 1.0d0)) / (y + x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -5.2e-11) {
tmp = (y / ((y + x) * (y + x))) * (x / (x + 1.0));
} else {
tmp = (y / (y + x)) * ((x / (y + 1.0)) / (y + x));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.2e-11: tmp = (y / ((y + x) * (y + x))) * (x / (x + 1.0)) else: tmp = (y / (y + x)) * ((x / (y + 1.0)) / (y + x)) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.2e-11) tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(y + x))) * Float64(x / Float64(x + 1.0))); else tmp = Float64(Float64(y / Float64(y + x)) * Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.2e-11) tmp = (y / ((y + x) * (y + x))) * (x / (x + 1.0)); else tmp = (y / (y + x)) * ((x / (y + 1.0)) / (y + x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.2e-11], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-11}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -5.2000000000000001e-11Initial program 63.8%
associate-*l*63.8%
+-commutative63.8%
+-commutative63.8%
+-commutative63.8%
associate-*l*63.8%
*-commutative63.8%
times-frac86.4%
+-commutative86.4%
+-commutative86.4%
+-commutative86.4%
associate-+l+86.4%
Simplified86.4%
Taylor expanded in y around 0 82.9%
+-commutative82.9%
Simplified82.9%
if -5.2000000000000001e-11 < x Initial program 73.8%
associate-+r+73.8%
*-commutative73.8%
frac-times91.0%
associate-*l/84.9%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 86.0%
+-commutative86.0%
Simplified86.0%
Final simplification85.4%
(FPCore (x y)
:precision binary64
(if (<= x -0.0064)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= x -5.7e-161)
(* x (/ y (* (+ y x) (+ y x))))
(/ (/ x (+ y (+ x 1.0))) y))))
double code(double x, double y) {
double tmp;
if (x <= -0.0064) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (x <= -5.7e-161) {
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 (x <= (-0.0064d0)) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (x <= (-5.7d-161)) 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 (x <= -0.0064) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (x <= -5.7e-161) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -0.0064: tmp = (y / (x + 1.0)) / (y + x) elif x <= -5.7e-161: 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 (x <= -0.0064) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (x <= -5.7e-161) 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 (x <= -0.0064) tmp = (y / (x + 1.0)) / (y + x); elseif (x <= -5.7e-161) 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[x, -0.0064], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.7e-161], 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}\;x \leq -0.0064:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;x \leq -5.7 \cdot 10^{-161}:\\
\;\;\;\;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 x < -0.00640000000000000031Initial program 62.4%
associate-*l*62.4%
+-commutative62.4%
+-commutative62.4%
+-commutative62.4%
associate-*l*62.4%
associate-*l/80.5%
*-commutative80.5%
*-commutative80.5%
distribute-rgt1-in37.3%
fma-def80.5%
+-commutative80.5%
+-commutative80.5%
cube-unmult80.6%
+-commutative80.6%
Simplified80.6%
associate-*r/62.4%
fma-udef29.5%
cube-mult29.6%
distribute-rgt1-in62.4%
associate-+r+62.4%
*-commutative62.4%
frac-times85.8%
associate-*l/85.9%
associate-/r*99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 74.6%
+-commutative74.6%
Simplified74.6%
if -0.00640000000000000031 < x < -5.70000000000000022e-161Initial program 93.3%
associate-*l*93.3%
+-commutative93.3%
+-commutative93.3%
+-commutative93.3%
associate-*l*93.3%
*-commutative93.3%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 70.3%
+-commutative70.3%
Simplified70.3%
Taylor expanded in x around 0 70.3%
if -5.70000000000000022e-161 < x Initial program 70.1%
associate-*l*70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
associate-*l*70.1%
*-commutative70.1%
times-frac89.3%
+-commutative89.3%
+-commutative89.3%
+-commutative89.3%
associate-+l+89.3%
Simplified89.3%
Taylor expanded in y around inf 63.8%
associate-*l/63.8%
*-un-lft-identity63.8%
associate-+r+63.8%
+-commutative63.8%
associate-+r+63.8%
Applied egg-rr63.8%
Final simplification66.9%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (/ (/ y x) x) (if (<= x -6.8e-61) (/ y x) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -6.8e-61) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (y / x) / x
else if (x <= (-6.8d-61)) then
tmp = y / x
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -6.8e-61) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -6.8e-61: tmp = y / x else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) / x); elseif (x <= -6.8e-61) tmp = Float64(y / 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 <= -1.0) tmp = (y / x) / x; elseif (x <= -6.8e-61) tmp = y / x; else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -6.8e-61], N[(y / x), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -1Initial program 61.6%
associate-+r+61.6%
*-commutative61.6%
frac-times85.6%
associate-*l/85.6%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 74.1%
Taylor expanded in y around 0 73.8%
un-div-inv73.8%
Applied egg-rr73.8%
if -1 < x < -6.7999999999999996e-61Initial program 93.5%
associate-*l*93.5%
+-commutative93.5%
+-commutative93.5%
+-commutative93.5%
associate-*l*93.5%
*-commutative93.5%
times-frac99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 80.7%
+-commutative80.7%
Simplified80.7%
Taylor expanded in x around 0 75.5%
Taylor expanded in y around 0 39.5%
if -6.7999999999999996e-61 < x Initial program 72.7%
associate-*l*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-*l*72.7%
*-commutative72.7%
times-frac90.4%
+-commutative90.4%
+-commutative90.4%
+-commutative90.4%
associate-+l+90.4%
Simplified90.4%
Taylor expanded in x around 0 66.0%
+-commutative66.0%
Simplified66.0%
Final simplification66.0%
(FPCore (x y) :precision binary64 (if (<= x -6.5e-61) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -6.5e-61) {
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 (x <= (-6.5d-61)) 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 (x <= -6.5e-61) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -6.5e-61: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -6.5e-61) 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 (x <= -6.5e-61) tmp = (y / x) / (x + 1.0); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -6.5e-61], 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}\;x \leq -6.5 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -6.4999999999999994e-61Initial program 68.9%
associate-+r+68.9%
*-commutative68.9%
frac-times88.8%
associate-*l/88.8%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times98.7%
*-un-lft-identity98.7%
+-commutative98.7%
+-commutative98.7%
Applied egg-rr98.7%
Taylor expanded in y around 0 98.7%
Taylor expanded in y around 0 64.3%
associate-/r*67.2%
+-commutative67.2%
Simplified67.2%
if -6.4999999999999994e-61 < x Initial program 72.7%
associate-*l*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-*l*72.7%
associate-*l/84.2%
*-commutative84.2%
*-commutative84.2%
distribute-rgt1-in71.6%
fma-def84.2%
+-commutative84.2%
+-commutative84.2%
cube-unmult84.2%
+-commutative84.2%
Simplified84.2%
associate-*r/72.7%
fma-udef63.7%
cube-mult63.6%
distribute-rgt1-in72.7%
associate-+r+72.7%
*-commutative72.7%
frac-times90.4%
associate-*l/84.0%
associate-/r*86.8%
associate-+r+86.8%
+-commutative86.8%
associate-+l+86.8%
Applied egg-rr86.8%
Taylor expanded in x around 0 66.6%
*-commutative66.6%
+-commutative66.6%
Simplified66.6%
Taylor expanded in x around 0 66.4%
+-commutative66.4%
Simplified66.4%
Final simplification66.6%
(FPCore (x y) :precision binary64 (if (<= x -5e-61) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
double tmp;
if (x <= -5e-61) {
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 (x <= (-5d-61)) 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 (x <= -5e-61) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5e-61: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + (x + 1.0))) / y return tmp
function code(x, y) tmp = 0.0 if (x <= -5e-61) 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 (x <= -5e-61) tmp = (y / x) / (x + 1.0); else tmp = (x / (y + (x + 1.0))) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5e-61], 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}\;x \leq -5 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if x < -4.9999999999999999e-61Initial program 68.9%
associate-+r+68.9%
*-commutative68.9%
frac-times88.8%
associate-*l/88.8%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times98.7%
*-un-lft-identity98.7%
+-commutative98.7%
+-commutative98.7%
Applied egg-rr98.7%
Taylor expanded in y around 0 98.7%
Taylor expanded in y around 0 64.3%
associate-/r*67.2%
+-commutative67.2%
Simplified67.2%
if -4.9999999999999999e-61 < x Initial program 72.7%
associate-*l*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-*l*72.7%
*-commutative72.7%
times-frac90.4%
+-commutative90.4%
+-commutative90.4%
+-commutative90.4%
associate-+l+90.4%
Simplified90.4%
Taylor expanded in y around inf 66.2%
associate-*l/66.3%
*-un-lft-identity66.3%
associate-+r+66.3%
+-commutative66.3%
associate-+r+66.3%
Applied egg-rr66.3%
Final simplification66.5%
(FPCore (x y) :precision binary64 (if (<= x -2.2e-61) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x (+ y (+ x 1.0))) y)))
double code(double x, double y) {
double tmp;
if (x <= -2.2e-61) {
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 (x <= (-2.2d-61)) 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 (x <= -2.2e-61) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (y + (x + 1.0))) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.2e-61: 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 (x <= -2.2e-61) 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 (x <= -2.2e-61) 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[x, -2.2e-61], 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}\;x \leq -2.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + 1\right)}}{y}\\
\end{array}
\end{array}
if x < -2.20000000000000009e-61Initial program 68.9%
associate-*l*68.9%
+-commutative68.9%
+-commutative68.9%
+-commutative68.9%
associate-*l*68.9%
associate-*l/83.2%
*-commutative83.2%
*-commutative83.2%
distribute-rgt1-in44.6%
fma-def83.2%
+-commutative83.2%
+-commutative83.2%
cube-unmult83.3%
+-commutative83.3%
Simplified83.3%
associate-*r/68.9%
fma-udef38.5%
cube-mult38.5%
distribute-rgt1-in68.9%
associate-+r+68.9%
*-commutative68.9%
frac-times88.8%
associate-*l/88.8%
associate-/r*99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 67.6%
+-commutative67.6%
Simplified67.6%
if -2.20000000000000009e-61 < x Initial program 72.7%
associate-*l*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-*l*72.7%
*-commutative72.7%
times-frac90.4%
+-commutative90.4%
+-commutative90.4%
+-commutative90.4%
associate-+l+90.4%
Simplified90.4%
Taylor expanded in y around inf 66.2%
associate-*l/66.3%
*-un-lft-identity66.3%
associate-+r+66.3%
+-commutative66.3%
associate-+r+66.3%
Applied egg-rr66.3%
Final simplification66.6%
(FPCore (x y) :precision binary64 (if (<= x -4.2e-61) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -4.2e-61) {
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 <= (-4.2d-61)) 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 <= -4.2e-61) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.2e-61: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -4.2e-61) 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 <= -4.2e-61) tmp = y / (x * (x + 1.0)); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.2e-61], 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 -4.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -4.1999999999999998e-61Initial program 68.9%
associate-*l*68.9%
+-commutative68.9%
+-commutative68.9%
+-commutative68.9%
associate-*l*68.9%
*-commutative68.9%
times-frac88.8%
+-commutative88.8%
+-commutative88.8%
+-commutative88.8%
associate-+l+88.8%
Simplified88.8%
Taylor expanded in y around 0 64.3%
+-commutative64.3%
Simplified64.3%
if -4.1999999999999998e-61 < x Initial program 72.7%
associate-*l*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-*l*72.7%
*-commutative72.7%
times-frac90.4%
+-commutative90.4%
+-commutative90.4%
+-commutative90.4%
associate-+l+90.4%
Simplified90.4%
Taylor expanded in x around 0 66.0%
+-commutative66.0%
Simplified66.0%
Final simplification65.6%
(FPCore (x y) :precision binary64 (if (<= x -6.8e-61) (/ (/ y x) (+ x 1.0)) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -6.8e-61) {
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 <= (-6.8d-61)) 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 <= -6.8e-61) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -6.8e-61: tmp = (y / x) / (x + 1.0) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -6.8e-61) tmp = Float64(Float64(y / 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 <= -6.8e-61) tmp = (y / x) / (x + 1.0); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -6.8e-61], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -6.7999999999999996e-61Initial program 68.9%
associate-+r+68.9%
*-commutative68.9%
frac-times88.8%
associate-*l/88.8%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times98.7%
*-un-lft-identity98.7%
+-commutative98.7%
+-commutative98.7%
Applied egg-rr98.7%
Taylor expanded in y around 0 98.7%
Taylor expanded in y around 0 64.3%
associate-/r*67.2%
+-commutative67.2%
Simplified67.2%
if -6.7999999999999996e-61 < x Initial program 72.7%
associate-*l*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-*l*72.7%
*-commutative72.7%
times-frac90.4%
+-commutative90.4%
+-commutative90.4%
+-commutative90.4%
associate-+l+90.4%
Simplified90.4%
Taylor expanded in x around 0 66.0%
+-commutative66.0%
Simplified66.0%
Final simplification66.3%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (/ (/ y x) x) (if (<= x -2.1e-107) (/ y x) (/ x y))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -2.1e-107) {
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 <= (-1.0d0)) then
tmp = (y / x) / x
else if (x <= (-2.1d-107)) 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 <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -2.1e-107) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -2.1e-107: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) / x); elseif (x <= -2.1e-107) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (y / x) / x; elseif (x <= -2.1e-107) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -2.1e-107], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1Initial program 61.6%
associate-+r+61.6%
*-commutative61.6%
frac-times85.6%
associate-*l/85.6%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 74.1%
Taylor expanded in y around 0 73.8%
un-div-inv73.8%
Applied egg-rr73.8%
if -1 < x < -2.0999999999999999e-107Initial program 94.0%
associate-*l*94.0%
+-commutative94.0%
+-commutative94.0%
+-commutative94.0%
associate-*l*94.0%
*-commutative94.0%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 70.8%
+-commutative70.8%
Simplified70.8%
Taylor expanded in x around 0 67.4%
Taylor expanded in y around 0 31.6%
if -2.0999999999999999e-107 < x Initial program 71.7%
associate-*l*71.7%
+-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*l*71.7%
associate-*l/83.7%
*-commutative83.7%
*-commutative83.7%
distribute-rgt1-in70.5%
fma-def83.7%
+-commutative83.7%
+-commutative83.7%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/71.7%
fma-udef62.3%
cube-mult62.3%
distribute-rgt1-in71.7%
associate-+r+71.7%
*-commutative71.7%
frac-times90.0%
associate-*l/83.3%
associate-/r*86.2%
associate-+r+86.2%
+-commutative86.2%
associate-+l+86.2%
Applied egg-rr86.2%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
+-commutative65.2%
Simplified65.2%
Taylor expanded in y around 0 42.3%
Taylor expanded in x around 0 37.3%
Final simplification44.1%
(FPCore (x y) :precision binary64 (if (<= x -1.22e-107) (/ y x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -1.22e-107) {
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 <= (-1.22d-107)) 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 <= -1.22e-107) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.22e-107: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.22e-107) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.22e-107) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.22e-107], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.22 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1.22000000000000001e-107Initial program 71.7%
associate-*l*71.7%
+-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*l*71.7%
*-commutative71.7%
times-frac90.0%
+-commutative90.0%
+-commutative90.0%
+-commutative90.0%
associate-+l+90.0%
Simplified90.0%
Taylor expanded in y around 0 78.5%
+-commutative78.5%
Simplified78.5%
Taylor expanded in x around 0 63.2%
Taylor expanded in y around 0 30.0%
if -1.22000000000000001e-107 < x Initial program 71.7%
associate-*l*71.7%
+-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*l*71.7%
associate-*l/83.7%
*-commutative83.7%
*-commutative83.7%
distribute-rgt1-in70.5%
fma-def83.7%
+-commutative83.7%
+-commutative83.7%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/71.7%
fma-udef62.3%
cube-mult62.3%
distribute-rgt1-in71.7%
associate-+r+71.7%
*-commutative71.7%
frac-times90.0%
associate-*l/83.3%
associate-/r*86.2%
associate-+r+86.2%
+-commutative86.2%
associate-+l+86.2%
Applied egg-rr86.2%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
+-commutative65.2%
Simplified65.2%
Taylor expanded in y around 0 42.3%
Taylor expanded in x around 0 37.3%
Final simplification35.2%
(FPCore (x y) :precision binary64 (/ 1.0 x))
double code(double x, double y) {
return 1.0 / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / x
end function
public static double code(double x, double y) {
return 1.0 / x;
}
def code(x, y): return 1.0 / x
function code(x, y) return Float64(1.0 / x) end
function tmp = code(x, y) tmp = 1.0 / x; end
code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{x}
\end{array}
Initial program 71.7%
associate-+r+71.7%
*-commutative71.7%
frac-times90.0%
associate-*l/85.2%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 32.2%
Taylor expanded in y around inf 3.8%
Final simplification3.8%
(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.7%
associate-*l*71.7%
+-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*l*71.7%
associate-*l/84.0%
*-commutative84.0%
*-commutative84.0%
distribute-rgt1-in64.6%
fma-def83.9%
+-commutative83.9%
+-commutative83.9%
cube-unmult84.0%
+-commutative84.0%
Simplified84.0%
associate-*r/71.7%
fma-udef57.2%
cube-mult57.1%
distribute-rgt1-in71.7%
associate-+r+71.7%
*-commutative71.7%
frac-times90.0%
associate-*l/85.2%
associate-/r*90.1%
associate-+r+90.1%
+-commutative90.1%
associate-+l+90.1%
Applied egg-rr90.1%
Taylor expanded in x around 0 63.4%
*-commutative63.4%
+-commutative63.4%
Simplified63.4%
Taylor expanded in y around 0 40.1%
Taylor expanded in x around 0 28.4%
Final simplification28.4%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 71.7%
associate-*l*71.7%
+-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*l*71.7%
associate-*l/84.0%
*-commutative84.0%
*-commutative84.0%
distribute-rgt1-in64.6%
fma-def83.9%
+-commutative83.9%
+-commutative83.9%
cube-unmult84.0%
+-commutative84.0%
Simplified84.0%
associate-*r/71.7%
fma-udef57.2%
cube-mult57.1%
distribute-rgt1-in71.7%
associate-+r+71.7%
*-commutative71.7%
frac-times90.0%
associate-*l/85.2%
associate-/r*90.1%
associate-+r+90.1%
+-commutative90.1%
associate-+l+90.1%
Applied egg-rr90.1%
Taylor expanded in x around 0 63.4%
*-commutative63.4%
+-commutative63.4%
Simplified63.4%
Taylor expanded in x around 0 58.2%
+-commutative58.2%
Simplified58.2%
Taylor expanded in y around 0 3.5%
Final simplification3.5%
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y): return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y) return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x)))) end
function tmp = code(x, y) tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x))); end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}
herbie shell --seed 2023333
(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))))