
(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 9 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 (+ (- 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%
Final simplification99.9%
(FPCore (x y) :precision binary64 (if (or (<= y -3.1e+63) (not (<= y 1.72e+59))) (+ 1.0 (* y (sqrt x))) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if ((y <= -3.1e+63) || !(y <= 1.72e+59)) {
tmp = 1.0 + (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 <= (-3.1d+63)) .or. (.not. (y <= 1.72d+59))) then
tmp = 1.0d0 + (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 <= -3.1e+63) || !(y <= 1.72e+59)) {
tmp = 1.0 + (y * Math.sqrt(x));
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -3.1e+63) or not (y <= 1.72e+59): tmp = 1.0 + (y * math.sqrt(x)) else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -3.1e+63) || !(y <= 1.72e+59)) tmp = Float64(1.0 + 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 <= -3.1e+63) || ~((y <= 1.72e+59))) tmp = 1.0 + (y * sqrt(x)); else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -3.1e+63], N[Not[LessEqual[y, 1.72e+59]], $MachinePrecision]], N[(1.0 + N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+63} \lor \neg \left(y \leq 1.72 \cdot 10^{+59}\right):\\
\;\;\;\;1 + y \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -3.1000000000000001e63 or 1.71999999999999996e59 < y Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
add-sqr-sqrt99.4%
associate-*l*99.3%
fma-def99.3%
pow1/299.3%
sqrt-pow199.3%
metadata-eval99.3%
pow1/299.3%
sqrt-pow199.3%
metadata-eval99.3%
Applied egg-rr99.3%
Taylor expanded in x around 0 94.1%
if -3.1000000000000001e63 < y < 1.71999999999999996e59Initial program 100.0%
Taylor expanded in y around 0 95.5%
Final simplification94.9%
(FPCore (x y) :precision binary64 (if (or (<= y -2.5e+63) (not (<= y 1.25e+79))) (* y (sqrt x)) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if ((y <= -2.5e+63) || !(y <= 1.25e+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 <= (-2.5d+63)) .or. (.not. (y <= 1.25d+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 <= -2.5e+63) || !(y <= 1.25e+79)) {
tmp = y * Math.sqrt(x);
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.5e+63) or not (y <= 1.25e+79): tmp = y * math.sqrt(x) else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.5e+63) || !(y <= 1.25e+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 <= -2.5e+63) || ~((y <= 1.25e+79))) tmp = y * sqrt(x); else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.5e+63], N[Not[LessEqual[y, 1.25e+79]], $MachinePrecision]], N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+63} \lor \neg \left(y \leq 1.25 \cdot 10^{+79}\right):\\
\;\;\;\;y \cdot \sqrt{x}\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -2.50000000000000005e63 or 1.25e79 < y Initial program 99.8%
Taylor expanded in y around inf 91.5%
if -2.50000000000000005e63 < y < 1.25e79Initial program 100.0%
Taylor expanded in y around 0 95.5%
Final simplification93.9%
(FPCore (x y) :precision binary64 (if (<= y -1.32e+141) (* y (* x (- y))) (if (<= y 1.25e+135) (- 1.0 x) (/ x (/ x (* y y))))))
double code(double x, double y) {
double tmp;
if (y <= -1.32e+141) {
tmp = y * (x * -y);
} else if (y <= 1.25e+135) {
tmp = 1.0 - x;
} else {
tmp = x / (x / (y * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.32d+141)) then
tmp = y * (x * -y)
else if (y <= 1.25d+135) then
tmp = 1.0d0 - x
else
tmp = x / (x / (y * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.32e+141) {
tmp = y * (x * -y);
} else if (y <= 1.25e+135) {
tmp = 1.0 - x;
} else {
tmp = x / (x / (y * y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.32e+141: tmp = y * (x * -y) elif y <= 1.25e+135: tmp = 1.0 - x else: tmp = x / (x / (y * y)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.32e+141) tmp = Float64(y * Float64(x * Float64(-y))); elseif (y <= 1.25e+135) tmp = Float64(1.0 - x); else tmp = Float64(x / Float64(x / Float64(y * y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.32e+141) tmp = y * (x * -y); elseif (y <= 1.25e+135) tmp = 1.0 - x; else tmp = x / (x / (y * y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.32e+141], N[(y * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+135], N[(1.0 - x), $MachinePrecision], N[(x / N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.32 \cdot 10^{+141}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+135}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{x}{y \cdot y}}\\
\end{array}
\end{array}
if y < -1.3200000000000001e141Initial program 99.8%
flip-+33.9%
div-inv33.9%
pow233.9%
*-commutative33.9%
*-commutative33.9%
swap-sqr6.3%
add-sqr-sqrt6.2%
associate--l-6.2%
Applied egg-rr6.2%
Taylor expanded in y around inf 6.5%
mul-1-neg6.5%
unpow26.5%
distribute-rgt-neg-out6.5%
associate-*l*34.1%
Simplified34.1%
Taylor expanded in y around 0 2.4%
unpow22.4%
*-commutative2.4%
associate-*r/2.4%
neg-mul-12.4%
distribute-rgt-neg-in2.4%
associate-/l*2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Taylor expanded in x around 0 33.0%
mul-1-neg33.0%
unpow233.0%
associate-*r*33.5%
distribute-rgt-neg-in33.5%
*-commutative33.5%
distribute-lft-neg-out33.5%
*-commutative33.5%
Simplified33.5%
if -1.3200000000000001e141 < y < 1.25000000000000007e135Initial program 100.0%
Taylor expanded in y around 0 84.7%
if 1.25000000000000007e135 < y Initial program 99.7%
flip-+32.2%
div-inv32.0%
pow232.0%
*-commutative32.0%
*-commutative32.0%
swap-sqr6.3%
add-sqr-sqrt6.3%
associate--l-6.3%
Applied egg-rr6.3%
Taylor expanded in y around inf 7.4%
mul-1-neg7.4%
unpow27.4%
distribute-rgt-neg-out7.4%
associate-*l*33.1%
Simplified33.1%
Taylor expanded in y around 0 18.5%
unpow218.5%
*-commutative18.5%
associate-*r/18.5%
neg-mul-118.5%
distribute-rgt-neg-in18.5%
associate-/l*18.6%
distribute-rgt-neg-in18.6%
Simplified18.6%
Taylor expanded in x around inf 21.2%
unpow221.2%
Simplified21.2%
Final simplification67.9%
(FPCore (x y) :precision binary64 (if (<= y -5.2e+141) (* x (* y (- y))) (if (<= y 2.6e+135) (- 1.0 x) (* y y))))
double code(double x, double y) {
double tmp;
if (y <= -5.2e+141) {
tmp = x * (y * -y);
} else if (y <= 2.6e+135) {
tmp = 1.0 - x;
} else {
tmp = y * y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-5.2d+141)) then
tmp = x * (y * -y)
else if (y <= 2.6d+135) then
tmp = 1.0d0 - x
else
tmp = y * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -5.2e+141) {
tmp = x * (y * -y);
} else if (y <= 2.6e+135) {
tmp = 1.0 - x;
} else {
tmp = y * y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5.2e+141: tmp = x * (y * -y) elif y <= 2.6e+135: tmp = 1.0 - x else: tmp = y * y return tmp
function code(x, y) tmp = 0.0 if (y <= -5.2e+141) tmp = Float64(x * Float64(y * Float64(-y))); elseif (y <= 2.6e+135) tmp = Float64(1.0 - x); else tmp = Float64(y * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -5.2e+141) tmp = x * (y * -y); elseif (y <= 2.6e+135) tmp = 1.0 - x; else tmp = y * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5.2e+141], N[(x * N[(y * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+135], N[(1.0 - x), $MachinePrecision], N[(y * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+141}:\\
\;\;\;\;x \cdot \left(y \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+135}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;y \cdot y\\
\end{array}
\end{array}
if y < -5.1999999999999999e141Initial program 99.8%
flip-+33.9%
div-inv33.9%
pow233.9%
*-commutative33.9%
*-commutative33.9%
swap-sqr6.3%
add-sqr-sqrt6.2%
associate--l-6.2%
Applied egg-rr6.2%
Taylor expanded in y around inf 6.5%
mul-1-neg6.5%
unpow26.5%
distribute-rgt-neg-out6.5%
associate-*l*34.1%
Simplified34.1%
Taylor expanded in x around 0 33.0%
unpow233.0%
associate-*r*33.0%
neg-mul-133.0%
*-commutative33.0%
distribute-rgt-neg-in33.0%
Simplified33.0%
if -5.1999999999999999e141 < y < 2.6e135Initial program 100.0%
Taylor expanded in y around 0 84.7%
if 2.6e135 < y Initial program 99.7%
flip-+32.2%
div-inv32.0%
pow232.0%
*-commutative32.0%
*-commutative32.0%
swap-sqr6.3%
add-sqr-sqrt6.3%
associate--l-6.3%
Applied egg-rr6.3%
Taylor expanded in y around inf 7.4%
mul-1-neg7.4%
unpow27.4%
distribute-rgt-neg-out7.4%
associate-*l*33.1%
Simplified33.1%
Taylor expanded in x around inf 21.2%
unpow221.2%
Simplified21.2%
Final simplification67.9%
(FPCore (x y) :precision binary64 (if (<= y -3.8e+142) (* y (* x (- y))) (if (<= y 5e+133) (- 1.0 x) (* y y))))
double code(double x, double y) {
double tmp;
if (y <= -3.8e+142) {
tmp = y * (x * -y);
} else if (y <= 5e+133) {
tmp = 1.0 - x;
} else {
tmp = y * y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-3.8d+142)) then
tmp = y * (x * -y)
else if (y <= 5d+133) then
tmp = 1.0d0 - x
else
tmp = y * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.8e+142) {
tmp = y * (x * -y);
} else if (y <= 5e+133) {
tmp = 1.0 - x;
} else {
tmp = y * y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.8e+142: tmp = y * (x * -y) elif y <= 5e+133: tmp = 1.0 - x else: tmp = y * y return tmp
function code(x, y) tmp = 0.0 if (y <= -3.8e+142) tmp = Float64(y * Float64(x * Float64(-y))); elseif (y <= 5e+133) tmp = Float64(1.0 - x); else tmp = Float64(y * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.8e+142) tmp = y * (x * -y); elseif (y <= 5e+133) tmp = 1.0 - x; else tmp = y * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.8e+142], N[(y * N[(x * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+133], N[(1.0 - x), $MachinePrecision], N[(y * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \left(x \cdot \left(-y\right)\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+133}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;y \cdot y\\
\end{array}
\end{array}
if y < -3.7999999999999999e142Initial program 99.8%
flip-+33.9%
div-inv33.9%
pow233.9%
*-commutative33.9%
*-commutative33.9%
swap-sqr6.3%
add-sqr-sqrt6.2%
associate--l-6.2%
Applied egg-rr6.2%
Taylor expanded in y around inf 6.5%
mul-1-neg6.5%
unpow26.5%
distribute-rgt-neg-out6.5%
associate-*l*34.1%
Simplified34.1%
Taylor expanded in y around 0 2.4%
unpow22.4%
*-commutative2.4%
associate-*r/2.4%
neg-mul-12.4%
distribute-rgt-neg-in2.4%
associate-/l*2.4%
distribute-rgt-neg-in2.4%
Simplified2.4%
Taylor expanded in x around 0 33.0%
mul-1-neg33.0%
unpow233.0%
associate-*r*33.5%
distribute-rgt-neg-in33.5%
*-commutative33.5%
distribute-lft-neg-out33.5%
*-commutative33.5%
Simplified33.5%
if -3.7999999999999999e142 < y < 4.99999999999999961e133Initial program 100.0%
Taylor expanded in y around 0 84.7%
if 4.99999999999999961e133 < y Initial program 99.7%
flip-+32.2%
div-inv32.0%
pow232.0%
*-commutative32.0%
*-commutative32.0%
swap-sqr6.3%
add-sqr-sqrt6.3%
associate--l-6.3%
Applied egg-rr6.3%
Taylor expanded in y around inf 7.4%
mul-1-neg7.4%
unpow27.4%
distribute-rgt-neg-out7.4%
associate-*l*33.1%
Simplified33.1%
Taylor expanded in x around inf 21.2%
unpow221.2%
Simplified21.2%
Final simplification67.9%
(FPCore (x y) :precision binary64 (if (<= y 4.2e+135) (- 1.0 x) (* y y)))
double code(double x, double y) {
double tmp;
if (y <= 4.2e+135) {
tmp = 1.0 - x;
} else {
tmp = y * y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.2d+135) then
tmp = 1.0d0 - x
else
tmp = y * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.2e+135) {
tmp = 1.0 - x;
} else {
tmp = y * y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.2e+135: tmp = 1.0 - x else: tmp = y * y return tmp
function code(x, y) tmp = 0.0 if (y <= 4.2e+135) tmp = Float64(1.0 - x); else tmp = Float64(y * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.2e+135) tmp = 1.0 - x; else tmp = y * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.2e+135], N[(1.0 - x), $MachinePrecision], N[(y * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.2 \cdot 10^{+135}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;y \cdot y\\
\end{array}
\end{array}
if y < 4.20000000000000019e135Initial program 99.9%
Taylor expanded in y around 0 70.6%
if 4.20000000000000019e135 < y Initial program 99.7%
flip-+32.2%
div-inv32.0%
pow232.0%
*-commutative32.0%
*-commutative32.0%
swap-sqr6.3%
add-sqr-sqrt6.3%
associate--l-6.3%
Applied egg-rr6.3%
Taylor expanded in y around inf 7.4%
mul-1-neg7.4%
unpow27.4%
distribute-rgt-neg-out7.4%
associate-*l*33.1%
Simplified33.1%
Taylor expanded in x around inf 21.2%
unpow221.2%
Simplified21.2%
Final simplification63.5%
(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 58.0%
if 1 < x Initial program 99.9%
Taylor expanded in x around inf 61.3%
mul-1-neg61.3%
Simplified61.3%
Final simplification59.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 x around 0 29.1%
Final simplification29.1%
herbie shell --seed 2023240
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, E"
:precision binary64
(+ (- 1.0 x) (* y (sqrt x))))