
(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 23 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 (+ 1.0 x))) (/ x (+ y x))) (+ y x)))
double code(double x, double y) {
return ((y / (y + (1.0 + x))) * (x / (y + x))) / (y + x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y / (y + (1.0d0 + x))) * (x / (y + x))) / (y + x)
end function
public static double code(double x, double y) {
return ((y / (y + (1.0 + x))) * (x / (y + x))) / (y + x);
}
def code(x, y): return ((y / (y + (1.0 + x))) * (x / (y + x))) / (y + x)
function code(x, y) return Float64(Float64(Float64(y / Float64(y + Float64(1.0 + x))) * Float64(x / Float64(y + x))) / Float64(y + x)) end
function tmp = code(x, y) tmp = ((y / (y + (1.0 + x))) * (x / (y + x))) / (y + x); end
code[x_, y_] := N[(N[(N[(y / N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y}{y + \left(1 + x\right)} \cdot \frac{x}{y + x}}{y + x}
\end{array}
Initial program 67.8%
associate-*r/83.5%
*-commutative83.5%
distribute-rgt1-in63.2%
fma-def83.5%
cube-unmult83.5%
Simplified83.5%
associate-*r/67.9%
fma-udef52.9%
cube-mult52.9%
distribute-rgt1-in67.8%
associate-+r+67.8%
*-commutative67.8%
frac-times87.5%
*-commutative87.5%
associate-/r*99.7%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= y 5e-125)
(/ (/ t_0 (/ (+ 1.0 x) y)) (+ y x))
(if (<= y 3.6e+141)
(* (/ x (* (+ y x) (+ y x))) (/ y (+ x (+ y 1.0))))
(/ (* t_0 (/ y (+ y 1.0))) (+ y x))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 5e-125) {
tmp = (t_0 / ((1.0 + x) / y)) / (y + x);
} else if (y <= 3.6e+141) {
tmp = (x / ((y + x) * (y + x))) * (y / (x + (y + 1.0)));
} else {
tmp = (t_0 * (y / (y + 1.0))) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (y <= 5d-125) then
tmp = (t_0 / ((1.0d0 + x) / y)) / (y + x)
else if (y <= 3.6d+141) then
tmp = (x / ((y + x) * (y + x))) * (y / (x + (y + 1.0d0)))
else
tmp = (t_0 * (y / (y + 1.0d0))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 5e-125) {
tmp = (t_0 / ((1.0 + x) / y)) / (y + x);
} else if (y <= 3.6e+141) {
tmp = (x / ((y + x) * (y + x))) * (y / (x + (y + 1.0)));
} else {
tmp = (t_0 * (y / (y + 1.0))) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if y <= 5e-125: tmp = (t_0 / ((1.0 + x) / y)) / (y + x) elif y <= 3.6e+141: tmp = (x / ((y + x) * (y + x))) * (y / (x + (y + 1.0))) else: tmp = (t_0 * (y / (y + 1.0))) / (y + x) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (y <= 5e-125) tmp = Float64(Float64(t_0 / Float64(Float64(1.0 + x) / y)) / Float64(y + x)); elseif (y <= 3.6e+141) tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / Float64(x + Float64(y + 1.0)))); else tmp = Float64(Float64(t_0 * Float64(y / Float64(y + 1.0))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (y <= 5e-125) tmp = (t_0 / ((1.0 + x) / y)) / (y + x); elseif (y <= 3.6e+141) tmp = (x / ((y + x) * (y + x))) * (y / (x + (y + 1.0))); else tmp = (t_0 * (y / (y + 1.0))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5e-125], N[(N[(t$95$0 / N[(N[(1.0 + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+141], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;y \leq 5 \cdot 10^{-125}:\\
\;\;\;\;\frac{\frac{t_0}{\frac{1 + x}{y}}}{y + x}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+141}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0 \cdot \frac{y}{y + 1}}{y + x}\\
\end{array}
\end{array}
if y < 4.99999999999999967e-125Initial program 68.4%
associate-*r/83.1%
*-commutative83.1%
distribute-rgt1-in59.0%
fma-def83.1%
cube-unmult83.1%
Simplified83.1%
associate-*r/68.4%
fma-udef48.8%
cube-mult48.7%
distribute-rgt1-in68.4%
associate-+r+68.4%
*-commutative68.4%
frac-times85.8%
*-commutative85.8%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
clear-num99.8%
clear-num99.7%
frac-times99.7%
metadata-eval99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.7%
Simplified99.7%
clear-num99.8%
div-inv99.7%
*-un-lft-identity99.7%
times-frac99.8%
/-rgt-identity99.8%
Applied egg-rr99.8%
associate-*r/99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in y around 0 79.4%
if 4.99999999999999967e-125 < y < 3.6000000000000001e141Initial program 75.8%
times-frac97.2%
/-rgt-identity97.2%
associate-/l/97.2%
*-lft-identity97.2%
associate-+l+97.2%
Simplified97.2%
if 3.6000000000000001e141 < y Initial program 42.5%
associate-*r/73.0%
*-commutative73.0%
distribute-rgt1-in68.8%
fma-def73.0%
cube-unmult73.0%
Simplified73.0%
associate-*r/42.5%
fma-udef42.5%
cube-mult42.5%
distribute-rgt1-in42.5%
associate-+r+42.5%
*-commutative42.5%
frac-times73.0%
*-commutative73.0%
associate-/r*100.0%
associate-*r/100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 81.2%
+-commutative81.2%
Simplified81.2%
Final simplification84.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= y 1.55e-83)
(/ (/ t_0 (/ (+ 1.0 x) y)) (+ y x))
(if (<= y 3.6e+141)
(/ x (* (+ y x) (/ (* (+ y (+ 1.0 x)) (+ y x)) y)))
(/ (* t_0 (/ y (+ y 1.0))) (+ y x))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 1.55e-83) {
tmp = (t_0 / ((1.0 + x) / y)) / (y + x);
} else if (y <= 3.6e+141) {
tmp = x / ((y + x) * (((y + (1.0 + x)) * (y + x)) / y));
} else {
tmp = (t_0 * (y / (y + 1.0))) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (y <= 1.55d-83) then
tmp = (t_0 / ((1.0d0 + x) / y)) / (y + x)
else if (y <= 3.6d+141) then
tmp = x / ((y + x) * (((y + (1.0d0 + x)) * (y + x)) / y))
else
tmp = (t_0 * (y / (y + 1.0d0))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 1.55e-83) {
tmp = (t_0 / ((1.0 + x) / y)) / (y + x);
} else if (y <= 3.6e+141) {
tmp = x / ((y + x) * (((y + (1.0 + x)) * (y + x)) / y));
} else {
tmp = (t_0 * (y / (y + 1.0))) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if y <= 1.55e-83: tmp = (t_0 / ((1.0 + x) / y)) / (y + x) elif y <= 3.6e+141: tmp = x / ((y + x) * (((y + (1.0 + x)) * (y + x)) / y)) else: tmp = (t_0 * (y / (y + 1.0))) / (y + x) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (y <= 1.55e-83) tmp = Float64(Float64(t_0 / Float64(Float64(1.0 + x) / y)) / Float64(y + x)); elseif (y <= 3.6e+141) tmp = Float64(x / Float64(Float64(y + x) * Float64(Float64(Float64(y + Float64(1.0 + x)) * Float64(y + x)) / y))); else tmp = Float64(Float64(t_0 * Float64(y / Float64(y + 1.0))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (y <= 1.55e-83) tmp = (t_0 / ((1.0 + x) / y)) / (y + x); elseif (y <= 3.6e+141) tmp = x / ((y + x) * (((y + (1.0 + x)) * (y + x)) / y)); else tmp = (t_0 * (y / (y + 1.0))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.55e-83], N[(N[(t$95$0 / N[(N[(1.0 + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+141], N[(x / N[(N[(y + x), $MachinePrecision] * N[(N[(N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;y \leq 1.55 \cdot 10^{-83}:\\
\;\;\;\;\frac{\frac{t_0}{\frac{1 + x}{y}}}{y + x}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+141}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \frac{\left(y + \left(1 + x\right)\right) \cdot \left(y + x\right)}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0 \cdot \frac{y}{y + 1}}{y + x}\\
\end{array}
\end{array}
if y < 1.54999999999999996e-83Initial program 69.6%
associate-*r/83.5%
*-commutative83.5%
distribute-rgt1-in60.2%
fma-def83.5%
cube-unmult83.5%
Simplified83.5%
associate-*r/69.7%
fma-udef50.5%
cube-mult50.5%
distribute-rgt1-in69.6%
associate-+r+69.6%
*-commutative69.6%
frac-times86.6%
*-commutative86.6%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
clear-num99.8%
clear-num99.7%
frac-times99.7%
metadata-eval99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.7%
Simplified99.7%
clear-num99.8%
div-inv99.7%
*-un-lft-identity99.7%
times-frac99.8%
/-rgt-identity99.8%
Applied egg-rr99.8%
associate-*r/99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in y around 0 80.5%
if 1.54999999999999996e-83 < y < 3.6000000000000001e141Initial program 73.1%
associate-*r/88.0%
*-commutative88.0%
distribute-rgt1-in70.7%
fma-def88.0%
cube-unmult88.1%
Simplified88.1%
associate-*r/73.2%
fma-udef65.2%
cube-mult65.2%
distribute-rgt1-in73.1%
associate-+r+73.1%
*-commutative73.1%
frac-times96.7%
*-commutative96.7%
clear-num96.7%
associate-/r*99.6%
frac-times98.3%
*-un-lft-identity98.3%
+-commutative98.3%
+-commutative98.3%
associate-+l+98.3%
+-commutative98.3%
Applied egg-rr98.3%
associate-/l/95.1%
*-commutative95.1%
associate-*r/95.1%
+-commutative95.1%
Simplified95.1%
if 3.6000000000000001e141 < y Initial program 42.5%
associate-*r/73.0%
*-commutative73.0%
distribute-rgt1-in68.8%
fma-def73.0%
cube-unmult73.0%
Simplified73.0%
associate-*r/42.5%
fma-udef42.5%
cube-mult42.5%
distribute-rgt1-in42.5%
associate-+r+42.5%
*-commutative42.5%
frac-times73.0%
*-commutative73.0%
associate-/r*100.0%
associate-*r/100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 81.2%
+-commutative81.2%
Simplified81.2%
Final simplification83.6%
(FPCore (x y)
:precision binary64
(if (<= y 8e-178)
(/ (/ y (+ y x)) (+ 1.0 x))
(if (<= y 8.2e-9)
(* (/ x (* (+ y x) (+ y x))) (/ y (+ 1.0 x)))
(/ (/ x (+ y 1.0)) (+ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 8e-178) {
tmp = (y / (y + x)) / (1.0 + x);
} else if (y <= 8.2e-9) {
tmp = (x / ((y + x) * (y + x))) * (y / (1.0 + x));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 8d-178) then
tmp = (y / (y + x)) / (1.0d0 + x)
else if (y <= 8.2d-9) then
tmp = (x / ((y + x) * (y + x))) * (y / (1.0d0 + x))
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 8e-178) {
tmp = (y / (y + x)) / (1.0 + x);
} else if (y <= 8.2e-9) {
tmp = (x / ((y + x) * (y + x))) * (y / (1.0 + x));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 8e-178: tmp = (y / (y + x)) / (1.0 + x) elif y <= 8.2e-9: tmp = (x / ((y + x) * (y + x))) * (y / (1.0 + x)) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 8e-178) tmp = Float64(Float64(y / Float64(y + x)) / Float64(1.0 + x)); elseif (y <= 8.2e-9) tmp = Float64(Float64(x / Float64(Float64(y + x) * Float64(y + x))) * Float64(y / Float64(1.0 + x))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 8e-178) tmp = (y / (y + x)) / (1.0 + x); elseif (y <= 8.2e-9) tmp = (x / ((y + x) * (y + x))) * (y / (1.0 + x)); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 8e-178], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e-9], N[(N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{-178}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{1 + x}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-9}:\\
\;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{y}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if y < 7.9999999999999996e-178Initial program 66.2%
associate-*r/82.0%
*-commutative82.0%
distribute-rgt1-in57.4%
fma-def82.0%
cube-unmult81.9%
Simplified81.9%
associate-*r/66.2%
fma-udef46.5%
cube-mult46.4%
distribute-rgt1-in66.2%
associate-+r+66.2%
*-commutative66.2%
frac-times84.8%
*-commutative84.8%
associate-/r*99.7%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 54.2%
expm1-log1p-u54.2%
expm1-udef32.2%
associate-/l/32.2%
+-commutative32.2%
+-commutative32.2%
Applied egg-rr32.2%
expm1-def56.1%
expm1-log1p56.1%
associate-/r*54.2%
Simplified54.2%
if 7.9999999999999996e-178 < y < 8.2000000000000006e-9Initial program 91.1%
times-frac99.8%
/-rgt-identity99.8%
associate-/l/99.8%
*-lft-identity99.8%
associate-+l+99.8%
Simplified99.8%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
Simplified99.8%
if 8.2000000000000006e-9 < y Initial program 60.5%
associate-*r/82.0%
*-commutative82.0%
distribute-rgt1-in71.1%
fma-def82.1%
cube-unmult82.1%
Simplified82.1%
associate-*r/60.6%
fma-udef58.6%
cube-mult58.6%
distribute-rgt1-in60.5%
associate-+r+60.5%
*-commutative60.5%
frac-times87.7%
*-commutative87.7%
associate-/r*99.8%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 74.4%
+-commutative74.4%
Simplified74.4%
Final simplification65.2%
(FPCore (x y) :precision binary64 (if (<= x -5.6) (/ (/ 1.0 (/ (+ y (+ 1.0 x)) y)) (+ y x)) (/ (* (/ x (+ y x)) (/ y (+ y 1.0))) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -5.6) {
tmp = (1.0 / ((y + (1.0 + x)) / y)) / (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 <= (-5.6d0)) then
tmp = (1.0d0 / ((y + (1.0d0 + x)) / y)) / (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 <= -5.6) {
tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x);
} else {
tmp = ((x / (y + x)) * (y / (y + 1.0))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.6: tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x) else: tmp = ((x / (y + x)) * (y / (y + 1.0))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.6) tmp = Float64(Float64(1.0 / Float64(Float64(y + Float64(1.0 + x)) / y)) / Float64(y + x)); else tmp = Float64(Float64(Float64(x / 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 <= -5.6) tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x); else tmp = ((x / (y + x)) * (y / (y + 1.0))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.6], N[(N[(1.0 / N[(N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6:\\
\;\;\;\;\frac{\frac{1}{\frac{y + \left(1 + x\right)}{y}}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x} \cdot \frac{y}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -5.5999999999999996Initial program 62.7%
associate-*r/82.5%
*-commutative82.5%
distribute-rgt1-in33.9%
fma-def82.5%
cube-unmult82.6%
Simplified82.6%
associate-*r/62.7%
fma-udef33.6%
cube-mult33.6%
distribute-rgt1-in62.7%
associate-+r+62.7%
*-commutative62.7%
frac-times87.2%
*-commutative87.2%
associate-/r*99.8%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
clear-num99.8%
clear-num99.7%
frac-times99.7%
metadata-eval99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in y around 0 76.6%
if -5.5999999999999996 < x Initial program 69.5%
associate-*r/83.8%
*-commutative83.8%
distribute-rgt1-in72.8%
fma-def83.8%
cube-unmult83.8%
Simplified83.8%
associate-*r/69.5%
fma-udef59.2%
cube-mult59.1%
distribute-rgt1-in69.5%
associate-+r+69.5%
*-commutative69.5%
frac-times87.5%
*-commutative87.5%
associate-/r*99.7%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 86.4%
+-commutative86.4%
Simplified86.4%
Final simplification84.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -0.35)
(/ (/ t_0 (/ (+ 1.0 x) y)) (+ y x))
(/ (* t_0 (/ y (+ y 1.0))) (+ y x)))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -0.35) {
tmp = (t_0 / ((1.0 + x) / y)) / (y + x);
} else {
tmp = (t_0 * (y / (y + 1.0))) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x / (y + x)
if (x <= (-0.35d0)) then
tmp = (t_0 / ((1.0d0 + x) / y)) / (y + x)
else
tmp = (t_0 * (y / (y + 1.0d0))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -0.35) {
tmp = (t_0 / ((1.0 + x) / y)) / (y + x);
} else {
tmp = (t_0 * (y / (y + 1.0))) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -0.35: tmp = (t_0 / ((1.0 + x) / y)) / (y + x) else: tmp = (t_0 * (y / (y + 1.0))) / (y + x) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -0.35) tmp = Float64(Float64(t_0 / Float64(Float64(1.0 + x) / y)) / Float64(y + x)); else tmp = Float64(Float64(t_0 * Float64(y / Float64(y + 1.0))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -0.35) tmp = (t_0 / ((1.0 + x) / y)) / (y + x); else tmp = (t_0 * (y / (y + 1.0))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.35], N[(N[(t$95$0 / N[(N[(1.0 + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -0.35:\\
\;\;\;\;\frac{\frac{t_0}{\frac{1 + x}{y}}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0 \cdot \frac{y}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -0.34999999999999998Initial program 63.3%
associate-*r/82.8%
*-commutative82.8%
distribute-rgt1-in34.9%
fma-def82.8%
cube-unmult82.8%
Simplified82.8%
associate-*r/63.3%
fma-udef34.6%
cube-mult34.6%
distribute-rgt1-in63.3%
associate-+r+63.3%
*-commutative63.3%
frac-times87.4%
*-commutative87.4%
associate-/r*99.8%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
clear-num99.7%
clear-num99.7%
frac-times99.7%
metadata-eval99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.7%
Simplified99.7%
clear-num99.7%
div-inv99.7%
*-un-lft-identity99.7%
times-frac99.7%
/-rgt-identity99.7%
Applied egg-rr99.7%
associate-*r/99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around 0 75.6%
if -0.34999999999999998 < x Initial program 69.4%
associate-*r/83.7%
*-commutative83.7%
distribute-rgt1-in72.7%
fma-def83.7%
cube-unmult83.7%
Simplified83.7%
associate-*r/69.4%
fma-udef59.0%
cube-mult58.9%
distribute-rgt1-in69.4%
associate-+r+69.4%
*-commutative69.4%
frac-times87.5%
*-commutative87.5%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 86.5%
+-commutative86.5%
Simplified86.5%
Final simplification83.8%
(FPCore (x y)
:precision binary64
(if (<= x -1.0)
(/ (/ y x) x)
(if (<= x -1.2e-97)
(- (/ y x) y)
(if (or (<= x -1.85e-137) (not (<= x -6.6e-171)))
(/ x (+ y (* y y)))
(/ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -1.2e-97) {
tmp = (y / x) - y;
} else if ((x <= -1.85e-137) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = y / x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (y / x) / x
else if (x <= (-1.2d-97)) then
tmp = (y / x) - y
else if ((x <= (-1.85d-137)) .or. (.not. (x <= (-6.6d-171)))) then
tmp = x / (y + (y * y))
else
tmp = y / x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) / x;
} else if (x <= -1.2e-97) {
tmp = (y / x) - y;
} else if ((x <= -1.85e-137) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = y / x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) / x elif x <= -1.2e-97: tmp = (y / x) - y elif (x <= -1.85e-137) or not (x <= -6.6e-171): tmp = x / (y + (y * y)) else: tmp = y / x return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) / x); elseif (x <= -1.2e-97) tmp = Float64(Float64(y / x) - y); elseif ((x <= -1.85e-137) || !(x <= -6.6e-171)) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(y / x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (y / x) / x; elseif (x <= -1.2e-97) tmp = (y / x) - y; elseif ((x <= -1.85e-137) || ~((x <= -6.6e-171))) tmp = x / (y + (y * y)); else tmp = y / x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.2e-97], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[Or[LessEqual[x, -1.85e-137], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\end{array}
if x < -1Initial program 63.3%
times-frac87.4%
/-rgt-identity87.4%
associate-/l/87.4%
*-lft-identity87.4%
associate-+l+87.4%
Simplified87.4%
Taylor expanded in x around inf 78.4%
Taylor expanded in x around inf 71.1%
associate-*l/71.1%
*-un-lft-identity71.1%
Applied egg-rr71.1%
if -1 < x < -1.2e-97Initial program 92.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 49.7%
Taylor expanded in x around 0 49.7%
neg-mul-149.7%
unsub-neg49.7%
Simplified49.7%
if -1.2e-97 < x < -1.85e-137 or -6.6000000000000004e-171 < x Initial program 67.7%
times-frac87.1%
/-rgt-identity87.1%
associate-/l/87.1%
*-lft-identity87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in x around 0 61.6%
distribute-rgt-in61.6%
*-lft-identity61.6%
Simplified61.6%
if -1.85e-137 < x < -6.6000000000000004e-171Initial program 67.0%
times-frac76.6%
/-rgt-identity76.6%
associate-/l/76.6%
*-lft-identity76.6%
associate-+l+76.6%
Simplified76.6%
Taylor expanded in y around 0 46.0%
Taylor expanded in x around 0 46.0%
Final simplification62.8%
(FPCore (x y)
:precision binary64
(if (<= x -4.8e+156)
(/ (/ y x) x)
(if (<= x -1.2e-97)
(/ y (* x (+ 1.0 x)))
(if (or (<= x -8e-136) (not (<= x -6.6e-171)))
(/ x (+ y (* y y)))
(/ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -4.8e+156) {
tmp = (y / x) / x;
} else if (x <= -1.2e-97) {
tmp = y / (x * (1.0 + x));
} else if ((x <= -8e-136) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = y / x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-4.8d+156)) then
tmp = (y / x) / x
else if (x <= (-1.2d-97)) then
tmp = y / (x * (1.0d0 + x))
else if ((x <= (-8d-136)) .or. (.not. (x <= (-6.6d-171)))) then
tmp = x / (y + (y * y))
else
tmp = y / x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -4.8e+156) {
tmp = (y / x) / x;
} else if (x <= -1.2e-97) {
tmp = y / (x * (1.0 + x));
} else if ((x <= -8e-136) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = y / x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.8e+156: tmp = (y / x) / x elif x <= -1.2e-97: tmp = y / (x * (1.0 + x)) elif (x <= -8e-136) or not (x <= -6.6e-171): tmp = x / (y + (y * y)) else: tmp = y / x return tmp
function code(x, y) tmp = 0.0 if (x <= -4.8e+156) tmp = Float64(Float64(y / x) / x); elseif (x <= -1.2e-97) tmp = Float64(y / Float64(x * Float64(1.0 + x))); elseif ((x <= -8e-136) || !(x <= -6.6e-171)) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(y / x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -4.8e+156) tmp = (y / x) / x; elseif (x <= -1.2e-97) tmp = y / (x * (1.0 + x)); elseif ((x <= -8e-136) || ~((x <= -6.6e-171))) tmp = x / (y + (y * y)); else tmp = y / x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.8e+156], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.2e-97], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -8e-136], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+156}:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-136} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\end{array}
if x < -4.8000000000000002e156Initial program 58.3%
times-frac87.7%
/-rgt-identity87.7%
associate-/l/87.7%
*-lft-identity87.7%
associate-+l+87.7%
Simplified87.7%
Taylor expanded in x around inf 87.7%
Taylor expanded in x around inf 96.6%
associate-*l/96.6%
*-un-lft-identity96.6%
Applied egg-rr96.6%
if -4.8000000000000002e156 < x < -1.2e-97Initial program 73.8%
times-frac90.5%
/-rgt-identity90.5%
associate-/l/90.5%
*-lft-identity90.5%
associate-+l+90.5%
Simplified90.5%
Taylor expanded in y around 0 59.8%
if -1.2e-97 < x < -8.00000000000000001e-136 or -6.6000000000000004e-171 < x Initial program 67.5%
times-frac87.1%
/-rgt-identity87.1%
associate-/l/87.1%
*-lft-identity87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in x around 0 61.4%
distribute-rgt-in61.4%
*-lft-identity61.4%
Simplified61.4%
if -8.00000000000000001e-136 < x < -6.6000000000000004e-171Initial program 70.3%
times-frac79.0%
/-rgt-identity79.0%
associate-/l/79.0%
*-lft-identity79.0%
associate-+l+79.0%
Simplified79.0%
Taylor expanded in y around 0 41.5%
Taylor expanded in x around 0 41.5%
Final simplification64.1%
(FPCore (x y)
:precision binary64
(if (<= x -3.7e+157)
(/ (/ y x) (+ y x))
(if (<= x -1.2e-97)
(/ y (* x (+ 1.0 x)))
(if (or (<= x -4.6e-137) (not (<= x -6.6e-171)))
(/ x (+ y (* y y)))
(/ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -3.7e+157) {
tmp = (y / x) / (y + x);
} else if (x <= -1.2e-97) {
tmp = y / (x * (1.0 + x));
} else if ((x <= -4.6e-137) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = 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 <= (-3.7d+157)) then
tmp = (y / x) / (y + x)
else if (x <= (-1.2d-97)) then
tmp = y / (x * (1.0d0 + x))
else if ((x <= (-4.6d-137)) .or. (.not. (x <= (-6.6d-171)))) then
tmp = x / (y + (y * y))
else
tmp = y / x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -3.7e+157) {
tmp = (y / x) / (y + x);
} else if (x <= -1.2e-97) {
tmp = y / (x * (1.0 + x));
} else if ((x <= -4.6e-137) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = y / x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -3.7e+157: tmp = (y / x) / (y + x) elif x <= -1.2e-97: tmp = y / (x * (1.0 + x)) elif (x <= -4.6e-137) or not (x <= -6.6e-171): tmp = x / (y + (y * y)) else: tmp = y / x return tmp
function code(x, y) tmp = 0.0 if (x <= -3.7e+157) tmp = Float64(Float64(y / x) / Float64(y + x)); elseif (x <= -1.2e-97) tmp = Float64(y / Float64(x * Float64(1.0 + x))); elseif ((x <= -4.6e-137) || !(x <= -6.6e-171)) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(y / x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -3.7e+157) tmp = (y / x) / (y + x); elseif (x <= -1.2e-97) tmp = y / (x * (1.0 + x)); elseif ((x <= -4.6e-137) || ~((x <= -6.6e-171))) tmp = x / (y + (y * y)); else tmp = y / x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -3.7e+157], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-97], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -4.6e-137], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+157}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\end{array}
if x < -3.6999999999999999e157Initial program 58.3%
associate-*r/87.7%
*-commutative87.7%
distribute-rgt1-in0.0%
fma-def87.7%
cube-unmult87.7%
Simplified87.7%
associate-*r/58.3%
fma-udef0.0%
cube-mult0.0%
distribute-rgt1-in58.3%
associate-+r+58.3%
*-commutative58.3%
frac-times87.7%
*-commutative87.7%
associate-/r*99.9%
associate-*r/100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
+-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 96.7%
if -3.6999999999999999e157 < x < -1.2e-97Initial program 73.8%
times-frac90.5%
/-rgt-identity90.5%
associate-/l/90.5%
*-lft-identity90.5%
associate-+l+90.5%
Simplified90.5%
Taylor expanded in y around 0 59.8%
if -1.2e-97 < x < -4.60000000000000016e-137 or -6.6000000000000004e-171 < x Initial program 67.5%
times-frac87.1%
/-rgt-identity87.1%
associate-/l/87.1%
*-lft-identity87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in x around 0 61.4%
distribute-rgt-in61.4%
*-lft-identity61.4%
Simplified61.4%
if -4.60000000000000016e-137 < x < -6.6000000000000004e-171Initial program 70.3%
times-frac79.0%
/-rgt-identity79.0%
associate-/l/79.0%
*-lft-identity79.0%
associate-+l+79.0%
Simplified79.0%
Taylor expanded in y around 0 41.5%
Taylor expanded in x around 0 41.5%
Final simplification64.1%
(FPCore (x y)
:precision binary64
(if (<= x -9.2e-98)
(/ 1.0 (/ x (/ y (+ 1.0 x))))
(if (<= x -3.5e-134)
(/ x (+ y (* y y)))
(if (<= x -6.6e-171) (/ y x) (/ (/ x (+ y 1.0)) (+ y x))))))
double code(double x, double y) {
double tmp;
if (x <= -9.2e-98) {
tmp = 1.0 / (x / (y / (1.0 + x)));
} else if (x <= -3.5e-134) {
tmp = x / (y + (y * y));
} else if (x <= -6.6e-171) {
tmp = y / x;
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-9.2d-98)) then
tmp = 1.0d0 / (x / (y / (1.0d0 + x)))
else if (x <= (-3.5d-134)) then
tmp = x / (y + (y * y))
else if (x <= (-6.6d-171)) then
tmp = y / x
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -9.2e-98) {
tmp = 1.0 / (x / (y / (1.0 + x)));
} else if (x <= -3.5e-134) {
tmp = x / (y + (y * y));
} else if (x <= -6.6e-171) {
tmp = y / x;
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -9.2e-98: tmp = 1.0 / (x / (y / (1.0 + x))) elif x <= -3.5e-134: tmp = x / (y + (y * y)) elif x <= -6.6e-171: tmp = y / x else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -9.2e-98) tmp = Float64(1.0 / Float64(x / Float64(y / Float64(1.0 + x)))); elseif (x <= -3.5e-134) tmp = Float64(x / Float64(y + Float64(y * y))); elseif (x <= -6.6e-171) tmp = Float64(y / x); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -9.2e-98) tmp = 1.0 / (x / (y / (1.0 + x))); elseif (x <= -3.5e-134) tmp = x / (y + (y * y)); elseif (x <= -6.6e-171) tmp = y / x; else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -9.2e-98], N[(1.0 / N[(x / N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e-134], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-171], N[(y / x), $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 -9.2 \cdot 10^{-98}:\\
\;\;\;\;\frac{1}{\frac{x}{\frac{y}{1 + x}}}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-134}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -9.20000000000000002e-98Initial program 68.2%
times-frac89.5%
/-rgt-identity89.5%
associate-/l/89.5%
*-lft-identity89.5%
associate-+l+89.5%
Simplified89.5%
Taylor expanded in y around 0 69.9%
clear-num69.9%
inv-pow69.9%
*-commutative69.9%
Applied egg-rr69.9%
unpow-169.9%
associate-/l*69.7%
Simplified69.7%
if -9.20000000000000002e-98 < x < -3.4999999999999998e-134Initial program 99.6%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 88.3%
distribute-rgt-in88.3%
*-lft-identity88.3%
Simplified88.3%
if -3.4999999999999998e-134 < x < -6.6000000000000004e-171Initial program 70.3%
times-frac79.0%
/-rgt-identity79.0%
associate-/l/79.0%
*-lft-identity79.0%
associate-+l+79.0%
Simplified79.0%
Taylor expanded in y around 0 41.5%
Taylor expanded in x around 0 41.5%
if -6.6000000000000004e-171 < x Initial program 65.9%
associate-*r/82.5%
*-commutative82.5%
distribute-rgt1-in71.8%
fma-def82.5%
cube-unmult82.5%
Simplified82.5%
associate-*r/66.0%
fma-udef56.0%
cube-mult56.0%
distribute-rgt1-in65.9%
associate-+r+65.9%
*-commutative65.9%
frac-times86.4%
*-commutative86.4%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Final simplification62.8%
(FPCore (x y)
:precision binary64
(if (<= x -1.05e-97)
(/ (/ y (+ 1.0 x)) (+ y x))
(if (<= x -1.85e-137)
(/ x (+ y (* y y)))
(if (<= x -3.2e-171) (/ y x) (/ (/ x (+ y 1.0)) (+ y x))))))
double code(double x, double y) {
double tmp;
if (x <= -1.05e-97) {
tmp = (y / (1.0 + x)) / (y + x);
} else if (x <= -1.85e-137) {
tmp = x / (y + (y * y));
} else if (x <= -3.2e-171) {
tmp = y / x;
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.05d-97)) then
tmp = (y / (1.0d0 + x)) / (y + x)
else if (x <= (-1.85d-137)) then
tmp = x / (y + (y * y))
else if (x <= (-3.2d-171)) then
tmp = y / x
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.05e-97) {
tmp = (y / (1.0 + x)) / (y + x);
} else if (x <= -1.85e-137) {
tmp = x / (y + (y * y));
} else if (x <= -3.2e-171) {
tmp = y / x;
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.05e-97: tmp = (y / (1.0 + x)) / (y + x) elif x <= -1.85e-137: tmp = x / (y + (y * y)) elif x <= -3.2e-171: tmp = y / x else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.05e-97) tmp = Float64(Float64(y / Float64(1.0 + x)) / Float64(y + x)); elseif (x <= -1.85e-137) tmp = Float64(x / Float64(y + Float64(y * y))); elseif (x <= -3.2e-171) tmp = Float64(y / x); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.05e-97) tmp = (y / (1.0 + x)) / (y + x); elseif (x <= -1.85e-137) tmp = x / (y + (y * y)); elseif (x <= -3.2e-171) tmp = y / x; else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.05e-97], N[(N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.85e-137], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-171], N[(y / x), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{y}{1 + x}}{y + x}\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-137}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-171}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -1.0500000000000001e-97Initial program 68.2%
associate-*r/84.4%
*-commutative84.4%
distribute-rgt1-in42.0%
fma-def84.4%
cube-unmult84.5%
Simplified84.5%
associate-*r/68.2%
fma-udef41.8%
cube-mult41.7%
distribute-rgt1-in68.2%
associate-+r+68.2%
*-commutative68.2%
frac-times89.5%
*-commutative89.5%
associate-/r*99.8%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 71.0%
if -1.0500000000000001e-97 < x < -1.85e-137Initial program 99.7%
times-frac99.7%
/-rgt-identity99.7%
associate-/l/99.7%
*-lft-identity99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in x around 0 89.6%
distribute-rgt-in89.6%
*-lft-identity89.6%
Simplified89.6%
if -1.85e-137 < x < -3.2000000000000001e-171Initial program 67.0%
times-frac76.6%
/-rgt-identity76.6%
associate-/l/76.6%
*-lft-identity76.6%
associate-+l+76.6%
Simplified76.6%
Taylor expanded in y around 0 46.0%
Taylor expanded in x around 0 46.0%
if -3.2000000000000001e-171 < x Initial program 65.9%
associate-*r/82.5%
*-commutative82.5%
distribute-rgt1-in71.8%
fma-def82.5%
cube-unmult82.5%
Simplified82.5%
associate-*r/66.0%
fma-udef56.0%
cube-mult56.0%
distribute-rgt1-in65.9%
associate-+r+65.9%
*-commutative65.9%
frac-times86.4%
*-commutative86.4%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Final simplification63.6%
(FPCore (x y)
:precision binary64
(if (<= x -1.2e-97)
(/ (/ y (+ y x)) (+ 1.0 x))
(if (<= x -4.6e-137)
(/ x (+ y (* y y)))
(if (<= x -6.6e-171) (/ y x) (/ (/ x (+ y 1.0)) (+ y x))))))
double code(double x, double y) {
double tmp;
if (x <= -1.2e-97) {
tmp = (y / (y + x)) / (1.0 + x);
} else if (x <= -4.6e-137) {
tmp = x / (y + (y * y));
} else if (x <= -6.6e-171) {
tmp = y / x;
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.2d-97)) then
tmp = (y / (y + x)) / (1.0d0 + x)
else if (x <= (-4.6d-137)) then
tmp = x / (y + (y * y))
else if (x <= (-6.6d-171)) then
tmp = y / x
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.2e-97) {
tmp = (y / (y + x)) / (1.0 + x);
} else if (x <= -4.6e-137) {
tmp = x / (y + (y * y));
} else if (x <= -6.6e-171) {
tmp = y / x;
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.2e-97: tmp = (y / (y + x)) / (1.0 + x) elif x <= -4.6e-137: tmp = x / (y + (y * y)) elif x <= -6.6e-171: tmp = y / x else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.2e-97) tmp = Float64(Float64(y / Float64(y + x)) / Float64(1.0 + x)); elseif (x <= -4.6e-137) tmp = Float64(x / Float64(y + Float64(y * y))); elseif (x <= -6.6e-171) tmp = Float64(y / x); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.2e-97) tmp = (y / (y + x)) / (1.0 + x); elseif (x <= -4.6e-137) tmp = x / (y + (y * y)); elseif (x <= -6.6e-171) tmp = y / x; else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.2e-97], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.6e-137], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-171], N[(y / x), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{-97}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{1 + x}\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{-137}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -1.2e-97Initial program 68.2%
associate-*r/84.4%
*-commutative84.4%
distribute-rgt1-in42.0%
fma-def84.4%
cube-unmult84.5%
Simplified84.5%
associate-*r/68.2%
fma-udef41.8%
cube-mult41.7%
distribute-rgt1-in68.2%
associate-+r+68.2%
*-commutative68.2%
frac-times89.5%
*-commutative89.5%
associate-/r*99.8%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 71.0%
expm1-log1p-u71.0%
expm1-udef55.5%
associate-/l/55.5%
+-commutative55.5%
+-commutative55.5%
Applied egg-rr55.5%
expm1-def74.1%
expm1-log1p74.1%
associate-/r*71.0%
Simplified71.0%
if -1.2e-97 < x < -4.60000000000000016e-137Initial program 99.6%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 88.3%
distribute-rgt-in88.3%
*-lft-identity88.3%
Simplified88.3%
if -4.60000000000000016e-137 < x < -6.6000000000000004e-171Initial program 70.3%
times-frac79.0%
/-rgt-identity79.0%
associate-/l/79.0%
*-lft-identity79.0%
associate-+l+79.0%
Simplified79.0%
Taylor expanded in y around 0 41.5%
Taylor expanded in x around 0 41.5%
if -6.6000000000000004e-171 < x Initial program 65.9%
associate-*r/82.5%
*-commutative82.5%
distribute-rgt1-in71.8%
fma-def82.5%
cube-unmult82.5%
Simplified82.5%
associate-*r/66.0%
fma-udef56.0%
cube-mult56.0%
distribute-rgt1-in65.9%
associate-+r+65.9%
*-commutative65.9%
frac-times86.4%
*-commutative86.4%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Final simplification63.2%
(FPCore (x y)
:precision binary64
(if (<= x -0.075)
(/ (/ y (+ y x)) (+ 1.0 x))
(if (<= x -6.6e-171)
(* y (/ x (* (+ y x) (+ y x))))
(/ (/ x (+ y 1.0)) (+ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -0.075) {
tmp = (y / (y + x)) / (1.0 + x);
} else if (x <= -6.6e-171) {
tmp = y * (x / ((y + x) * (y + x)));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-0.075d0)) then
tmp = (y / (y + x)) / (1.0d0 + x)
else if (x <= (-6.6d-171)) then
tmp = y * (x / ((y + x) * (y + x)))
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -0.075) {
tmp = (y / (y + x)) / (1.0 + x);
} else if (x <= -6.6e-171) {
tmp = y * (x / ((y + x) * (y + x)));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -0.075: tmp = (y / (y + x)) / (1.0 + x) elif x <= -6.6e-171: tmp = y * (x / ((y + x) * (y + x))) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -0.075) tmp = Float64(Float64(y / Float64(y + x)) / Float64(1.0 + x)); elseif (x <= -6.6e-171) tmp = Float64(y * Float64(x / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -0.075) tmp = (y / (y + x)) / (1.0 + x); elseif (x <= -6.6e-171) tmp = y * (x / ((y + x) * (y + x))); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -0.075], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-171], N[(y * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.075:\\
\;\;\;\;\frac{\frac{y}{y + x}}{1 + x}\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\
\;\;\;\;y \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -0.0749999999999999972Initial program 63.3%
associate-*r/82.8%
*-commutative82.8%
distribute-rgt1-in34.9%
fma-def82.8%
cube-unmult82.8%
Simplified82.8%
associate-*r/63.3%
fma-udef34.6%
cube-mult34.6%
distribute-rgt1-in63.3%
associate-+r+63.3%
*-commutative63.3%
frac-times87.4%
*-commutative87.4%
associate-/r*99.8%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 75.3%
expm1-log1p-u75.3%
expm1-udef65.2%
associate-/l/65.2%
+-commutative65.2%
+-commutative65.2%
Applied egg-rr65.2%
expm1-def79.1%
expm1-log1p79.1%
associate-/r*75.3%
Simplified75.3%
if -0.0749999999999999972 < x < -6.6000000000000004e-171Initial program 87.1%
times-frac92.9%
/-rgt-identity92.9%
associate-/l/92.9%
*-lft-identity92.9%
associate-+l+92.9%
Simplified92.9%
Taylor expanded in y around 0 72.7%
+-commutative72.7%
Simplified72.7%
Taylor expanded in x around 0 72.4%
if -6.6000000000000004e-171 < x Initial program 65.9%
associate-*r/82.5%
*-commutative82.5%
distribute-rgt1-in71.8%
fma-def82.5%
cube-unmult82.5%
Simplified82.5%
associate-*r/66.0%
fma-udef56.0%
cube-mult56.0%
distribute-rgt1-in65.9%
associate-+r+65.9%
*-commutative65.9%
frac-times86.4%
*-commutative86.4%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Final simplification65.1%
(FPCore (x y)
:precision binary64
(if (<= x -0.11)
(/ (/ 1.0 (/ (+ y (+ 1.0 x)) y)) (+ y x))
(if (<= x -6.6e-171)
(* y (/ x (* (+ y x) (+ y x))))
(/ (/ x (+ y 1.0)) (+ y x)))))
double code(double x, double y) {
double tmp;
if (x <= -0.11) {
tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x);
} else if (x <= -6.6e-171) {
tmp = y * (x / ((y + x) * (y + x)));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-0.11d0)) then
tmp = (1.0d0 / ((y + (1.0d0 + x)) / y)) / (y + x)
else if (x <= (-6.6d-171)) then
tmp = y * (x / ((y + x) * (y + x)))
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -0.11) {
tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x);
} else if (x <= -6.6e-171) {
tmp = y * (x / ((y + x) * (y + x)));
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -0.11: tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x) elif x <= -6.6e-171: tmp = y * (x / ((y + x) * (y + x))) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -0.11) tmp = Float64(Float64(1.0 / Float64(Float64(y + Float64(1.0 + x)) / y)) / Float64(y + x)); elseif (x <= -6.6e-171) tmp = Float64(y * Float64(x / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -0.11) tmp = (1.0 / ((y + (1.0 + x)) / y)) / (y + x); elseif (x <= -6.6e-171) tmp = y * (x / ((y + x) * (y + x))); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -0.11], N[(N[(1.0 / N[(N[(y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-171], N[(y * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.11:\\
\;\;\;\;\frac{\frac{1}{\frac{y + \left(1 + x\right)}{y}}}{y + x}\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-171}:\\
\;\;\;\;y \cdot \frac{x}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -0.110000000000000001Initial program 63.3%
associate-*r/82.8%
*-commutative82.8%
distribute-rgt1-in34.9%
fma-def82.8%
cube-unmult82.8%
Simplified82.8%
associate-*r/63.3%
fma-udef34.6%
cube-mult34.6%
distribute-rgt1-in63.3%
associate-+r+63.3%
*-commutative63.3%
frac-times87.4%
*-commutative87.4%
associate-/r*99.8%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
clear-num99.7%
clear-num99.7%
frac-times99.7%
metadata-eval99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-/r*99.7%
Simplified99.7%
Taylor expanded in y around 0 75.6%
if -0.110000000000000001 < x < -6.6000000000000004e-171Initial program 87.1%
times-frac92.9%
/-rgt-identity92.9%
associate-/l/92.9%
*-lft-identity92.9%
associate-+l+92.9%
Simplified92.9%
Taylor expanded in y around 0 72.7%
+-commutative72.7%
Simplified72.7%
Taylor expanded in x around 0 72.4%
if -6.6000000000000004e-171 < x Initial program 65.9%
associate-*r/82.5%
*-commutative82.5%
distribute-rgt1-in71.8%
fma-def82.5%
cube-unmult82.5%
Simplified82.5%
associate-*r/66.0%
fma-udef56.0%
cube-mult56.0%
distribute-rgt1-in65.9%
associate-+r+65.9%
*-commutative65.9%
frac-times86.4%
*-commutative86.4%
associate-/r*99.7%
associate-*r/99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 59.6%
+-commutative59.6%
Simplified59.6%
Final simplification65.2%
(FPCore (x y)
:precision binary64
(if (<= x -1.05e-97)
(/ 1.0 (/ x (/ y (+ 1.0 x))))
(if (or (<= x -1.9e-137) (not (<= x -6.6e-171)))
(/ x (+ y (* y y)))
(/ y x))))
double code(double x, double y) {
double tmp;
if (x <= -1.05e-97) {
tmp = 1.0 / (x / (y / (1.0 + x)));
} else if ((x <= -1.9e-137) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = y / x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.05d-97)) then
tmp = 1.0d0 / (x / (y / (1.0d0 + x)))
else if ((x <= (-1.9d-137)) .or. (.not. (x <= (-6.6d-171)))) then
tmp = x / (y + (y * y))
else
tmp = y / x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.05e-97) {
tmp = 1.0 / (x / (y / (1.0 + x)));
} else if ((x <= -1.9e-137) || !(x <= -6.6e-171)) {
tmp = x / (y + (y * y));
} else {
tmp = y / x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.05e-97: tmp = 1.0 / (x / (y / (1.0 + x))) elif (x <= -1.9e-137) or not (x <= -6.6e-171): tmp = x / (y + (y * y)) else: tmp = y / x return tmp
function code(x, y) tmp = 0.0 if (x <= -1.05e-97) tmp = Float64(1.0 / Float64(x / Float64(y / Float64(1.0 + x)))); elseif ((x <= -1.9e-137) || !(x <= -6.6e-171)) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(y / x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.05e-97) tmp = 1.0 / (x / (y / (1.0 + x))); elseif ((x <= -1.9e-137) || ~((x <= -6.6e-171))) tmp = x / (y + (y * y)); else tmp = y / x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.05e-97], N[(1.0 / N[(x / N[(y / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -1.9e-137], N[Not[LessEqual[x, -6.6e-171]], $MachinePrecision]], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-97}:\\
\;\;\;\;\frac{1}{\frac{x}{\frac{y}{1 + x}}}\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-137} \lor \neg \left(x \leq -6.6 \cdot 10^{-171}\right):\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\end{array}
if x < -1.0500000000000001e-97Initial program 68.2%
times-frac89.5%
/-rgt-identity89.5%
associate-/l/89.5%
*-lft-identity89.5%
associate-+l+89.5%
Simplified89.5%
Taylor expanded in y around 0 69.9%
clear-num69.9%
inv-pow69.9%
*-commutative69.9%
Applied egg-rr69.9%
unpow-169.9%
associate-/l*69.7%
Simplified69.7%
if -1.0500000000000001e-97 < x < -1.89999999999999999e-137 or -6.6000000000000004e-171 < x Initial program 67.7%
times-frac87.1%
/-rgt-identity87.1%
associate-/l/87.1%
*-lft-identity87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in x around 0 61.6%
distribute-rgt-in61.6%
*-lft-identity61.6%
Simplified61.6%
if -1.89999999999999999e-137 < x < -6.6000000000000004e-171Initial program 67.0%
times-frac76.6%
/-rgt-identity76.6%
associate-/l/76.6%
*-lft-identity76.6%
associate-+l+76.6%
Simplified76.6%
Taylor expanded in y around 0 46.0%
Taylor expanded in x around 0 46.0%
Final simplification63.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (* x x))))
(if (<= y -1.6e-129)
t_0
(if (<= y 1.25e-129)
(/ 1.0 (/ x y))
(if (<= y 120.0) t_0 (/ (/ x y) y))))))
double code(double x, double y) {
double t_0 = y / (x * x);
double tmp;
if (y <= -1.6e-129) {
tmp = t_0;
} else if (y <= 1.25e-129) {
tmp = 1.0 / (x / y);
} else if (y <= 120.0) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (x * x)
if (y <= (-1.6d-129)) then
tmp = t_0
else if (y <= 1.25d-129) then
tmp = 1.0d0 / (x / y)
else if (y <= 120.0d0) then
tmp = t_0
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (x * x);
double tmp;
if (y <= -1.6e-129) {
tmp = t_0;
} else if (y <= 1.25e-129) {
tmp = 1.0 / (x / y);
} else if (y <= 120.0) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = y / (x * x) tmp = 0 if y <= -1.6e-129: tmp = t_0 elif y <= 1.25e-129: tmp = 1.0 / (x / y) elif y <= 120.0: tmp = t_0 else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(y / Float64(x * x)) tmp = 0.0 if (y <= -1.6e-129) tmp = t_0; elseif (y <= 1.25e-129) tmp = Float64(1.0 / Float64(x / y)); elseif (y <= 120.0) tmp = t_0; else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (x * x); tmp = 0.0; if (y <= -1.6e-129) tmp = t_0; elseif (y <= 1.25e-129) tmp = 1.0 / (x / y); elseif (y <= 120.0) tmp = t_0; else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e-129], t$95$0, If[LessEqual[y, 1.25e-129], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 120.0], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{-129}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-129}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\
\mathbf{elif}\;y \leq 120:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -1.6000000000000001e-129 or 1.25000000000000007e-129 < y < 120Initial program 78.8%
associate-*r/91.4%
*-commutative91.4%
distribute-rgt1-in59.6%
fma-def91.4%
cube-unmult91.4%
Simplified91.4%
Taylor expanded in x around inf 36.5%
unpow236.5%
Simplified36.5%
if -1.6000000000000001e-129 < y < 1.25000000000000007e-129Initial program 58.0%
times-frac74.8%
/-rgt-identity74.8%
associate-/l/74.8%
*-lft-identity74.8%
associate-+l+74.8%
Simplified74.8%
Taylor expanded in y around 0 83.1%
clear-num82.9%
inv-pow82.9%
*-commutative82.9%
Applied egg-rr82.9%
unpow-182.9%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in x around 0 76.3%
if 120 < y Initial program 58.0%
associate-*r/80.9%
*-commutative80.9%
distribute-rgt1-in70.9%
fma-def80.9%
cube-unmult81.0%
Simplified81.0%
Taylor expanded in y around inf 68.1%
unpow268.1%
Simplified68.1%
*-un-lft-identity68.1%
times-frac70.7%
Applied egg-rr70.7%
associate-*l/70.8%
*-lft-identity70.8%
Simplified70.8%
Final simplification56.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ y x) x)))
(if (<= y -2.45e-127)
t_0
(if (<= y 7e-130) (/ 1.0 (/ x y)) (if (<= y 120.0) t_0 (/ (/ x y) y))))))
double code(double x, double y) {
double t_0 = (y / x) / x;
double tmp;
if (y <= -2.45e-127) {
tmp = t_0;
} else if (y <= 7e-130) {
tmp = 1.0 / (x / y);
} else if (y <= 120.0) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (y / x) / x
if (y <= (-2.45d-127)) then
tmp = t_0
else if (y <= 7d-130) then
tmp = 1.0d0 / (x / y)
else if (y <= 120.0d0) then
tmp = t_0
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / x) / x;
double tmp;
if (y <= -2.45e-127) {
tmp = t_0;
} else if (y <= 7e-130) {
tmp = 1.0 / (x / y);
} else if (y <= 120.0) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = (y / x) / x tmp = 0 if y <= -2.45e-127: tmp = t_0 elif y <= 7e-130: tmp = 1.0 / (x / y) elif y <= 120.0: tmp = t_0 else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(Float64(y / x) / x) tmp = 0.0 if (y <= -2.45e-127) tmp = t_0; elseif (y <= 7e-130) tmp = Float64(1.0 / Float64(x / y)); elseif (y <= 120.0) tmp = t_0; else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = (y / x) / x; tmp = 0.0; if (y <= -2.45e-127) tmp = t_0; elseif (y <= 7e-130) tmp = 1.0 / (x / y); elseif (y <= 120.0) tmp = t_0; else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[y, -2.45e-127], t$95$0, If[LessEqual[y, 7e-130], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 120.0], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{y}{x}}{x}\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{-127}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-130}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\
\mathbf{elif}\;y \leq 120:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -2.45e-127 or 6.9999999999999998e-130 < y < 120Initial program 78.8%
times-frac95.2%
/-rgt-identity95.2%
associate-/l/95.2%
*-lft-identity95.2%
associate-+l+95.2%
Simplified95.2%
Taylor expanded in x around inf 50.5%
Taylor expanded in x around inf 37.1%
associate-*l/37.1%
*-un-lft-identity37.1%
Applied egg-rr37.1%
if -2.45e-127 < y < 6.9999999999999998e-130Initial program 58.0%
times-frac74.8%
/-rgt-identity74.8%
associate-/l/74.8%
*-lft-identity74.8%
associate-+l+74.8%
Simplified74.8%
Taylor expanded in y around 0 83.1%
clear-num82.9%
inv-pow82.9%
*-commutative82.9%
Applied egg-rr82.9%
unpow-182.9%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in x around 0 76.3%
if 120 < y Initial program 58.0%
associate-*r/80.9%
*-commutative80.9%
distribute-rgt1-in70.9%
fma-def80.9%
cube-unmult81.0%
Simplified81.0%
Taylor expanded in y around inf 68.1%
unpow268.1%
Simplified68.1%
*-un-lft-identity68.1%
times-frac70.7%
Applied egg-rr70.7%
associate-*l/70.8%
*-lft-identity70.8%
Simplified70.8%
Final simplification56.4%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (/ y (* x x)) (if (<= x -3.3e-217) (- (/ y x) y) (/ x (* y y)))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = y / (x * x);
} else if (x <= -3.3e-217) {
tmp = (y / x) - y;
} else {
tmp = x / (y * y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = y / (x * x)
else if (x <= (-3.3d-217)) then
tmp = (y / x) - y
else
tmp = x / (y * 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 <= -3.3e-217) {
tmp = (y / x) - y;
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = y / (x * x) elif x <= -3.3e-217: tmp = (y / x) - y else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(y / Float64(x * x)); elseif (x <= -3.3e-217) tmp = Float64(Float64(y / x) - y); else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = y / (x * x); elseif (x <= -3.3e-217) tmp = (y / x) - y; else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.3e-217], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{-217}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if x < -1Initial program 63.3%
associate-*r/82.8%
*-commutative82.8%
distribute-rgt1-in34.9%
fma-def82.8%
cube-unmult82.8%
Simplified82.8%
Taylor expanded in x around inf 70.2%
unpow270.2%
Simplified70.2%
if -1 < x < -3.29999999999999993e-217Initial program 78.7%
times-frac84.9%
/-rgt-identity84.9%
associate-/l/84.9%
*-lft-identity84.9%
associate-+l+84.9%
Simplified84.9%
Taylor expanded in y around 0 32.5%
Taylor expanded in x around 0 32.5%
neg-mul-132.5%
unsub-neg32.5%
Simplified32.5%
if -3.29999999999999993e-217 < x Initial program 66.3%
associate-*r/83.9%
*-commutative83.9%
distribute-rgt1-in73.5%
fma-def84.0%
cube-unmult84.0%
Simplified84.0%
Taylor expanded in y around inf 42.3%
unpow242.3%
Simplified42.3%
Final simplification47.5%
(FPCore (x y) :precision binary64 (if (<= y 8.6e-18) (/ 1.0 (/ x y)) (/ x (* y y))))
double code(double x, double y) {
double tmp;
if (y <= 8.6e-18) {
tmp = 1.0 / (x / y);
} else {
tmp = x / (y * y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 8.6d-18) then
tmp = 1.0d0 / (x / y)
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 8.6e-18) {
tmp = 1.0 / (x / y);
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 8.6e-18: tmp = 1.0 / (x / y) else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= 8.6e-18) tmp = Float64(1.0 / Float64(x / y)); else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 8.6e-18) tmp = 1.0 / (x / y); else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 8.6e-18], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < 8.6000000000000005e-18Initial program 70.1%
times-frac87.2%
/-rgt-identity87.2%
associate-/l/87.2%
*-lft-identity87.2%
associate-+l+87.2%
Simplified87.2%
Taylor expanded in y around 0 56.8%
clear-num56.7%
inv-pow56.7%
*-commutative56.7%
Applied egg-rr56.7%
unpow-156.7%
associate-/l*57.1%
Simplified57.1%
Taylor expanded in x around 0 37.3%
if 8.6000000000000005e-18 < y Initial program 61.7%
associate-*r/82.6%
*-commutative82.6%
distribute-rgt1-in69.1%
fma-def82.6%
cube-unmult82.6%
Simplified82.6%
Taylor expanded in y around inf 62.9%
unpow262.9%
Simplified62.9%
Final simplification44.2%
(FPCore (x y) :precision binary64 (/ 1.0 (/ x y)))
double code(double x, double y) {
return 1.0 / (x / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / (x / y)
end function
public static double code(double x, double y) {
return 1.0 / (x / y);
}
def code(x, y): return 1.0 / (x / y)
function code(x, y) return Float64(1.0 / Float64(x / y)) end
function tmp = code(x, y) tmp = 1.0 / (x / y); end
code[x_, y_] := N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{x}{y}}
\end{array}
Initial program 67.8%
times-frac87.5%
/-rgt-identity87.5%
associate-/l/87.5%
*-lft-identity87.5%
associate-+l+87.5%
Simplified87.5%
Taylor expanded in y around 0 49.3%
clear-num49.2%
inv-pow49.2%
*-commutative49.2%
Applied egg-rr49.2%
unpow-149.2%
associate-/l*49.3%
Simplified49.3%
Taylor expanded in x around 0 28.0%
Final simplification28.0%
(FPCore (x y) :precision binary64 (/ 1.0 y))
double code(double x, double y) {
return 1.0 / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / y
end function
public static double code(double x, double y) {
return 1.0 / y;
}
def code(x, y): return 1.0 / y
function code(x, y) return Float64(1.0 / y) end
function tmp = code(x, y) tmp = 1.0 / y; end
code[x_, y_] := N[(1.0 / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y}
\end{array}
Initial program 67.8%
times-frac87.5%
/-rgt-identity87.5%
associate-/l/87.5%
*-lft-identity87.5%
associate-+l+87.5%
Simplified87.5%
Taylor expanded in x around inf 44.2%
Taylor expanded in x around 0 4.0%
Final simplification4.0%
(FPCore (x y) :precision binary64 (/ y x))
double code(double x, double y) {
return y / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y / x
end function
public static double code(double x, double y) {
return y / x;
}
def code(x, y): return y / x
function code(x, y) return Float64(y / x) end
function tmp = code(x, y) tmp = y / x; end
code[x_, y_] := N[(y / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{x}
\end{array}
Initial program 67.8%
times-frac87.5%
/-rgt-identity87.5%
associate-/l/87.5%
*-lft-identity87.5%
associate-+l+87.5%
Simplified87.5%
Taylor expanded in y around 0 49.3%
Taylor expanded in x around 0 27.8%
Final simplification27.8%
(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 67.8%
associate-*r/83.5%
*-commutative83.5%
distribute-rgt1-in63.2%
fma-def83.5%
cube-unmult83.5%
Simplified83.5%
associate-*r/67.9%
fma-udef52.9%
cube-mult52.9%
distribute-rgt1-in67.8%
associate-+r+67.8%
*-commutative67.8%
frac-times87.5%
*-commutative87.5%
associate-/r*99.7%
associate-*r/99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 50.2%
Taylor expanded in x 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 2023208
(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))))