
(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 (+ (- (* y (sqrt x)) x) 1.0))
double code(double x, double y) {
return ((y * sqrt(x)) - x) + 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y * sqrt(x)) - x) + 1.0d0
end function
public static double code(double x, double y) {
return ((y * Math.sqrt(x)) - x) + 1.0;
}
def code(x, y): return ((y * math.sqrt(x)) - x) + 1.0
function code(x, y) return Float64(Float64(Float64(y * sqrt(x)) - x) + 1.0) end
function tmp = code(x, y) tmp = ((y * sqrt(x)) - x) + 1.0; end
code[x_, y_] := N[(N[(N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 1.0), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot \sqrt{x} - x\right) + 1
\end{array}
Initial program 99.9%
associate-+l-99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y) :precision binary64 (if (or (<= y -3.15e+60) (not (<= y 1.9e+62))) (+ (* y (sqrt x)) 1.0) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if ((y <= -3.15e+60) || !(y <= 1.9e+62)) {
tmp = (y * sqrt(x)) + 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 <= (-3.15d+60)) .or. (.not. (y <= 1.9d+62))) then
tmp = (y * sqrt(x)) + 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 <= -3.15e+60) || !(y <= 1.9e+62)) {
tmp = (y * Math.sqrt(x)) + 1.0;
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -3.15e+60) or not (y <= 1.9e+62): tmp = (y * math.sqrt(x)) + 1.0 else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -3.15e+60) || !(y <= 1.9e+62)) tmp = Float64(Float64(y * sqrt(x)) + 1.0); else tmp = Float64(1.0 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -3.15e+60) || ~((y <= 1.9e+62))) tmp = (y * sqrt(x)) + 1.0; else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -3.15e+60], N[Not[LessEqual[y, 1.9e+62]], $MachinePrecision]], N[(N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.15 \cdot 10^{+60} \lor \neg \left(y \leq 1.9 \cdot 10^{+62}\right):\\
\;\;\;\;y \cdot \sqrt{x} + 1\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -3.1500000000000002e60 or 1.89999999999999992e62 < y Initial program 99.8%
Taylor expanded in x around 0 95.0%
if -3.1500000000000002e60 < y < 1.89999999999999992e62Initial program 100.0%
associate-+l-100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 97.4%
Final simplification96.5%
(FPCore (x y) :precision binary64 (if (or (<= y -1.75e+59) (not (<= y 3.8e+79))) (* y (sqrt x)) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if ((y <= -1.75e+59) || !(y <= 3.8e+79)) {
tmp = 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 <= (-1.75d+59)) .or. (.not. (y <= 3.8d+79))) then
tmp = 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 <= -1.75e+59) || !(y <= 3.8e+79)) {
tmp = y * Math.sqrt(x);
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -1.75e+59) or not (y <= 3.8e+79): tmp = y * math.sqrt(x) else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -1.75e+59) || !(y <= 3.8e+79)) tmp = 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 <= -1.75e+59) || ~((y <= 3.8e+79))) tmp = y * sqrt(x); else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -1.75e+59], N[Not[LessEqual[y, 3.8e+79]], $MachinePrecision]], N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+59} \lor \neg \left(y \leq 3.8 \cdot 10^{+79}\right):\\
\;\;\;\;y \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -1.75e59 or 3.8000000000000002e79 < y Initial program 99.8%
associate-+l-99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 92.9%
if -1.75e59 < y < 3.8000000000000002e79Initial program 100.0%
associate-+l-100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 95.7%
Final simplification94.6%
(FPCore (x y) :precision binary64 (let* ((t_0 (* y (sqrt x)))) (if (<= x 1.0) (+ t_0 1.0) (- t_0 x))))
double code(double x, double y) {
double t_0 = y * sqrt(x);
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 = y * sqrt(x)
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 = y * Math.sqrt(x);
double tmp;
if (x <= 1.0) {
tmp = t_0 + 1.0;
} else {
tmp = t_0 - x;
}
return tmp;
}
def code(x, y): t_0 = y * math.sqrt(x) 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(y * sqrt(x)) 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 = y * sqrt(x); 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[(y * N[Sqrt[x], $MachinePrecision]), $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 := y \cdot \sqrt{x}\\
\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 99.5%
if 1 < x Initial program 99.9%
Taylor expanded in x around inf 99.9%
neg-mul-199.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
Final simplification99.7%
(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}
Initial program 99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (* x x))))
(if (<= y -1.35e+154)
(/ t_0 (+ x 1.0))
(if (<= y 7e+63) (- 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.35e+154) {
tmp = t_0 / (x + 1.0);
} else if (y <= 7e+63) {
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.35d+154)) then
tmp = t_0 / (x + 1.0d0)
else if (y <= 7d+63) 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.35e+154) {
tmp = t_0 / (x + 1.0);
} else if (y <= 7e+63) {
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.35e+154: tmp = t_0 / (x + 1.0) elif y <= 7e+63: 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.35e+154) tmp = Float64(t_0 / Float64(x + 1.0)); elseif (y <= 7e+63) 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.35e+154) tmp = t_0 / (x + 1.0); elseif (y <= 7e+63) 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.35e+154], N[(t$95$0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+63], 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.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{t\_0}{x + 1}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+63}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{1 - x}\\
\end{array}
\end{array}
if y < -1.35000000000000003e154Initial program 99.8%
associate-+l-99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 3.4%
sub-neg3.4%
flip-+22.6%
metadata-eval22.6%
Applied egg-rr22.6%
if -1.35000000000000003e154 < y < 7.00000000000000059e63Initial program 100.0%
associate-+l-100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 88.7%
if 7.00000000000000059e63 < y Initial program 99.8%
associate-+l-99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 10.5%
sub-neg10.5%
flip-+10.5%
metadata-eval10.5%
Applied egg-rr10.5%
neg-sub010.5%
sub-neg10.5%
add-sqr-sqrt0.0%
sqrt-unprod11.8%
sqr-neg11.8%
sqrt-unprod23.9%
add-sqr-sqrt23.9%
Applied egg-rr23.9%
+-lft-identity23.9%
Simplified23.9%
Final simplification67.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (* x x))))
(if (<= y -4e+195)
(/ t_0 x)
(if (<= y 7e+63) (- 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 <= -4e+195) {
tmp = t_0 / x;
} else if (y <= 7e+63) {
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 <= (-4d+195)) then
tmp = t_0 / x
else if (y <= 7d+63) 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 <= -4e+195) {
tmp = t_0 / x;
} else if (y <= 7e+63) {
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 <= -4e+195: tmp = t_0 / x elif y <= 7e+63: 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 <= -4e+195) tmp = Float64(t_0 / x); elseif (y <= 7e+63) 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 <= -4e+195) tmp = t_0 / x; elseif (y <= 7e+63) 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, -4e+195], N[(t$95$0 / x), $MachinePrecision], If[LessEqual[y, 7e+63], 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 -4 \cdot 10^{+195}:\\
\;\;\;\;\frac{t\_0}{x}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+63}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{1 - x}\\
\end{array}
\end{array}
if y < -3.99999999999999991e195Initial program 99.8%
associate-+l-99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 3.8%
sub-neg3.8%
flip-+31.5%
metadata-eval31.5%
Applied egg-rr31.5%
Taylor expanded in x around inf 31.4%
if -3.99999999999999991e195 < y < 7.00000000000000059e63Initial program 99.9%
associate-+l-99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 83.1%
if 7.00000000000000059e63 < y Initial program 99.8%
associate-+l-99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 10.5%
sub-neg10.5%
flip-+10.5%
metadata-eval10.5%
Applied egg-rr10.5%
neg-sub010.5%
sub-neg10.5%
add-sqr-sqrt0.0%
sqrt-unprod11.8%
sqr-neg11.8%
sqrt-unprod23.9%
add-sqr-sqrt23.9%
Applied egg-rr23.9%
+-lft-identity23.9%
Simplified23.9%
Final simplification67.5%
(FPCore (x y) :precision binary64 (if (<= y -7.2e+194) (/ (- 1.0 (* x x)) x) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if (y <= -7.2e+194) {
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.2d+194)) 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.2e+194) {
tmp = (1.0 - (x * x)) / x;
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.2e+194: tmp = (1.0 - (x * x)) / x else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if (y <= -7.2e+194) 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.2e+194) tmp = (1.0 - (x * x)) / x; else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.2e+194], 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.2 \cdot 10^{+194}:\\
\;\;\;\;\frac{1 - x \cdot x}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -7.19999999999999999e194Initial program 99.8%
associate-+l-99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 3.8%
sub-neg3.8%
flip-+31.5%
metadata-eval31.5%
Applied egg-rr31.5%
Taylor expanded in x around inf 31.4%
if -7.19999999999999999e194 < y Initial program 99.9%
associate-+l-99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 69.2%
Final simplification65.2%
(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 x around 0 99.5%
Taylor expanded in y around 0 63.2%
if 1 < x Initial program 99.9%
Taylor expanded in x around inf 99.8%
Taylor expanded in y around 0 60.8%
neg-mul-160.8%
Simplified60.8%
(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%
associate-+l-99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 62.3%
(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 x around 0 71.3%
Taylor expanded in y around 0 34.5%
herbie shell --seed 2024185
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, E"
:precision binary64
(+ (- 1.0 x) (* y (sqrt x))))