
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
(FPCore (x y) :precision binary64 (- (+ 1.0 (/ -1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((-1.0d0) / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Initial program 99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(if (<= y -1.4e+87)
(* -0.3333333333333333 (/ y (sqrt x)))
(if (<= y 4600000000000.0)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(+ 1.0 (* (sqrt (/ 1.0 x)) (* y -0.3333333333333333))))))
double code(double x, double y) {
double tmp;
if (y <= -1.4e+87) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 4600000000000.0) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (sqrt((1.0 / x)) * (y * -0.3333333333333333));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.4d+87)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 4600000000000.0d0) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 + (sqrt((1.0d0 / x)) * (y * (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.4e+87) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 4600000000000.0) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (Math.sqrt((1.0 / x)) * (y * -0.3333333333333333));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.4e+87: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 4600000000000.0: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 + (math.sqrt((1.0 / x)) * (y * -0.3333333333333333)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.4e+87) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 4600000000000.0) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 + Float64(sqrt(Float64(1.0 / x)) * Float64(y * -0.3333333333333333))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.4e+87) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 4600000000000.0) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 + (sqrt((1.0 / x)) * (y * -0.3333333333333333)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.4e+87], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4600000000000.0], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+87}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 4600000000000:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 + \sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if y < -1.40000000000000008e87Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 93.3%
*-commutative93.3%
*-commutative93.3%
Simplified93.3%
sqrt-div93.2%
metadata-eval93.2%
un-div-inv93.4%
Applied egg-rr93.4%
if -1.40000000000000008e87 < y < 4.6e12Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 96.8%
add-sqr-sqrt0.0%
sqrt-unprod43.0%
frac-times43.0%
metadata-eval43.0%
metadata-eval43.0%
frac-times43.0%
sqrt-unprod43.1%
add-sqr-sqrt43.1%
frac-2neg43.1%
metadata-eval43.1%
distribute-frac-neg243.1%
Applied egg-rr43.1%
add-sqr-sqrt0.0%
sqrt-unprod74.5%
frac-times74.6%
metadata-eval74.6%
metadata-eval74.6%
frac-times74.5%
sqrt-unprod96.6%
add-sqr-sqrt96.8%
clear-num96.8%
div-inv96.9%
metadata-eval96.9%
inv-pow96.9%
Applied egg-rr96.9%
unpow-196.9%
associate-/r*96.9%
Applied egg-rr96.9%
if 4.6e12 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.2%
associate-*r*94.0%
*-commutative94.0%
associate-*l*94.2%
Simplified94.2%
Final simplification95.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.45e+86)
(* -0.3333333333333333 (/ y (sqrt x)))
(if (<= y 4600000000000.0)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(- 1.0 (* 0.3333333333333333 (* y (sqrt (/ 1.0 x))))))))
double code(double x, double y) {
double tmp;
if (y <= -1.45e+86) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 4600000000000.0) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - (0.3333333333333333 * (y * sqrt((1.0 / x))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.45d+86)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 4600000000000.0d0) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 - (0.3333333333333333d0 * (y * sqrt((1.0d0 / x))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.45e+86) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 4600000000000.0) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - (0.3333333333333333 * (y * Math.sqrt((1.0 / x))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.45e+86: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 4600000000000.0: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 - (0.3333333333333333 * (y * math.sqrt((1.0 / x)))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.45e+86) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 4600000000000.0) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 - Float64(0.3333333333333333 * Float64(y * sqrt(Float64(1.0 / x))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.45e+86) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 4600000000000.0) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 - (0.3333333333333333 * (y * sqrt((1.0 / x)))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.45e+86], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4600000000000.0], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(0.3333333333333333 * N[(y * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+86}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 4600000000000:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 - 0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\
\end{array}
\end{array}
if y < -1.44999999999999995e86Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 93.3%
*-commutative93.3%
*-commutative93.3%
Simplified93.3%
sqrt-div93.2%
metadata-eval93.2%
un-div-inv93.4%
Applied egg-rr93.4%
if -1.44999999999999995e86 < y < 4.6e12Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 96.8%
add-sqr-sqrt0.0%
sqrt-unprod43.0%
frac-times43.0%
metadata-eval43.0%
metadata-eval43.0%
frac-times43.0%
sqrt-unprod43.1%
add-sqr-sqrt43.1%
frac-2neg43.1%
metadata-eval43.1%
distribute-frac-neg243.1%
Applied egg-rr43.1%
add-sqr-sqrt0.0%
sqrt-unprod74.5%
frac-times74.6%
metadata-eval74.6%
metadata-eval74.6%
frac-times74.5%
sqrt-unprod96.6%
add-sqr-sqrt96.8%
clear-num96.8%
div-inv96.9%
metadata-eval96.9%
inv-pow96.9%
Applied egg-rr96.9%
unpow-196.9%
associate-/r*96.9%
Applied egg-rr96.9%
if 4.6e12 < y Initial program 99.6%
Taylor expanded in x around inf 94.2%
Final simplification95.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (sqrt x))))
(if (<= y -1.5e+86)
(* -0.3333333333333333 t_0)
(if (<= y 4600000000000.0)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(- 1.0 (* t_0 0.3333333333333333))))))
double code(double x, double y) {
double t_0 = y / sqrt(x);
double tmp;
if (y <= -1.5e+86) {
tmp = -0.3333333333333333 * t_0;
} else if (y <= 4600000000000.0) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - (t_0 * 0.3333333333333333);
}
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 / sqrt(x)
if (y <= (-1.5d+86)) then
tmp = (-0.3333333333333333d0) * t_0
else if (y <= 4600000000000.0d0) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 - (t_0 * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / Math.sqrt(x);
double tmp;
if (y <= -1.5e+86) {
tmp = -0.3333333333333333 * t_0;
} else if (y <= 4600000000000.0) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - (t_0 * 0.3333333333333333);
}
return tmp;
}
def code(x, y): t_0 = y / math.sqrt(x) tmp = 0 if y <= -1.5e+86: tmp = -0.3333333333333333 * t_0 elif y <= 4600000000000.0: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 - (t_0 * 0.3333333333333333) return tmp
function code(x, y) t_0 = Float64(y / sqrt(x)) tmp = 0.0 if (y <= -1.5e+86) tmp = Float64(-0.3333333333333333 * t_0); elseif (y <= 4600000000000.0) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 - Float64(t_0 * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / sqrt(x); tmp = 0.0; if (y <= -1.5e+86) tmp = -0.3333333333333333 * t_0; elseif (y <= 4600000000000.0) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 - (t_0 * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e+86], N[(-0.3333333333333333 * t$95$0), $MachinePrecision], If[LessEqual[y, 4600000000000.0], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(t$95$0 * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{\sqrt{x}}\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+86}:\\
\;\;\;\;-0.3333333333333333 \cdot t\_0\\
\mathbf{elif}\;y \leq 4600000000000:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 - t\_0 \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -1.49999999999999988e86Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 93.3%
*-commutative93.3%
*-commutative93.3%
Simplified93.3%
sqrt-div93.2%
metadata-eval93.2%
un-div-inv93.4%
Applied egg-rr93.4%
if -1.49999999999999988e86 < y < 4.6e12Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 96.8%
add-sqr-sqrt0.0%
sqrt-unprod43.0%
frac-times43.0%
metadata-eval43.0%
metadata-eval43.0%
frac-times43.0%
sqrt-unprod43.1%
add-sqr-sqrt43.1%
frac-2neg43.1%
metadata-eval43.1%
distribute-frac-neg243.1%
Applied egg-rr43.1%
add-sqr-sqrt0.0%
sqrt-unprod74.5%
frac-times74.6%
metadata-eval74.6%
metadata-eval74.6%
frac-times74.5%
sqrt-unprod96.6%
add-sqr-sqrt96.8%
clear-num96.8%
div-inv96.9%
metadata-eval96.9%
inv-pow96.9%
Applied egg-rr96.9%
unpow-196.9%
associate-/r*96.9%
Applied egg-rr96.9%
if 4.6e12 < y Initial program 99.6%
Taylor expanded in x around inf 94.2%
pow194.2%
associate-*r*94.0%
metadata-eval94.0%
sqrt-prod94.1%
div-inv94.1%
sqrt-div93.9%
metadata-eval93.9%
Applied egg-rr93.9%
unpow193.9%
associate-*l/94.1%
associate-*r/94.2%
Simplified94.2%
Final simplification95.8%
(FPCore (x y)
:precision binary64
(if (<= y -1.7e+86)
(* -0.3333333333333333 (/ y (sqrt x)))
(if (<= y 3.1e+114)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(* -0.3333333333333333 (* y (pow x -0.5))))))
double code(double x, double y) {
double tmp;
if (y <= -1.7e+86) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 3.1e+114) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = -0.3333333333333333 * (y * pow(x, -0.5));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.7d+86)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 3.1d+114) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = (-0.3333333333333333d0) * (y * (x ** (-0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.7e+86) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 3.1e+114) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = -0.3333333333333333 * (y * Math.pow(x, -0.5));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.7e+86: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 3.1e+114: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = -0.3333333333333333 * (y * math.pow(x, -0.5)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.7e+86) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 3.1e+114) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(-0.3333333333333333 * Float64(y * (x ^ -0.5))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.7e+86) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 3.1e+114) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = -0.3333333333333333 * (y * (x ^ -0.5)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.7e+86], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+114], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(y * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+86}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+114}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot {x}^{-0.5}\right)\\
\end{array}
\end{array}
if y < -1.6999999999999999e86Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 93.3%
*-commutative93.3%
*-commutative93.3%
Simplified93.3%
sqrt-div93.2%
metadata-eval93.2%
un-div-inv93.4%
Applied egg-rr93.4%
if -1.6999999999999999e86 < y < 3.1e114Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 92.1%
add-sqr-sqrt0.0%
sqrt-unprod43.3%
frac-times43.3%
metadata-eval43.3%
metadata-eval43.3%
frac-times43.3%
sqrt-unprod43.4%
add-sqr-sqrt43.4%
frac-2neg43.4%
metadata-eval43.4%
distribute-frac-neg243.4%
Applied egg-rr43.4%
add-sqr-sqrt0.0%
sqrt-unprod71.3%
frac-times71.4%
metadata-eval71.4%
metadata-eval71.4%
frac-times71.3%
sqrt-unprod91.9%
add-sqr-sqrt92.1%
clear-num92.1%
div-inv92.2%
metadata-eval92.2%
inv-pow92.2%
Applied egg-rr92.2%
unpow-192.2%
associate-/r*92.2%
Applied egg-rr92.2%
if 3.1e114 < y Initial program 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 98.2%
*-commutative98.2%
*-commutative98.2%
Simplified98.2%
*-un-lft-identity98.2%
inv-pow98.2%
sqrt-pow198.2%
metadata-eval98.2%
Applied egg-rr98.2%
*-lft-identity98.2%
Simplified98.2%
Final simplification93.1%
(FPCore (x y)
:precision binary64
(if (<= y -1.4e+89)
(* -0.3333333333333333 (/ y (sqrt x)))
(if (<= y 3.1e+114)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(* (pow x -0.5) (* y -0.3333333333333333)))))
double code(double x, double y) {
double tmp;
if (y <= -1.4e+89) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else if (y <= 3.1e+114) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = pow(x, -0.5) * (y * -0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.4d+89)) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else if (y <= 3.1d+114) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = (x ** (-0.5d0)) * (y * (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.4e+89) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else if (y <= 3.1e+114) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = Math.pow(x, -0.5) * (y * -0.3333333333333333);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.4e+89: tmp = -0.3333333333333333 * (y / math.sqrt(x)) elif y <= 3.1e+114: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = math.pow(x, -0.5) * (y * -0.3333333333333333) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.4e+89) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); elseif (y <= 3.1e+114) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64((x ^ -0.5) * Float64(y * -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.4e+89) tmp = -0.3333333333333333 * (y / sqrt(x)); elseif (y <= 3.1e+114) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = (x ^ -0.5) * (y * -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.4e+89], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+114], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(N[Power[x, -0.5], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+89}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+114}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;{x}^{-0.5} \cdot \left(y \cdot -0.3333333333333333\right)\\
\end{array}
\end{array}
if y < -1.3999999999999999e89Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 93.3%
*-commutative93.3%
*-commutative93.3%
Simplified93.3%
sqrt-div93.2%
metadata-eval93.2%
un-div-inv93.4%
Applied egg-rr93.4%
if -1.3999999999999999e89 < y < 3.1e114Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 92.1%
add-sqr-sqrt0.0%
sqrt-unprod43.3%
frac-times43.3%
metadata-eval43.3%
metadata-eval43.3%
frac-times43.3%
sqrt-unprod43.4%
add-sqr-sqrt43.4%
frac-2neg43.4%
metadata-eval43.4%
distribute-frac-neg243.4%
Applied egg-rr43.4%
add-sqr-sqrt0.0%
sqrt-unprod71.3%
frac-times71.4%
metadata-eval71.4%
metadata-eval71.4%
frac-times71.3%
sqrt-unprod91.9%
add-sqr-sqrt92.1%
clear-num92.1%
div-inv92.2%
metadata-eval92.2%
inv-pow92.2%
Applied egg-rr92.2%
unpow-192.2%
associate-/r*92.2%
Applied egg-rr92.2%
if 3.1e114 < y Initial program 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 98.2%
*-commutative98.2%
*-commutative98.2%
Simplified98.2%
pow198.2%
*-commutative98.2%
sqrt-div98.2%
metadata-eval98.2%
un-div-inv98.2%
Applied egg-rr98.2%
unpow198.2%
associate-*r/98.1%
Simplified98.1%
clear-num98.1%
associate-/r/98.1%
pow1/298.1%
pow-flip98.2%
metadata-eval98.2%
*-commutative98.2%
Applied egg-rr98.2%
Final simplification93.1%
(FPCore (x y) :precision binary64 (if (or (<= y -1.32e+88) (not (<= y 3.1e+114))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -1.32e+88) || !(y <= 3.1e+114)) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else {
tmp = 1.0 + ((-1.0 / x) / 9.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.32d+88)) .or. (.not. (y <= 3.1d+114))) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.32e+88) || !(y <= 3.1e+114)) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else {
tmp = 1.0 + ((-1.0 / x) / 9.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.32e+88) or not (y <= 3.1e+114): tmp = y * (-0.3333333333333333 / math.sqrt(x)) else: tmp = 1.0 + ((-1.0 / x) / 9.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.32e+88) || !(y <= 3.1e+114)) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.32e+88) || ~((y <= 3.1e+114))) tmp = y * (-0.3333333333333333 / sqrt(x)); else tmp = 1.0 + ((-1.0 / x) / 9.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.32e+88], N[Not[LessEqual[y, 3.1e+114]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+88} \lor \neg \left(y \leq 3.1 \cdot 10^{+114}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -1.3200000000000001e88 or 3.1e114 < y Initial program 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 95.3%
*-commutative95.3%
*-commutative95.3%
Simplified95.3%
pow195.3%
*-commutative95.3%
sqrt-div95.3%
metadata-eval95.3%
un-div-inv95.4%
Applied egg-rr95.4%
unpow195.4%
associate-*r/95.3%
Simplified95.3%
*-commutative95.3%
associate-/l*95.2%
Applied egg-rr95.2%
if -1.3200000000000001e88 < y < 3.1e114Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 92.1%
add-sqr-sqrt0.0%
sqrt-unprod43.3%
frac-times43.3%
metadata-eval43.3%
metadata-eval43.3%
frac-times43.3%
sqrt-unprod43.4%
add-sqr-sqrt43.4%
frac-2neg43.4%
metadata-eval43.4%
distribute-frac-neg243.4%
Applied egg-rr43.4%
add-sqr-sqrt0.0%
sqrt-unprod71.3%
frac-times71.4%
metadata-eval71.4%
metadata-eval71.4%
frac-times71.3%
sqrt-unprod91.9%
add-sqr-sqrt92.1%
clear-num92.1%
div-inv92.2%
metadata-eval92.2%
inv-pow92.2%
Applied egg-rr92.2%
unpow-192.2%
associate-/r*92.2%
Applied egg-rr92.2%
Final simplification93.0%
(FPCore (x y) :precision binary64 (if (or (<= y -1.5e+86) (not (<= y 3.1e+114))) (* -0.3333333333333333 (/ y (sqrt x))) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -1.5e+86) || !(y <= 3.1e+114)) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else {
tmp = 1.0 + ((-1.0 / x) / 9.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.5d+86)) .or. (.not. (y <= 3.1d+114))) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -1.5e+86) || !(y <= 3.1e+114)) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else {
tmp = 1.0 + ((-1.0 / x) / 9.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.5e+86) or not (y <= 3.1e+114): tmp = -0.3333333333333333 * (y / math.sqrt(x)) else: tmp = 1.0 + ((-1.0 / x) / 9.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.5e+86) || !(y <= 3.1e+114)) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.5e+86) || ~((y <= 3.1e+114))) tmp = -0.3333333333333333 * (y / sqrt(x)); else tmp = 1.0 + ((-1.0 / x) / 9.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.5e+86], N[Not[LessEqual[y, 3.1e+114]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+86} \lor \neg \left(y \leq 3.1 \cdot 10^{+114}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -1.49999999999999988e86 or 3.1e114 < y Initial program 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 95.3%
*-commutative95.3%
*-commutative95.3%
Simplified95.3%
sqrt-div95.3%
metadata-eval95.3%
un-div-inv95.4%
Applied egg-rr95.4%
if -1.49999999999999988e86 < y < 3.1e114Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 92.1%
add-sqr-sqrt0.0%
sqrt-unprod43.3%
frac-times43.3%
metadata-eval43.3%
metadata-eval43.3%
frac-times43.3%
sqrt-unprod43.4%
add-sqr-sqrt43.4%
frac-2neg43.4%
metadata-eval43.4%
distribute-frac-neg243.4%
Applied egg-rr43.4%
add-sqr-sqrt0.0%
sqrt-unprod71.3%
frac-times71.4%
metadata-eval71.4%
metadata-eval71.4%
frac-times71.3%
sqrt-unprod91.9%
add-sqr-sqrt92.1%
clear-num92.1%
div-inv92.2%
metadata-eval92.2%
inv-pow92.2%
Applied egg-rr92.2%
unpow-192.2%
associate-/r*92.2%
Applied egg-rr92.2%
Final simplification93.1%
(FPCore (x y) :precision binary64 (if (<= x 0.00072) (/ (- (* -0.3333333333333333 (* y (sqrt x))) 0.1111111111111111) x) (- 1.0 (* (/ y (sqrt x)) 0.3333333333333333))))
double code(double x, double y) {
double tmp;
if (x <= 0.00072) {
tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.00072d0) then
tmp = (((-0.3333333333333333d0) * (y * sqrt(x))) - 0.1111111111111111d0) / x
else
tmp = 1.0d0 - ((y / sqrt(x)) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.00072) {
tmp = ((-0.3333333333333333 * (y * Math.sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - ((y / Math.sqrt(x)) * 0.3333333333333333);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.00072: tmp = ((-0.3333333333333333 * (y * math.sqrt(x))) - 0.1111111111111111) / x else: tmp = 1.0 - ((y / math.sqrt(x)) * 0.3333333333333333) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.00072) tmp = Float64(Float64(Float64(-0.3333333333333333 * Float64(y * sqrt(x))) - 0.1111111111111111) / x); else tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.00072) tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x; else tmp = 1.0 - ((y / sqrt(x)) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.00072], N[(N[(N[(-0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.00072:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x}} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if x < 7.20000000000000045e-4Initial program 99.5%
sub-neg99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
distribute-frac-neg99.4%
neg-mul-199.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in x around 0 99.0%
if 7.20000000000000045e-4 < x Initial program 99.9%
Taylor expanded in x around inf 98.5%
pow198.5%
associate-*r*98.4%
metadata-eval98.4%
sqrt-prod98.5%
div-inv98.5%
sqrt-div98.4%
metadata-eval98.4%
Applied egg-rr98.4%
unpow198.4%
associate-*l/98.4%
associate-*r/98.5%
Simplified98.5%
Final simplification98.8%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Initial program 99.7%
Taylor expanded in x around 0 99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (if (<= y 1.5e+154) (+ 1.0 (/ (/ -1.0 x) 9.0)) (- 1.0 (* (/ 0.1111111111111111 y) (/ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 1.5e+154) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - ((0.1111111111111111 / y) * (y / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.5d+154) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 - ((0.1111111111111111d0 / y) * (y / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.5e+154) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 - ((0.1111111111111111 / y) * (y / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.5e+154: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 - ((0.1111111111111111 / y) * (y / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.5e+154) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 - Float64(Float64(0.1111111111111111 / y) * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.5e+154) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 - ((0.1111111111111111 / y) * (y / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.5e+154], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(0.1111111111111111 / y), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.5 \cdot 10^{+154}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{0.1111111111111111}{y} \cdot \frac{y}{x}\\
\end{array}
\end{array}
if y < 1.50000000000000013e154Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 74.2%
add-sqr-sqrt0.0%
sqrt-unprod36.0%
frac-times36.0%
metadata-eval36.0%
metadata-eval36.0%
frac-times36.0%
sqrt-unprod35.2%
add-sqr-sqrt35.2%
frac-2neg35.2%
metadata-eval35.2%
distribute-frac-neg235.2%
Applied egg-rr35.2%
add-sqr-sqrt0.0%
sqrt-unprod57.1%
frac-times57.1%
metadata-eval57.1%
metadata-eval57.1%
frac-times57.1%
sqrt-unprod74.1%
add-sqr-sqrt74.2%
clear-num74.2%
div-inv74.3%
metadata-eval74.3%
inv-pow74.3%
Applied egg-rr74.3%
unpow-174.3%
associate-/r*74.3%
Applied egg-rr74.3%
if 1.50000000000000013e154 < y Initial program 99.6%
Taylor expanded in y around inf 99.3%
Taylor expanded in x around 0 87.1%
mul-1-neg87.1%
unsub-neg87.1%
div-sub87.1%
*-inverses87.1%
*-commutative87.1%
associate-/l*91.8%
fma-define91.8%
associate-*r/91.8%
metadata-eval91.8%
Simplified91.8%
Taylor expanded in y around 0 37.0%
Final simplification70.9%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -1.0 (* x 9.0))))
double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
end function
public static double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
def code(x, y): return 1.0 + (-1.0 / (x * 9.0))
function code(x, y) return Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) end
function tmp = code(x, y) tmp = 1.0 + (-1.0 / (x * 9.0)); end
code[x_, y_] := N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-1}{x \cdot 9}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 67.9%
add-sqr-sqrt0.0%
sqrt-unprod32.8%
frac-times32.8%
metadata-eval32.8%
metadata-eval32.8%
frac-times32.8%
sqrt-unprod32.1%
add-sqr-sqrt32.1%
frac-2neg32.1%
metadata-eval32.1%
distribute-frac-neg232.1%
Applied egg-rr32.1%
add-sqr-sqrt0.0%
sqrt-unprod53.8%
frac-times53.8%
metadata-eval53.8%
metadata-eval53.8%
frac-times53.8%
sqrt-unprod67.8%
add-sqr-sqrt67.9%
clear-num67.9%
div-inv67.9%
metadata-eval67.9%
inv-pow67.9%
Applied egg-rr67.9%
unpow-167.9%
Applied egg-rr67.9%
Final simplification67.9%
(FPCore (x y) :precision binary64 (+ 1.0 (/ (/ -1.0 x) 9.0)))
double code(double x, double y) {
return 1.0 + ((-1.0 / x) / 9.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
end function
public static double code(double x, double y) {
return 1.0 + ((-1.0 / x) / 9.0);
}
def code(x, y): return 1.0 + ((-1.0 / x) / 9.0)
function code(x, y) return Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)) end
function tmp = code(x, y) tmp = 1.0 + ((-1.0 / x) / 9.0); end
code[x_, y_] := N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{\frac{-1}{x}}{9}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 67.9%
add-sqr-sqrt0.0%
sqrt-unprod32.8%
frac-times32.8%
metadata-eval32.8%
metadata-eval32.8%
frac-times32.8%
sqrt-unprod32.1%
add-sqr-sqrt32.1%
frac-2neg32.1%
metadata-eval32.1%
distribute-frac-neg232.1%
Applied egg-rr32.1%
add-sqr-sqrt0.0%
sqrt-unprod53.8%
frac-times53.8%
metadata-eval53.8%
metadata-eval53.8%
frac-times53.8%
sqrt-unprod67.8%
add-sqr-sqrt67.9%
clear-num67.9%
div-inv67.9%
metadata-eval67.9%
inv-pow67.9%
Applied egg-rr67.9%
unpow-167.9%
associate-/r*67.9%
Applied egg-rr67.9%
Final simplification67.9%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y): return 1.0 + (-0.1111111111111111 / x)
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 67.9%
Final simplification67.9%
(FPCore (x y) :precision binary64 (/ 0.1111111111111111 (- x)))
double code(double x, double y) {
return 0.1111111111111111 / -x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 0.1111111111111111d0 / -x
end function
public static double code(double x, double y) {
return 0.1111111111111111 / -x;
}
def code(x, y): return 0.1111111111111111 / -x
function code(x, y) return Float64(0.1111111111111111 / Float64(-x)) end
function tmp = code(x, y) tmp = 0.1111111111111111 / -x; end
code[x_, y_] := N[(0.1111111111111111 / (-x)), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.1111111111111111}{-x}
\end{array}
Initial program 99.7%
Taylor expanded in x around 0 63.3%
mul-1-neg63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in y around 0 36.9%
Final simplification36.9%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - ((1.0d0 / x) / 9.0d0)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(Float64(1.0 / x) / 9.0)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(N[(1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
herbie shell --seed 2024066
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))