
(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 15 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 (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((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))) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y) :precision binary64 (if (or (<= y -1.5e+32) (not (<= y 2.5e+72))) (+ 1.0 (/ y (- (sqrt (* x 9.0))))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -1.5e+32) || !(y <= 2.5e+72)) {
tmp = 1.0 + (y / -sqrt((x * 9.0)));
} 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+32)) .or. (.not. (y <= 2.5d+72))) then
tmp = 1.0d0 + (y / -sqrt((x * 9.0d0)))
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+32) || !(y <= 2.5e+72)) {
tmp = 1.0 + (y / -Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.5e+32) or not (y <= 2.5e+72): tmp = 1.0 + (y / -math.sqrt((x * 9.0))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.5e+32) || !(y <= 2.5e+72)) tmp = Float64(1.0 + Float64(y / Float64(-sqrt(Float64(x * 9.0))))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -1.5e+32) || ~((y <= 2.5e+72))) tmp = 1.0 + (y / -sqrt((x * 9.0))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.5e+32], N[Not[LessEqual[y, 2.5e+72]], $MachinePrecision]], N[(1.0 + N[(y / (-N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+32} \lor \neg \left(y \leq 2.5 \cdot 10^{+72}\right):\\
\;\;\;\;1 + \frac{y}{-\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -1.5e32 or 2.49999999999999996e72 < y Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 93.2%
*-commutative93.2%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
expm1-log1p-u49.1%
expm1-udef49.1%
*-commutative49.1%
sqrt-div49.1%
metadata-eval49.1%
un-div-inv49.1%
*-commutative49.1%
Applied egg-rr49.1%
expm1-def49.1%
expm1-log1p93.2%
associate-/l*93.2%
Simplified93.2%
div-inv93.4%
metadata-eval93.4%
metadata-eval93.4%
metadata-eval93.4%
distribute-rgt-neg-in93.4%
sqrt-prod93.4%
add-sqr-sqrt93.1%
distribute-rgt-neg-in93.1%
pow1/293.1%
sqrt-pow193.2%
metadata-eval93.2%
pow1/293.2%
sqrt-pow193.2%
metadata-eval93.2%
Applied egg-rr93.2%
distribute-rgt-neg-out93.2%
pow-sqr93.4%
metadata-eval93.4%
unpow1/293.4%
Simplified93.4%
if -1.5e32 < y < 2.49999999999999996e72Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 97.4%
cancel-sign-sub-inv97.4%
metadata-eval97.4%
associate-*r/97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified97.4%
add-sqr-sqrt0.0%
sqrt-unprod42.1%
frac-times42.1%
metadata-eval42.1%
metadata-eval42.1%
frac-times42.1%
sqrt-unprod42.1%
add-sqr-sqrt42.1%
clear-num42.1%
div-inv42.1%
metadata-eval42.1%
inv-pow42.1%
Applied egg-rr42.1%
unpow-prod-down42.1%
metadata-eval42.1%
metadata-eval42.1%
sqrt-pow142.1%
metadata-eval42.1%
sqrt-prod42.1%
*-commutative42.1%
metadata-eval42.1%
metadata-eval42.1%
pow-prod-up42.1%
inv-pow42.1%
inv-pow42.1%
swap-sqr42.1%
div-inv42.1%
div-inv42.1%
sqrt-unprod0.0%
add-sqr-sqrt97.4%
metadata-eval97.4%
distribute-neg-frac97.4%
clear-num97.5%
distribute-neg-frac97.5%
metadata-eval97.5%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Final simplification95.6%
(FPCore (x y) :precision binary64 (if (or (<= y -5.5e+93) (not (<= y 1.55e+74))) (* (sqrt (/ 1.0 x)) (* y -0.3333333333333333)) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -5.5e+93) || !(y <= 1.55e+74)) {
tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333);
} 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 <= (-5.5d+93)) .or. (.not. (y <= 1.55d+74))) then
tmp = sqrt((1.0d0 / x)) * (y * (-0.3333333333333333d0))
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 <= -5.5e+93) || !(y <= 1.55e+74)) {
tmp = Math.sqrt((1.0 / x)) * (y * -0.3333333333333333);
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5.5e+93) or not (y <= 1.55e+74): tmp = math.sqrt((1.0 / x)) * (y * -0.3333333333333333) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5.5e+93) || !(y <= 1.55e+74)) tmp = Float64(sqrt(Float64(1.0 / x)) * Float64(y * -0.3333333333333333)); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -5.5e+93) || ~((y <= 1.55e+74))) tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5.5e+93], N[Not[LessEqual[y, 1.55e+74]], $MachinePrecision]], N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+93} \lor \neg \left(y \leq 1.55 \cdot 10^{+74}\right):\\
\;\;\;\;\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -5.5000000000000003e93 or 1.55000000000000011e74 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 93.6%
*-commutative93.6%
associate-*l*93.5%
Simplified93.5%
if -5.5000000000000003e93 < y < 1.55000000000000011e74Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 93.4%
cancel-sign-sub-inv93.4%
metadata-eval93.4%
associate-*r/93.4%
metadata-eval93.4%
+-commutative93.4%
Simplified93.4%
add-sqr-sqrt0.0%
sqrt-unprod40.7%
frac-times40.7%
metadata-eval40.7%
metadata-eval40.7%
frac-times40.7%
sqrt-unprod40.8%
add-sqr-sqrt40.8%
clear-num40.8%
div-inv40.8%
metadata-eval40.8%
inv-pow40.8%
Applied egg-rr40.8%
unpow-prod-down40.8%
metadata-eval40.8%
metadata-eval40.8%
sqrt-pow140.7%
metadata-eval40.7%
sqrt-prod40.7%
*-commutative40.7%
metadata-eval40.7%
metadata-eval40.7%
pow-prod-up40.7%
inv-pow40.7%
inv-pow40.7%
swap-sqr40.7%
div-inv40.7%
div-inv40.7%
sqrt-unprod0.0%
add-sqr-sqrt93.4%
metadata-eval93.4%
distribute-neg-frac93.4%
clear-num93.5%
distribute-neg-frac93.5%
metadata-eval93.5%
div-inv93.6%
metadata-eval93.6%
Applied egg-rr93.6%
Final simplification93.5%
(FPCore (x y) :precision binary64 (if (or (<= y -4.2e+93) (not (<= y 3.9e+72))) (* -0.3333333333333333 (* y (sqrt (/ 1.0 x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -4.2e+93) || !(y <= 3.9e+72)) {
tmp = -0.3333333333333333 * (y * sqrt((1.0 / 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 <= (-4.2d+93)) .or. (.not. (y <= 3.9d+72))) then
tmp = (-0.3333333333333333d0) * (y * sqrt((1.0d0 / 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 <= -4.2e+93) || !(y <= 3.9e+72)) {
tmp = -0.3333333333333333 * (y * Math.sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -4.2e+93) or not (y <= 3.9e+72): tmp = -0.3333333333333333 * (y * math.sqrt((1.0 / x))) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -4.2e+93) || !(y <= 3.9e+72)) tmp = Float64(-0.3333333333333333 * Float64(y * sqrt(Float64(1.0 / x)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -4.2e+93) || ~((y <= 3.9e+72))) tmp = -0.3333333333333333 * (y * sqrt((1.0 / x))); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -4.2e+93], N[Not[LessEqual[y, 3.9e+72]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+93} \lor \neg \left(y \leq 3.9 \cdot 10^{+72}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -4.1999999999999996e93 or 3.89999999999999992e72 < y Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 93.6%
*-commutative93.6%
Simplified93.6%
if -4.1999999999999996e93 < y < 3.89999999999999992e72Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 93.4%
cancel-sign-sub-inv93.4%
metadata-eval93.4%
associate-*r/93.4%
metadata-eval93.4%
+-commutative93.4%
Simplified93.4%
add-sqr-sqrt0.0%
sqrt-unprod40.7%
frac-times40.7%
metadata-eval40.7%
metadata-eval40.7%
frac-times40.7%
sqrt-unprod40.8%
add-sqr-sqrt40.8%
clear-num40.8%
div-inv40.8%
metadata-eval40.8%
inv-pow40.8%
Applied egg-rr40.8%
unpow-prod-down40.8%
metadata-eval40.8%
metadata-eval40.8%
sqrt-pow140.7%
metadata-eval40.7%
sqrt-prod40.7%
*-commutative40.7%
metadata-eval40.7%
metadata-eval40.7%
pow-prod-up40.7%
inv-pow40.7%
inv-pow40.7%
swap-sqr40.7%
div-inv40.7%
div-inv40.7%
sqrt-unprod0.0%
add-sqr-sqrt93.4%
metadata-eval93.4%
distribute-neg-frac93.4%
clear-num93.5%
distribute-neg-frac93.5%
metadata-eval93.5%
div-inv93.6%
metadata-eval93.6%
Applied egg-rr93.6%
Final simplification93.6%
(FPCore (x y) :precision binary64 (if (or (<= y -2.2e+32) (not (<= y 6e+72))) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -2.2e+32) || !(y <= 6e+72)) {
tmp = 1.0 + (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 <= (-2.2d+32)) .or. (.not. (y <= 6d+72))) then
tmp = 1.0d0 + (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 <= -2.2e+32) || !(y <= 6e+72)) {
tmp = 1.0 + (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 <= -2.2e+32) or not (y <= 6e+72): tmp = 1.0 + (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 <= -2.2e+32) || !(y <= 6e+72)) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.2e+32) || ~((y <= 6e+72))) tmp = 1.0 + (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, -2.2e+32], N[Not[LessEqual[y, 6e+72]], $MachinePrecision]], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+32} \lor \neg \left(y \leq 6 \cdot 10^{+72}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -2.20000000000000001e32 or 6.00000000000000006e72 < y Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 93.2%
*-commutative93.2%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
expm1-log1p-u49.1%
expm1-udef49.1%
*-commutative49.1%
sqrt-div49.1%
metadata-eval49.1%
un-div-inv49.1%
*-commutative49.1%
Applied egg-rr49.1%
expm1-def49.1%
expm1-log1p93.2%
*-commutative93.2%
associate-*l/93.2%
metadata-eval93.2%
distribute-neg-frac93.2%
distribute-lft-neg-in93.2%
*-commutative93.2%
distribute-rgt-neg-in93.2%
distribute-neg-frac93.2%
metadata-eval93.2%
Simplified93.2%
if -2.20000000000000001e32 < y < 6.00000000000000006e72Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 97.4%
cancel-sign-sub-inv97.4%
metadata-eval97.4%
associate-*r/97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified97.4%
add-sqr-sqrt0.0%
sqrt-unprod42.1%
frac-times42.1%
metadata-eval42.1%
metadata-eval42.1%
frac-times42.1%
sqrt-unprod42.1%
add-sqr-sqrt42.1%
clear-num42.1%
div-inv42.1%
metadata-eval42.1%
inv-pow42.1%
Applied egg-rr42.1%
unpow-prod-down42.1%
metadata-eval42.1%
metadata-eval42.1%
sqrt-pow142.1%
metadata-eval42.1%
sqrt-prod42.1%
*-commutative42.1%
metadata-eval42.1%
metadata-eval42.1%
pow-prod-up42.1%
inv-pow42.1%
inv-pow42.1%
swap-sqr42.1%
div-inv42.1%
div-inv42.1%
sqrt-unprod0.0%
add-sqr-sqrt97.4%
metadata-eval97.4%
distribute-neg-frac97.4%
clear-num97.5%
distribute-neg-frac97.5%
metadata-eval97.5%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Final simplification95.4%
(FPCore (x y) :precision binary64 (if (or (<= y -2.5e+33) (not (<= y 5e+72))) (+ 1.0 (/ y (* (sqrt x) -3.0))) (+ 1.0 (/ -1.0 (* x 9.0)))))
double code(double x, double y) {
double tmp;
if ((y <= -2.5e+33) || !(y <= 5e+72)) {
tmp = 1.0 + (y / (sqrt(x) * -3.0));
} 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 <= (-2.5d+33)) .or. (.not. (y <= 5d+72))) then
tmp = 1.0d0 + (y / (sqrt(x) * (-3.0d0)))
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 <= -2.5e+33) || !(y <= 5e+72)) {
tmp = 1.0 + (y / (Math.sqrt(x) * -3.0));
} else {
tmp = 1.0 + (-1.0 / (x * 9.0));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.5e+33) or not (y <= 5e+72): tmp = 1.0 + (y / (math.sqrt(x) * -3.0)) else: tmp = 1.0 + (-1.0 / (x * 9.0)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.5e+33) || !(y <= 5e+72)) tmp = Float64(1.0 + Float64(y / Float64(sqrt(x) * -3.0))); else tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.5e+33) || ~((y <= 5e+72))) tmp = 1.0 + (y / (sqrt(x) * -3.0)); else tmp = 1.0 + (-1.0 / (x * 9.0)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.5e+33], N[Not[LessEqual[y, 5e+72]], $MachinePrecision]], N[(1.0 + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+33} \lor \neg \left(y \leq 5 \cdot 10^{+72}\right):\\
\;\;\;\;1 + \frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\end{array}
\end{array}
if y < -2.49999999999999986e33 or 4.99999999999999992e72 < y Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 93.2%
*-commutative93.2%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
expm1-log1p-u49.1%
expm1-udef49.1%
*-commutative49.1%
sqrt-div49.1%
metadata-eval49.1%
un-div-inv49.1%
*-commutative49.1%
Applied egg-rr49.1%
expm1-def49.1%
expm1-log1p93.2%
associate-/l*93.2%
Simplified93.2%
div-inv93.4%
metadata-eval93.4%
metadata-eval93.4%
metadata-eval93.4%
distribute-rgt-neg-in93.4%
sqrt-prod93.4%
neg-sub093.4%
sqrt-prod93.4%
metadata-eval93.4%
Applied egg-rr93.4%
neg-sub093.4%
distribute-rgt-neg-in93.4%
metadata-eval93.4%
Simplified93.4%
if -2.49999999999999986e33 < y < 4.99999999999999992e72Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 97.4%
cancel-sign-sub-inv97.4%
metadata-eval97.4%
associate-*r/97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified97.4%
add-sqr-sqrt0.0%
sqrt-unprod42.1%
frac-times42.1%
metadata-eval42.1%
metadata-eval42.1%
frac-times42.1%
sqrt-unprod42.1%
add-sqr-sqrt42.1%
clear-num42.1%
div-inv42.1%
metadata-eval42.1%
inv-pow42.1%
Applied egg-rr42.1%
unpow-prod-down42.1%
metadata-eval42.1%
metadata-eval42.1%
sqrt-pow142.1%
metadata-eval42.1%
sqrt-prod42.1%
*-commutative42.1%
metadata-eval42.1%
metadata-eval42.1%
pow-prod-up42.1%
inv-pow42.1%
inv-pow42.1%
swap-sqr42.1%
div-inv42.1%
div-inv42.1%
sqrt-unprod0.0%
add-sqr-sqrt97.4%
metadata-eval97.4%
distribute-neg-frac97.4%
clear-num97.5%
distribute-neg-frac97.5%
metadata-eval97.5%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
Final simplification95.5%
(FPCore (x y)
:precision binary64
(if (<= y -8e+28)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 2.4e+72)
(+ 1.0 (/ -1.0 (* x 9.0)))
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -8e+28) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 2.4e+72) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(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+28)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= 2.4d+72) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8e+28) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 2.4e+72) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8e+28: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 2.4e+72: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -8e+28) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 2.4e+72) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8e+28) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 2.4e+72) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8e+28], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+72], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+28}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+72}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -7.99999999999999967e28Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 90.8%
*-commutative90.8%
associate-*l*90.8%
*-commutative90.8%
Simplified90.8%
expm1-log1p-u85.7%
expm1-udef85.7%
*-commutative85.7%
sqrt-div85.7%
metadata-eval85.7%
un-div-inv85.7%
*-commutative85.7%
Applied egg-rr85.7%
expm1-def85.7%
expm1-log1p90.9%
associate-/l*90.9%
Simplified90.9%
add-sqr-sqrt0.0%
sqrt-unprod6.8%
frac-times6.8%
add-sqr-sqrt6.8%
metadata-eval6.8%
div-inv6.8%
metadata-eval6.8%
expm1-log1p-u5.6%
expm1-udef5.6%
Applied egg-rr85.7%
expm1-def85.7%
expm1-log1p90.9%
*-commutative90.9%
associate-*l/90.9%
associate-/l*90.9%
Simplified90.9%
if -7.99999999999999967e28 < y < 2.4000000000000001e72Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 97.4%
cancel-sign-sub-inv97.4%
metadata-eval97.4%
associate-*r/97.4%
metadata-eval97.4%
+-commutative97.4%
Simplified97.4%
add-sqr-sqrt0.0%
sqrt-unprod42.1%
frac-times42.1%
metadata-eval42.1%
metadata-eval42.1%
frac-times42.1%
sqrt-unprod42.1%
add-sqr-sqrt42.1%
clear-num42.1%
div-inv42.1%
metadata-eval42.1%
inv-pow42.1%
Applied egg-rr42.1%
unpow-prod-down42.1%
metadata-eval42.1%
metadata-eval42.1%
sqrt-pow142.1%
metadata-eval42.1%
sqrt-prod42.1%
*-commutative42.1%
metadata-eval42.1%
metadata-eval42.1%
pow-prod-up42.1%
inv-pow42.1%
inv-pow42.1%
swap-sqr42.1%
div-inv42.1%
div-inv42.1%
sqrt-unprod0.0%
add-sqr-sqrt97.4%
metadata-eval97.4%
distribute-neg-frac97.4%
clear-num97.5%
distribute-neg-frac97.5%
metadata-eval97.5%
div-inv97.6%
metadata-eval97.6%
Applied egg-rr97.6%
if 2.4000000000000001e72 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 96.4%
*-commutative96.4%
associate-*l*96.3%
*-commutative96.3%
Simplified96.3%
expm1-log1p-u1.8%
expm1-udef1.8%
*-commutative1.8%
sqrt-div1.8%
metadata-eval1.8%
un-div-inv1.8%
*-commutative1.8%
Applied egg-rr1.8%
expm1-def1.8%
expm1-log1p96.1%
*-commutative96.1%
associate-*l/96.3%
metadata-eval96.3%
distribute-neg-frac96.3%
distribute-lft-neg-in96.3%
*-commutative96.3%
distribute-rgt-neg-in96.3%
distribute-neg-frac96.3%
metadata-eval96.3%
Simplified96.3%
Final simplification95.5%
(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%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around 0 99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ -1.0 (/ -0.1111111111111111 x))))
(if (<= y -4.8e+128)
(/ (+ -1.0 (/ (* (/ 0.1111111111111111 x) -0.1111111111111111) x)) t_0)
(if (<= y 2e+116)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/ (+ -1.0 (/ -0.012345679012345678 (* x (- x)))) t_0)))))
double code(double x, double y) {
double t_0 = -1.0 + (-0.1111111111111111 / x);
double tmp;
if (y <= -4.8e+128) {
tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) / x)) / t_0;
} else if (y <= 2e+116) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (-1.0d0) + ((-0.1111111111111111d0) / x)
if (y <= (-4.8d+128)) then
tmp = ((-1.0d0) + (((0.1111111111111111d0 / x) * (-0.1111111111111111d0)) / x)) / t_0
else if (y <= 2d+116) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = ((-1.0d0) + ((-0.012345679012345678d0) / (x * -x))) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = -1.0 + (-0.1111111111111111 / x);
double tmp;
if (y <= -4.8e+128) {
tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) / x)) / t_0;
} else if (y <= 2e+116) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / t_0;
}
return tmp;
}
def code(x, y): t_0 = -1.0 + (-0.1111111111111111 / x) tmp = 0 if y <= -4.8e+128: tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) / x)) / t_0 elif y <= 2e+116: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / t_0 return tmp
function code(x, y) t_0 = Float64(-1.0 + Float64(-0.1111111111111111 / x)) tmp = 0.0 if (y <= -4.8e+128) tmp = Float64(Float64(-1.0 + Float64(Float64(Float64(0.1111111111111111 / x) * -0.1111111111111111) / x)) / t_0); elseif (y <= 2e+116) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(Float64(-1.0 + Float64(-0.012345679012345678 / Float64(x * Float64(-x)))) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = -1.0 + (-0.1111111111111111 / x); tmp = 0.0; if (y <= -4.8e+128) tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) / x)) / t_0; elseif (y <= 2e+116) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(-1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+128], N[(N[(-1.0 + N[(N[(N[(0.1111111111111111 / x), $MachinePrecision] * -0.1111111111111111), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 2e+116], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 + N[(-0.012345679012345678 / N[(x * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -1 + \frac{-0.1111111111111111}{x}\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+128}:\\
\;\;\;\;\frac{-1 + \frac{\frac{0.1111111111111111}{x} \cdot -0.1111111111111111}{x}}{t_0}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+116}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + \frac{-0.012345679012345678}{x \cdot \left(-x\right)}}{t_0}\\
\end{array}
\end{array}
if y < -4.8000000000000004e128Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 2.5%
cancel-sign-sub-inv2.5%
metadata-eval2.5%
associate-*r/2.5%
metadata-eval2.5%
+-commutative2.5%
Simplified2.5%
flip-+2.5%
metadata-eval2.5%
sub-neg2.5%
div-inv2.5%
div-inv2.5%
swap-sqr2.5%
metadata-eval2.5%
inv-pow2.5%
inv-pow2.5%
pow-prod-up2.5%
metadata-eval2.5%
metadata-eval2.5%
sub-neg2.5%
metadata-eval2.5%
Applied egg-rr2.5%
metadata-eval2.5%
metadata-eval2.5%
pow-prod-up2.5%
inv-pow2.5%
inv-pow2.5%
swap-sqr2.5%
div-inv2.5%
div-inv2.5%
associate-*r/2.5%
Applied egg-rr33.2%
if -4.8000000000000004e128 < y < 2.00000000000000003e116Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 83.9%
cancel-sign-sub-inv83.9%
metadata-eval83.9%
associate-*r/83.9%
metadata-eval83.9%
+-commutative83.9%
Simplified83.9%
add-sqr-sqrt0.0%
sqrt-unprod36.6%
frac-times36.6%
metadata-eval36.6%
metadata-eval36.6%
frac-times36.6%
sqrt-unprod36.7%
add-sqr-sqrt36.7%
clear-num36.7%
div-inv36.7%
metadata-eval36.7%
inv-pow36.7%
Applied egg-rr36.7%
unpow-prod-down36.7%
metadata-eval36.7%
metadata-eval36.7%
sqrt-pow136.6%
metadata-eval36.6%
sqrt-prod36.6%
*-commutative36.6%
metadata-eval36.6%
metadata-eval36.6%
pow-prod-up36.6%
inv-pow36.6%
inv-pow36.6%
swap-sqr36.6%
div-inv36.6%
div-inv36.6%
sqrt-unprod0.0%
add-sqr-sqrt83.9%
metadata-eval83.9%
distribute-neg-frac83.9%
clear-num83.9%
distribute-neg-frac83.9%
metadata-eval83.9%
div-inv84.0%
metadata-eval84.0%
Applied egg-rr84.0%
if 2.00000000000000003e116 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 3.1%
cancel-sign-sub-inv3.1%
metadata-eval3.1%
associate-*r/3.1%
metadata-eval3.1%
+-commutative3.1%
Simplified3.1%
flip-+13.3%
metadata-eval13.3%
sub-neg13.3%
div-inv13.3%
div-inv13.3%
swap-sqr13.3%
metadata-eval13.3%
inv-pow13.3%
inv-pow13.3%
pow-prod-up13.3%
metadata-eval13.3%
metadata-eval13.3%
sub-neg13.3%
metadata-eval13.3%
Applied egg-rr13.3%
metadata-eval13.3%
metadata-eval13.3%
pow-prod-up13.3%
inv-pow13.3%
inv-pow13.3%
swap-sqr13.3%
div-inv13.3%
div-inv13.3%
frac-2neg13.3%
metadata-eval13.3%
frac-times13.3%
metadata-eval13.3%
Applied egg-rr13.3%
Final simplification62.6%
(FPCore (x y)
:precision binary64
(if (<= y 2e+116)
(+ 1.0 (/ -1.0 (* x 9.0)))
(/
(+ -1.0 (/ -0.012345679012345678 (* x (- x))))
(+ -1.0 (/ -0.1111111111111111 x)))))
double code(double x, double y) {
double tmp;
if (y <= 2e+116) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / (-1.0 + (-0.1111111111111111 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2d+116) then
tmp = 1.0d0 + ((-1.0d0) / (x * 9.0d0))
else
tmp = ((-1.0d0) + ((-0.012345679012345678d0) / (x * -x))) / ((-1.0d0) + ((-0.1111111111111111d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2e+116) {
tmp = 1.0 + (-1.0 / (x * 9.0));
} else {
tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / (-1.0 + (-0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2e+116: tmp = 1.0 + (-1.0 / (x * 9.0)) else: tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / (-1.0 + (-0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 2e+116) tmp = Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))); else tmp = Float64(Float64(-1.0 + Float64(-0.012345679012345678 / Float64(x * Float64(-x)))) / Float64(-1.0 + Float64(-0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2e+116) tmp = 1.0 + (-1.0 / (x * 9.0)); else tmp = (-1.0 + (-0.012345679012345678 / (x * -x))) / (-1.0 + (-0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2e+116], N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 + N[(-0.012345679012345678 / N[(x * (-x)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2 \cdot 10^{+116}:\\
\;\;\;\;1 + \frac{-1}{x \cdot 9}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + \frac{-0.012345679012345678}{x \cdot \left(-x\right)}}{-1 + \frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 2.00000000000000003e116Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 66.8%
cancel-sign-sub-inv66.8%
metadata-eval66.8%
associate-*r/66.8%
metadata-eval66.8%
+-commutative66.8%
Simplified66.8%
add-sqr-sqrt0.0%
sqrt-unprod35.9%
frac-times35.9%
metadata-eval35.9%
metadata-eval35.9%
frac-times35.9%
sqrt-unprod30.1%
add-sqr-sqrt30.1%
clear-num30.1%
div-inv30.1%
metadata-eval30.1%
inv-pow30.1%
Applied egg-rr30.1%
unpow-prod-down30.1%
metadata-eval30.1%
metadata-eval30.1%
sqrt-pow135.9%
metadata-eval35.9%
sqrt-prod35.9%
*-commutative35.9%
metadata-eval35.9%
metadata-eval35.9%
pow-prod-up35.9%
inv-pow35.9%
inv-pow35.9%
swap-sqr35.9%
div-inv35.9%
div-inv35.9%
sqrt-unprod0.0%
add-sqr-sqrt66.8%
metadata-eval66.8%
distribute-neg-frac66.8%
clear-num66.8%
distribute-neg-frac66.8%
metadata-eval66.8%
div-inv66.9%
metadata-eval66.9%
Applied egg-rr66.9%
if 2.00000000000000003e116 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.5%
fma-neg99.5%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 3.1%
cancel-sign-sub-inv3.1%
metadata-eval3.1%
associate-*r/3.1%
metadata-eval3.1%
+-commutative3.1%
Simplified3.1%
flip-+13.3%
metadata-eval13.3%
sub-neg13.3%
div-inv13.3%
div-inv13.3%
swap-sqr13.3%
metadata-eval13.3%
inv-pow13.3%
inv-pow13.3%
pow-prod-up13.3%
metadata-eval13.3%
metadata-eval13.3%
sub-neg13.3%
metadata-eval13.3%
Applied egg-rr13.3%
metadata-eval13.3%
metadata-eval13.3%
pow-prod-up13.3%
inv-pow13.3%
inv-pow13.3%
swap-sqr13.3%
div-inv13.3%
div-inv13.3%
frac-2neg13.3%
metadata-eval13.3%
frac-times13.3%
metadata-eval13.3%
Applied egg-rr13.3%
Final simplification57.3%
(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%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 55.4%
cancel-sign-sub-inv55.4%
metadata-eval55.4%
associate-*r/55.4%
metadata-eval55.4%
+-commutative55.4%
Simplified55.4%
add-sqr-sqrt0.0%
sqrt-unprod29.6%
frac-times29.6%
metadata-eval29.6%
metadata-eval29.6%
frac-times29.6%
sqrt-unprod24.9%
add-sqr-sqrt24.9%
clear-num24.9%
div-inv24.9%
metadata-eval24.9%
inv-pow24.9%
Applied egg-rr24.9%
unpow-prod-down24.9%
metadata-eval24.9%
metadata-eval24.9%
sqrt-pow129.6%
metadata-eval29.6%
sqrt-prod29.6%
*-commutative29.6%
metadata-eval29.6%
metadata-eval29.6%
pow-prod-up29.6%
inv-pow29.6%
inv-pow29.6%
swap-sqr29.6%
div-inv29.6%
div-inv29.6%
sqrt-unprod0.0%
add-sqr-sqrt55.4%
metadata-eval55.4%
distribute-neg-frac55.4%
clear-num55.4%
distribute-neg-frac55.4%
metadata-eval55.4%
div-inv55.5%
metadata-eval55.5%
Applied egg-rr55.5%
Final simplification55.5%
(FPCore (x y) :precision binary64 (if (<= x 0.195) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.195) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.195d0) then
tmp = (-0.1111111111111111d0) / x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.195) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.195: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.195) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.195) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.195], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.195:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.19500000000000001Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 58.2%
if 0.19500000000000001 < x Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 50.8%
Final simplification54.8%
(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%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 55.4%
cancel-sign-sub-inv55.4%
metadata-eval55.4%
associate-*r/55.4%
metadata-eval55.4%
+-commutative55.4%
Simplified55.4%
Final simplification55.4%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 24.7%
Final simplification24.7%
(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 2023310
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:herbie-target
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))