
(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 13 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.8%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ (* (sqrt x) y) 1.0))) (if (<= y -6.4e+34) t_0 (if (<= y 2.15e+87) (- 1.0 x) t_0))))
double code(double x, double y) {
double t_0 = (sqrt(x) * y) + 1.0;
double tmp;
if (y <= -6.4e+34) {
tmp = t_0;
} else if (y <= 2.15e+87) {
tmp = 1.0 - x;
} else {
tmp = 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 = (sqrt(x) * y) + 1.0d0
if (y <= (-6.4d+34)) then
tmp = t_0
else if (y <= 2.15d+87) then
tmp = 1.0d0 - x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (Math.sqrt(x) * y) + 1.0;
double tmp;
if (y <= -6.4e+34) {
tmp = t_0;
} else if (y <= 2.15e+87) {
tmp = 1.0 - x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = (math.sqrt(x) * y) + 1.0 tmp = 0 if y <= -6.4e+34: tmp = t_0 elif y <= 2.15e+87: tmp = 1.0 - x else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(Float64(sqrt(x) * y) + 1.0) tmp = 0.0 if (y <= -6.4e+34) tmp = t_0; elseif (y <= 2.15e+87) tmp = Float64(1.0 - x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = (sqrt(x) * y) + 1.0; tmp = 0.0; if (y <= -6.4e+34) tmp = t_0; elseif (y <= 2.15e+87) tmp = 1.0 - x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[y, -6.4e+34], t$95$0, If[LessEqual[y, 2.15e+87], N[(1.0 - x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot y + 1\\
\mathbf{if}\;y \leq -6.4 \cdot 10^{+34}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+87}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -6.3999999999999997e34 or 2.15e87 < y Initial program 99.6%
Taylor expanded in x around 0 0
Simplified0
if -6.3999999999999997e34 < y < 2.15e87Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 (let* ((t_0 (* (sqrt x) y))) (if (<= y -6e+79) t_0 (if (<= y 1.32e+88) (- 1.0 x) t_0))))
double code(double x, double y) {
double t_0 = sqrt(x) * y;
double tmp;
if (y <= -6e+79) {
tmp = t_0;
} else if (y <= 1.32e+88) {
tmp = 1.0 - x;
} else {
tmp = 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 = sqrt(x) * y
if (y <= (-6d+79)) then
tmp = t_0
else if (y <= 1.32d+88) then
tmp = 1.0d0 - x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * y;
double tmp;
if (y <= -6e+79) {
tmp = t_0;
} else if (y <= 1.32e+88) {
tmp = 1.0 - x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * y tmp = 0 if y <= -6e+79: tmp = t_0 elif y <= 1.32e+88: tmp = 1.0 - x else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sqrt(x) * y) tmp = 0.0 if (y <= -6e+79) tmp = t_0; elseif (y <= 1.32e+88) tmp = Float64(1.0 - x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * y; tmp = 0.0; if (y <= -6e+79) tmp = t_0; elseif (y <= 1.32e+88) tmp = 1.0 - x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -6e+79], t$95$0, If[LessEqual[y, 1.32e+88], N[(1.0 - x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot y\\
\mathbf{if}\;y \leq -6 \cdot 10^{+79}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{+88}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -5.99999999999999948e79 or 1.3200000000000001e88 < y Initial program 99.6%
Taylor expanded in y around inf 0
Simplified0
if -5.99999999999999948e79 < y < 1.3200000000000001e88Initial program 100.0%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= x 195.0) (+ (/ y (pow x -0.5)) 1.0) (* (+ -1.0 (/ y (sqrt x))) x)))
double code(double x, double y) {
double tmp;
if (x <= 195.0) {
tmp = (y / pow(x, -0.5)) + 1.0;
} else {
tmp = (-1.0 + (y / sqrt(x))) * x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 195.0d0) then
tmp = (y / (x ** (-0.5d0))) + 1.0d0
else
tmp = ((-1.0d0) + (y / sqrt(x))) * x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 195.0) {
tmp = (y / Math.pow(x, -0.5)) + 1.0;
} else {
tmp = (-1.0 + (y / Math.sqrt(x))) * x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 195.0: tmp = (y / math.pow(x, -0.5)) + 1.0 else: tmp = (-1.0 + (y / math.sqrt(x))) * x return tmp
function code(x, y) tmp = 0.0 if (x <= 195.0) tmp = Float64(Float64(y / (x ^ -0.5)) + 1.0); else tmp = Float64(Float64(-1.0 + Float64(y / sqrt(x))) * x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 195.0) tmp = (y / (x ^ -0.5)) + 1.0; else tmp = (-1.0 + (y / sqrt(x))) * x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 195.0], N[(N[(y / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(-1.0 + N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 195:\\
\;\;\;\;\frac{y}{{x}^{-0.5}} + 1\\
\mathbf{else}:\\
\;\;\;\;\left(-1 + \frac{y}{\sqrt{x}}\right) \cdot x\\
\end{array}
\end{array}
if x < 195Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Applied egg-rr0
if 195 < x Initial program 99.9%
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
(FPCore (x y) :precision binary64 (if (<= x 1.0) (+ (/ y (pow x -0.5)) 1.0) (- (* (sqrt x) y) x)))
double code(double x, double y) {
double tmp;
if (x <= 1.0) {
tmp = (y / pow(x, -0.5)) + 1.0;
} else {
tmp = (sqrt(x) * y) - 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 = (y / (x ** (-0.5d0))) + 1.0d0
else
tmp = (sqrt(x) * y) - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.0) {
tmp = (y / Math.pow(x, -0.5)) + 1.0;
} else {
tmp = (Math.sqrt(x) * y) - x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.0: tmp = (y / math.pow(x, -0.5)) + 1.0 else: tmp = (math.sqrt(x) * y) - x return tmp
function code(x, y) tmp = 0.0 if (x <= 1.0) tmp = Float64(Float64(y / (x ^ -0.5)) + 1.0); else tmp = Float64(Float64(sqrt(x) * y) - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.0) tmp = (y / (x ^ -0.5)) + 1.0; else tmp = (sqrt(x) * y) - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.0], N[(N[(y / N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(N[(N[Sqrt[x], $MachinePrecision] * y), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;\frac{y}{{x}^{-0.5}} + 1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot y - x\\
\end{array}
\end{array}
if x < 1Initial program 99.8%
Taylor expanded in x around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Applied egg-rr0
if 1 < x Initial program 99.9%
Taylor expanded in x around inf 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
(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.8%
Taylor expanded in x around 0 0
Simplified0
if 1 < x Initial program 99.9%
Taylor expanded in x around inf 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= y -2.15e+116)
(* (/ 1.0 y) (- 0.0 (* x y)))
(if (<= y 6e+88)
(- 1.0 x)
(* (/ 1.0 (/ y (- 1.0 (* x x)))) (* (* y (- 1.0 x)) (+ 1.0 (* x x)))))))
double code(double x, double y) {
double tmp;
if (y <= -2.15e+116) {
tmp = (1.0 / y) * (0.0 - (x * y));
} else if (y <= 6e+88) {
tmp = 1.0 - x;
} else {
tmp = (1.0 / (y / (1.0 - (x * x)))) * ((y * (1.0 - x)) * (1.0 + (x * 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.15d+116)) then
tmp = (1.0d0 / y) * (0.0d0 - (x * y))
else if (y <= 6d+88) then
tmp = 1.0d0 - x
else
tmp = (1.0d0 / (y / (1.0d0 - (x * x)))) * ((y * (1.0d0 - x)) * (1.0d0 + (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.15e+116) {
tmp = (1.0 / y) * (0.0 - (x * y));
} else if (y <= 6e+88) {
tmp = 1.0 - x;
} else {
tmp = (1.0 / (y / (1.0 - (x * x)))) * ((y * (1.0 - x)) * (1.0 + (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.15e+116: tmp = (1.0 / y) * (0.0 - (x * y)) elif y <= 6e+88: tmp = 1.0 - x else: tmp = (1.0 / (y / (1.0 - (x * x)))) * ((y * (1.0 - x)) * (1.0 + (x * x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.15e+116) tmp = Float64(Float64(1.0 / y) * Float64(0.0 - Float64(x * y))); elseif (y <= 6e+88) tmp = Float64(1.0 - x); else tmp = Float64(Float64(1.0 / Float64(y / Float64(1.0 - Float64(x * x)))) * Float64(Float64(y * Float64(1.0 - x)) * Float64(1.0 + Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.15e+116) tmp = (1.0 / y) * (0.0 - (x * y)); elseif (y <= 6e+88) tmp = 1.0 - x; else tmp = (1.0 / (y / (1.0 - (x * x)))) * ((y * (1.0 - x)) * (1.0 + (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.15e+116], N[(N[(1.0 / y), $MachinePrecision] * N[(0.0 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+88], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 / N[(y / N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+116}:\\
\;\;\;\;\frac{1}{y} \cdot \left(0 - x \cdot y\right)\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+88}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{1 - x \cdot x}} \cdot \left(\left(y \cdot \left(1 - x\right)\right) \cdot \left(1 + x \cdot x\right)\right)\\
\end{array}
\end{array}
if y < -2.15e116Initial program 99.6%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
if -2.15e116 < y < 6.00000000000000011e88Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
if 6.00000000000000011e88 < y Initial program 99.6%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y)
:precision binary64
(if (<= y -2.15e+116)
(* (/ 1.0 y) (- 0.0 (* x y)))
(if (<= y 6e+88)
(- 1.0 x)
(* (/ 1.0 (/ y (- 1.0 (* x x)))) (* y (- 1.0 x))))))
double code(double x, double y) {
double tmp;
if (y <= -2.15e+116) {
tmp = (1.0 / y) * (0.0 - (x * y));
} else if (y <= 6e+88) {
tmp = 1.0 - x;
} else {
tmp = (1.0 / (y / (1.0 - (x * x)))) * (y * (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.15d+116)) then
tmp = (1.0d0 / y) * (0.0d0 - (x * y))
else if (y <= 6d+88) then
tmp = 1.0d0 - x
else
tmp = (1.0d0 / (y / (1.0d0 - (x * x)))) * (y * (1.0d0 - x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.15e+116) {
tmp = (1.0 / y) * (0.0 - (x * y));
} else if (y <= 6e+88) {
tmp = 1.0 - x;
} else {
tmp = (1.0 / (y / (1.0 - (x * x)))) * (y * (1.0 - x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.15e+116: tmp = (1.0 / y) * (0.0 - (x * y)) elif y <= 6e+88: tmp = 1.0 - x else: tmp = (1.0 / (y / (1.0 - (x * x)))) * (y * (1.0 - x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.15e+116) tmp = Float64(Float64(1.0 / y) * Float64(0.0 - Float64(x * y))); elseif (y <= 6e+88) tmp = Float64(1.0 - x); else tmp = Float64(Float64(1.0 / Float64(y / Float64(1.0 - Float64(x * x)))) * Float64(y * Float64(1.0 - x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.15e+116) tmp = (1.0 / y) * (0.0 - (x * y)); elseif (y <= 6e+88) tmp = 1.0 - x; else tmp = (1.0 / (y / (1.0 - (x * x)))) * (y * (1.0 - x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.15e+116], N[(N[(1.0 / y), $MachinePrecision] * N[(0.0 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+88], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 / N[(y / N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+116}:\\
\;\;\;\;\frac{1}{y} \cdot \left(0 - x \cdot y\right)\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+88}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{1 - x \cdot x}} \cdot \left(y \cdot \left(1 - x\right)\right)\\
\end{array}
\end{array}
if y < -2.15e116Initial program 99.6%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
if -2.15e116 < y < 6.00000000000000011e88Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
if 6.00000000000000011e88 < y Initial program 99.6%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in x around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= y -2.15e+116) (* (/ 1.0 y) (- 0.0 (* x y))) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if (y <= -2.15e+116) {
tmp = (1.0 / y) * (0.0 - (x * y));
} 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.15d+116)) then
tmp = (1.0d0 / y) * (0.0d0 - (x * y))
else
tmp = 1.0d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.15e+116) {
tmp = (1.0 / y) * (0.0 - (x * y));
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.15e+116: tmp = (1.0 / y) * (0.0 - (x * y)) else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if (y <= -2.15e+116) tmp = Float64(Float64(1.0 / y) * Float64(0.0 - Float64(x * y))); else tmp = Float64(1.0 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.15e+116) tmp = (1.0 / y) * (0.0 - (x * y)); else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.15e+116], N[(N[(1.0 / y), $MachinePrecision] * N[(0.0 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+116}:\\
\;\;\;\;\frac{1}{y} \cdot \left(0 - x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -2.15e116Initial program 99.6%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
Taylor expanded in x around inf 0
Simplified0
if -2.15e116 < y Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= y -1.02e+146) (/ (* (- 1.0 x) y) y) (- 1.0 x)))
double code(double x, double y) {
double tmp;
if (y <= -1.02e+146) {
tmp = ((1.0 - x) * y) / y;
} 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.02d+146)) then
tmp = ((1.0d0 - x) * y) / y
else
tmp = 1.0d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.02e+146) {
tmp = ((1.0 - x) * y) / y;
} else {
tmp = 1.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.02e+146: tmp = ((1.0 - x) * y) / y else: tmp = 1.0 - x return tmp
function code(x, y) tmp = 0.0 if (y <= -1.02e+146) tmp = Float64(Float64(Float64(1.0 - x) * y) / y); else tmp = Float64(1.0 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.02e+146) tmp = ((1.0 - x) * y) / y; else tmp = 1.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.02e+146], N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / y), $MachinePrecision], N[(1.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+146}:\\
\;\;\;\;\frac{\left(1 - x\right) \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;1 - x\\
\end{array}
\end{array}
if y < -1.01999999999999997e146Initial program 99.6%
Taylor expanded in y around 0 0
Simplified0
Applied egg-rr0
Applied egg-rr0
if -1.01999999999999997e146 < y Initial program 99.8%
Taylor expanded in y around 0 0
Simplified0
(FPCore (x y) :precision binary64 (if (<= x 400000000.0) 1.0 (- x)))
double code(double x, double y) {
double tmp;
if (x <= 400000000.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 <= 400000000.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 <= 400000000.0) {
tmp = 1.0;
} else {
tmp = -x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 400000000.0: tmp = 1.0 else: tmp = -x return tmp
function code(x, y) tmp = 0.0 if (x <= 400000000.0) tmp = 1.0; else tmp = Float64(-x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 400000000.0) tmp = 1.0; else tmp = -x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 400000000.0], 1.0, (-x)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 400000000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\end{array}
if x < 4e8Initial program 99.8%
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
if 4e8 < x Initial program 99.9%
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around inf 0
Simplified0
Applied egg-rr0
(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.8%
Taylor expanded in y around 0 0
Simplified0
(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.8%
Taylor expanded in y around 0 0
Simplified0
Taylor expanded in x around 0 0
Simplified0
herbie shell --seed 2024110
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, E"
:precision binary64
(+ (- 1.0 x) (* y (sqrt x))))