
(FPCore (x y) :precision binary64 (+ (- 1.0 x) (* y (sqrt x))))
double code(double x, double y) {
return (1.0 - x) + (y * sqrt(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - x) + (y * sqrt(x))
end function
public static double code(double x, double y) {
return (1.0 - x) + (y * Math.sqrt(x));
}
def code(x, y): return (1.0 - x) + (y * math.sqrt(x))
function code(x, y) return Float64(Float64(1.0 - x) + Float64(y * sqrt(x))) end
function tmp = code(x, y) tmp = (1.0 - x) + (y * sqrt(x)); end
code[x_, y_] := N[(N[(1.0 - x), $MachinePrecision] + N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - x\right) + y \cdot \sqrt{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (+ (- 1.0 x) (* y (sqrt x))))
double code(double x, double y) {
return (1.0 - x) + (y * sqrt(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - x) + (y * sqrt(x))
end function
public static double code(double x, double y) {
return (1.0 - x) + (y * Math.sqrt(x));
}
def code(x, y): return (1.0 - x) + (y * math.sqrt(x))
function code(x, y) return Float64(Float64(1.0 - x) + Float64(y * sqrt(x))) end
function tmp = code(x, y) tmp = (1.0 - x) + (y * sqrt(x)); end
code[x_, y_] := N[(N[(1.0 - x), $MachinePrecision] + N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - x\right) + y \cdot \sqrt{x}
\end{array}
(FPCore (x y) :precision binary64 (- (+ (* (sqrt x) y) 1.0) x))
double code(double x, double y) {
return ((sqrt(x) * y) + 1.0) - x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((sqrt(x) * y) + 1.0d0) - x
end function
public static double code(double x, double y) {
return ((Math.sqrt(x) * y) + 1.0) - x;
}
def code(x, y): return ((math.sqrt(x) * y) + 1.0) - x
function code(x, y) return Float64(Float64(Float64(sqrt(x) * y) + 1.0) - x) end
function tmp = code(x, y) tmp = ((sqrt(x) * y) + 1.0) - x; end
code[x_, y_] := N[(N[(N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision] + 1.0), $MachinePrecision] - x), $MachinePrecision]
\begin{array}{l}
\\
\left(\sqrt{x} \cdot y + 1\right) - x
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 99.9%
Final simplification99.9%
(FPCore (x y) :precision binary64 (if (or (<= y -8e+55) (not (<= y 4.5e+27))) (+ (* (sqrt x) y) 1.0) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if ((y <= -8e+55) || !(y <= 4.5e+27)) {
tmp = (sqrt(x) * y) + 1.0;
} else {
tmp = 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 <= (-8d+55)) .or. (.not. (y <= 4.5d+27))) then
tmp = (sqrt(x) * y) + 1.0d0
else
tmp = 1.0d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -8e+55) || !(y <= 4.5e+27)) {
tmp = (Math.sqrt(x) * y) + 1.0;
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8e+55) or not (y <= 4.5e+27): tmp = (math.sqrt(x) * y) + 1.0 else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -8e+55) || !(y <= 4.5e+27)) tmp = Float64(Float64(sqrt(x) * y) + 1.0); else tmp = Float64(1.0 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -8e+55) || ~((y <= 4.5e+27))) tmp = (sqrt(x) * y) + 1.0; else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -8e+55], N[Not[LessEqual[y, 4.5e+27]], $MachinePrecision]], N[(N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+55} \lor \neg \left(y \leq 4.5 \cdot 10^{+27}\right):\\
\;\;\;\;\sqrt{x} \cdot y + 1\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -8.00000000000000008e55 or 4.4999999999999999e27 < y Initial program 99.8%
Taylor expanded in x around 0 93.1%
if -8.00000000000000008e55 < y < 4.4999999999999999e27Initial program 100.0%
Taylor expanded in y around 0 98.5%
Final simplification96.0%
(FPCore (x y) :precision binary64 (if (or (<= y -6e+74) (not (<= y 3.45e+96))) (* x (/ y (sqrt x))) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if ((y <= -6e+74) || !(y <= 3.45e+96)) {
tmp = x * (y / sqrt(x));
} else {
tmp = 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 <= (-6d+74)) .or. (.not. (y <= 3.45d+96))) then
tmp = x * (y / sqrt(x))
else
tmp = 1.0d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -6e+74) || !(y <= 3.45e+96)) {
tmp = x * (y / Math.sqrt(x));
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -6e+74) or not (y <= 3.45e+96): tmp = x * (y / math.sqrt(x)) else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -6e+74) || !(y <= 3.45e+96)) tmp = Float64(x * Float64(y / sqrt(x))); else tmp = Float64(1.0 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -6e+74) || ~((y <= 3.45e+96))) tmp = x * (y / sqrt(x)); else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -6e+74], N[Not[LessEqual[y, 3.45e+96]], $MachinePrecision]], N[(x * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+74} \lor \neg \left(y \leq 3.45 \cdot 10^{+96}\right):\\
\;\;\;\;x \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -6e74 or 3.44999999999999999e96 < y Initial program 99.8%
Taylor expanded in x around inf 73.0%
Taylor expanded in x around 0 70.4%
*-commutative70.4%
unpow-170.4%
metadata-eval70.4%
pow-sqr70.4%
rem-sqrt-square70.4%
rem-square-sqrt70.2%
fabs-sqr70.2%
rem-square-sqrt70.4%
Simplified70.4%
pow170.4%
associate-*r*80.9%
metadata-eval80.9%
metadata-eval80.9%
sqrt-pow280.8%
metadata-eval80.8%
inv-pow80.8%
associate-*r*70.4%
*-commutative70.4%
associate-*l/70.4%
*-un-lft-identity70.4%
Applied egg-rr70.4%
unpow170.4%
Simplified70.4%
if -6e74 < y < 3.44999999999999999e96Initial program 100.0%
Taylor expanded in y around 0 94.2%
Final simplification84.6%
(FPCore (x y) :precision binary64 (let* ((t_0 (* (sqrt x) y))) (if (<= x 1.0) (+ t_0 1.0) (- t_0 x))))
double code(double x, double y) {
double t_0 = sqrt(x) * y;
double tmp;
if (x <= 1.0) {
tmp = t_0 + 1.0;
} else {
tmp = t_0 - x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(x) * y
if (x <= 1.0d0) then
tmp = t_0 + 1.0d0
else
tmp = t_0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * y;
double tmp;
if (x <= 1.0) {
tmp = t_0 + 1.0;
} else {
tmp = t_0 - x;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * y tmp = 0 if x <= 1.0: tmp = t_0 + 1.0 else: tmp = t_0 - x return tmp
function code(x, y) t_0 = Float64(sqrt(x) * y) tmp = 0.0 if (x <= 1.0) tmp = Float64(t_0 + 1.0); else tmp = Float64(t_0 - x); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * y; tmp = 0.0; if (x <= 1.0) tmp = t_0 + 1.0; else tmp = t_0 - x; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, 1.0], N[(t$95$0 + 1.0), $MachinePrecision], N[(t$95$0 - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot y\\
\mathbf{if}\;x \leq 1:\\
\;\;\;\;t\_0 + 1\\
\mathbf{else}:\\
\;\;\;\;t\_0 - x\\
\end{array}
\end{array}
if x < 1Initial program 99.9%
Taylor expanded in x around 0 98.4%
if 1 < x Initial program 99.9%
Taylor expanded in x around inf 99.0%
neg-mul-199.0%
Simplified99.0%
Taylor expanded in x around 0 99.0%
mul-1-neg99.0%
+-commutative99.0%
sub-neg99.0%
Simplified99.0%
Final simplification98.7%
(FPCore (x y) :precision binary64 (+ (* (sqrt x) y) (- 1.0 x)))
double code(double x, double y) {
return (sqrt(x) * y) + (1.0 - x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (sqrt(x) * y) + (1.0d0 - x)
end function
public static double code(double x, double y) {
return (Math.sqrt(x) * y) + (1.0 - x);
}
def code(x, y): return (math.sqrt(x) * y) + (1.0 - x)
function code(x, y) return Float64(Float64(sqrt(x) * y) + Float64(1.0 - x)) end
function tmp = code(x, y) tmp = (sqrt(x) * y) + (1.0 - x); end
code[x_, y_] := N[(N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision] + N[(1.0 - x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot y + \left(1 - x\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (* x x))))
(if (<= y -2.9e+166)
(/ t_0 (+ x 1.0))
(if (<= y 1.6e+145) (- 1.0 x) (/ t_0 (- 1.0 x))))))
double code(double x, double y) {
double t_0 = 1.0 - (x * x);
double tmp;
if (y <= -2.9e+166) {
tmp = t_0 / (x + 1.0);
} else if (y <= 1.6e+145) {
tmp = 1.0 - x;
} else {
tmp = t_0 / (1.0 - x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - (x * x)
if (y <= (-2.9d+166)) then
tmp = t_0 / (x + 1.0d0)
else if (y <= 1.6d+145) then
tmp = 1.0d0 - x
else
tmp = t_0 / (1.0d0 - x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (x * x);
double tmp;
if (y <= -2.9e+166) {
tmp = t_0 / (x + 1.0);
} else if (y <= 1.6e+145) {
tmp = 1.0 - x;
} else {
tmp = t_0 / (1.0 - x);
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (x * x) tmp = 0 if y <= -2.9e+166: tmp = t_0 / (x + 1.0) elif y <= 1.6e+145: tmp = 1.0 - x else: tmp = t_0 / (1.0 - x) return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(x * x)) tmp = 0.0 if (y <= -2.9e+166) tmp = Float64(t_0 / Float64(x + 1.0)); elseif (y <= 1.6e+145) tmp = Float64(1.0 - x); else tmp = Float64(t_0 / Float64(1.0 - x)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (x * x); tmp = 0.0; if (y <= -2.9e+166) tmp = t_0 / (x + 1.0); elseif (y <= 1.6e+145) tmp = 1.0 - x; else tmp = t_0 / (1.0 - x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e+166], N[(t$95$0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+145], N[(1.0 - x), $MachinePrecision], N[(t$95$0 / N[(1.0 - x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - x \cdot x\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+166}:\\
\;\;\;\;\frac{t\_0}{x + 1}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+145}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{1 - x}\\
\end{array}
\end{array}
if y < -2.9000000000000001e166Initial program 99.9%
Taylor expanded in y around 0 3.4%
sub-neg3.4%
flip-+22.1%
metadata-eval22.1%
Applied egg-rr22.1%
if -2.9000000000000001e166 < y < 1.60000000000000004e145Initial program 99.9%
Taylor expanded in y around 0 78.8%
if 1.60000000000000004e145 < y Initial program 99.8%
Taylor expanded in y around 0 3.7%
sub-neg3.7%
flip-+3.7%
metadata-eval3.7%
Applied egg-rr3.7%
neg-sub03.7%
sub-neg3.7%
add-sqr-sqrt0.0%
sqrt-unprod4.6%
sqr-neg4.6%
sqrt-unprod25.6%
add-sqr-sqrt25.6%
Applied egg-rr25.6%
+-lft-identity25.6%
Simplified25.6%
Final simplification64.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (* x x))))
(if (<= y -1.18e+171)
(/ t_0 x)
(if (<= y 1e+147) (- 1.0 x) (/ t_0 (- 1.0 x))))))
double code(double x, double y) {
double t_0 = 1.0 - (x * x);
double tmp;
if (y <= -1.18e+171) {
tmp = t_0 / x;
} else if (y <= 1e+147) {
tmp = 1.0 - x;
} else {
tmp = t_0 / (1.0 - x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - (x * x)
if (y <= (-1.18d+171)) then
tmp = t_0 / x
else if (y <= 1d+147) then
tmp = 1.0d0 - x
else
tmp = t_0 / (1.0d0 - x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (x * x);
double tmp;
if (y <= -1.18e+171) {
tmp = t_0 / x;
} else if (y <= 1e+147) {
tmp = 1.0 - x;
} else {
tmp = t_0 / (1.0 - x);
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (x * x) tmp = 0 if y <= -1.18e+171: tmp = t_0 / x elif y <= 1e+147: tmp = 1.0 - x else: tmp = t_0 / (1.0 - x) return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(x * x)) tmp = 0.0 if (y <= -1.18e+171) tmp = Float64(t_0 / x); elseif (y <= 1e+147) tmp = Float64(1.0 - x); else tmp = Float64(t_0 / Float64(1.0 - x)); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (x * x); tmp = 0.0; if (y <= -1.18e+171) tmp = t_0 / x; elseif (y <= 1e+147) tmp = 1.0 - x; else tmp = t_0 / (1.0 - x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.18e+171], N[(t$95$0 / x), $MachinePrecision], If[LessEqual[y, 1e+147], N[(1.0 - x), $MachinePrecision], N[(t$95$0 / N[(1.0 - x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - x \cdot x\\
\mathbf{if}\;y \leq -1.18 \cdot 10^{+171}:\\
\;\;\;\;\frac{t\_0}{x}\\
\mathbf{elif}\;y \leq 10^{+147}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{1 - x}\\
\end{array}
\end{array}
if y < -1.1799999999999999e171Initial program 99.9%
Taylor expanded in y around 0 3.3%
sub-neg3.3%
flip-+23.3%
metadata-eval23.3%
Applied egg-rr23.3%
Taylor expanded in x around inf 23.1%
if -1.1799999999999999e171 < y < 9.9999999999999998e146Initial program 99.9%
Taylor expanded in y around 0 78.0%
if 9.9999999999999998e146 < y Initial program 99.8%
Taylor expanded in y around 0 3.7%
sub-neg3.7%
flip-+3.7%
metadata-eval3.7%
Applied egg-rr3.7%
neg-sub03.7%
sub-neg3.7%
add-sqr-sqrt0.0%
sqrt-unprod4.6%
sqr-neg4.6%
sqrt-unprod25.6%
add-sqr-sqrt25.6%
Applied egg-rr25.6%
+-lft-identity25.6%
Simplified25.6%
Final simplification64.8%
(FPCore (x y) :precision binary64 (if (<= y -7.4e+170) (/ (- 1.0 (* x x)) x) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if (y <= -7.4e+170) {
tmp = (1.0 - (x * x)) / x;
} else {
tmp = 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 <= (-7.4d+170)) then
tmp = (1.0d0 - (x * x)) / x
else
tmp = 1.0d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -7.4e+170) {
tmp = (1.0 - (x * x)) / x;
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.4e+170: tmp = (1.0 - (x * x)) / x else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if (y <= -7.4e+170) tmp = Float64(Float64(1.0 - Float64(x * x)) / x); else tmp = Float64(1.0 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -7.4e+170) tmp = (1.0 - (x * x)) / x; else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.4e+170], N[(N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+170}:\\
\;\;\;\;\frac{1 - x \cdot x}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -7.39999999999999975e170Initial program 99.9%
Taylor expanded in y around 0 3.3%
sub-neg3.3%
flip-+23.3%
metadata-eval23.3%
Applied egg-rr23.3%
Taylor expanded in x around inf 23.1%
if -7.39999999999999975e170 < y Initial program 99.9%
Taylor expanded in y around 0 66.6%
Final simplification61.8%
(FPCore (x y) :precision binary64 (if (<= x 1.0) 1.0 (- x)))
double code(double x, double y) {
double tmp;
if (x <= 1.0) {
tmp = 1.0;
} else {
tmp = -x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.0d0) then
tmp = 1.0d0
else
tmp = -x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.0) {
tmp = 1.0;
} else {
tmp = -x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.0: tmp = 1.0 else: tmp = -x return tmp
function code(x, y) tmp = 0.0 if (x <= 1.0) tmp = 1.0; else tmp = Float64(-x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.0) tmp = 1.0; else tmp = -x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.0], 1.0, (-x)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\end{array}
if x < 1Initial program 99.9%
Taylor expanded in y around 0 61.1%
Taylor expanded in x around 0 59.9%
if 1 < x Initial program 99.9%
Taylor expanded in y around 0 58.2%
Taylor expanded in x around inf 57.3%
neg-mul-199.0%
Simplified57.3%
(FPCore (x y) :precision binary64 (- 1.0 x))
double code(double x, double y) {
return 1.0 - x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - x
end function
public static double code(double x, double y) {
return 1.0 - x;
}
def code(x, y): return 1.0 - x
function code(x, y) return Float64(1.0 - x) end
function tmp = code(x, y) tmp = 1.0 - x; end
code[x_, y_] := N[(1.0 - x), $MachinePrecision]
\begin{array}{l}
\\
1 - x
\end{array}
Initial program 99.9%
Taylor expanded in y around 0 59.7%
(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.9%
Taylor expanded in y around 0 59.7%
Taylor expanded in x around 0 30.9%
herbie shell --seed 2024135
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, E"
:precision binary64
(+ (- 1.0 x) (* y (sqrt x))))