
(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 15 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%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ 1.0 (* y (sqrt x))))) (if (<= y -8.5e+28) t_0 (if (<= y 2.75e+32) (- 1.0 x) t_0))))
double code(double x, double y) {
double t_0 = 1.0 + (y * sqrt(x));
double tmp;
if (y <= -8.5e+28) {
tmp = t_0;
} else if (y <= 2.75e+32) {
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 = 1.0d0 + (y * sqrt(x))
if (y <= (-8.5d+28)) then
tmp = t_0
else if (y <= 2.75d+32) 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 = 1.0 + (y * Math.sqrt(x));
double tmp;
if (y <= -8.5e+28) {
tmp = t_0;
} else if (y <= 2.75e+32) {
tmp = 1.0 - x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 + (y * math.sqrt(x)) tmp = 0 if y <= -8.5e+28: tmp = t_0 elif y <= 2.75e+32: tmp = 1.0 - x else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(1.0 + Float64(y * sqrt(x))) tmp = 0.0 if (y <= -8.5e+28) tmp = t_0; elseif (y <= 2.75e+32) tmp = Float64(1.0 - x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 + (y * sqrt(x)); tmp = 0.0; if (y <= -8.5e+28) tmp = t_0; elseif (y <= 2.75e+32) tmp = 1.0 - x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 + N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e+28], t$95$0, If[LessEqual[y, 2.75e+32], N[(1.0 - x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + y \cdot \sqrt{x}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+28}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+32}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -8.49999999999999954e28 or 2.74999999999999992e32 < y Initial program 99.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6494.9%
Simplified94.9%
if -8.49999999999999954e28 < y < 2.74999999999999992e32Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6499.1%
Simplified99.1%
Final simplification97.3%
(FPCore (x y) :precision binary64 (let* ((t_0 (* y (sqrt x)))) (if (<= y -5.2e+73) t_0 (if (<= y 1.15e+97) (- 1.0 x) t_0))))
double code(double x, double y) {
double t_0 = y * sqrt(x);
double tmp;
if (y <= -5.2e+73) {
tmp = t_0;
} else if (y <= 1.15e+97) {
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 = y * sqrt(x)
if (y <= (-5.2d+73)) then
tmp = t_0
else if (y <= 1.15d+97) 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 = y * Math.sqrt(x);
double tmp;
if (y <= -5.2e+73) {
tmp = t_0;
} else if (y <= 1.15e+97) {
tmp = 1.0 - x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = y * math.sqrt(x) tmp = 0 if y <= -5.2e+73: tmp = t_0 elif y <= 1.15e+97: tmp = 1.0 - x else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(y * sqrt(x)) tmp = 0.0 if (y <= -5.2e+73) tmp = t_0; elseif (y <= 1.15e+97) tmp = Float64(1.0 - x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = y * sqrt(x); tmp = 0.0; if (y <= -5.2e+73) tmp = t_0; elseif (y <= 1.15e+97) tmp = 1.0 - x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e+73], t$95$0, If[LessEqual[y, 1.15e+97], N[(1.0 - x), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \sqrt{x}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+73}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+97}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -5.2000000000000001e73 or 1.15000000000000003e97 < y Initial program 99.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6491.9%
Simplified91.9%
if -5.2000000000000001e73 < y < 1.15000000000000003e97Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6496.8%
Simplified96.8%
Final simplification94.9%
(FPCore (x y) :precision binary64 (let* ((t_0 (* y (sqrt x)))) (if (<= x 1.0) (+ 1.0 t_0) (- t_0 x))))
double code(double x, double y) {
double t_0 = y * sqrt(x);
double tmp;
if (x <= 1.0) {
tmp = 1.0 + t_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 = 1.0d0 + t_0
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 = 1.0 + t_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 = 1.0 + t_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(1.0 + t_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 = 1.0 + t_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[(1.0 + t$95$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:\\
\;\;\;\;1 + t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 - x\\
\end{array}
\end{array}
if x < 1Initial program 99.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6497.8%
Simplified97.8%
if 1 < x Initial program 99.9%
Taylor expanded in x around inf
sub-negN/A
remove-double-negN/A
distribute-rgt-neg-outN/A
mul-1-negN/A
rem-square-sqrtN/A
unpow2N/A
*-commutativeN/A
distribute-neg-inN/A
+-commutativeN/A
*-lowering-*.f64N/A
distribute-neg-inN/A
metadata-evalN/A
*-commutativeN/A
unpow2N/A
rem-square-sqrtN/A
Simplified98.7%
Taylor expanded in x around 0
+-commutativeN/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
sqrt-lowering-sqrt.f6498.8%
Simplified98.8%
Final simplification98.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* x (* x x))))
(if (<= y -6e+152)
(- 1.0 (* t_0 (* t_0 t_0)))
(if (<= y 4.8e+125)
(- 1.0 x)
(* (- 1.0 t_0) (+ 1.0 (* x (+ -1.0 (* x (* x (- 1.0 x)))))))))))
double code(double x, double y) {
double t_0 = x * (x * x);
double tmp;
if (y <= -6e+152) {
tmp = 1.0 - (t_0 * (t_0 * t_0));
} else if (y <= 4.8e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - t_0) * (1.0 + (x * (-1.0 + (x * (x * (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 = x * (x * x)
if (y <= (-6d+152)) then
tmp = 1.0d0 - (t_0 * (t_0 * t_0))
else if (y <= 4.8d+125) then
tmp = 1.0d0 - x
else
tmp = (1.0d0 - t_0) * (1.0d0 + (x * ((-1.0d0) + (x * (x * (1.0d0 - x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x * (x * x);
double tmp;
if (y <= -6e+152) {
tmp = 1.0 - (t_0 * (t_0 * t_0));
} else if (y <= 4.8e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - t_0) * (1.0 + (x * (-1.0 + (x * (x * (1.0 - x))))));
}
return tmp;
}
def code(x, y): t_0 = x * (x * x) tmp = 0 if y <= -6e+152: tmp = 1.0 - (t_0 * (t_0 * t_0)) elif y <= 4.8e+125: tmp = 1.0 - x else: tmp = (1.0 - t_0) * (1.0 + (x * (-1.0 + (x * (x * (1.0 - x)))))) return tmp
function code(x, y) t_0 = Float64(x * Float64(x * x)) tmp = 0.0 if (y <= -6e+152) tmp = Float64(1.0 - Float64(t_0 * Float64(t_0 * t_0))); elseif (y <= 4.8e+125) tmp = Float64(1.0 - x); else tmp = Float64(Float64(1.0 - t_0) * Float64(1.0 + Float64(x * Float64(-1.0 + Float64(x * Float64(x * Float64(1.0 - x))))))); end return tmp end
function tmp_2 = code(x, y) t_0 = x * (x * x); tmp = 0.0; if (y <= -6e+152) tmp = 1.0 - (t_0 * (t_0 * t_0)); elseif (y <= 4.8e+125) tmp = 1.0 - x; else tmp = (1.0 - t_0) * (1.0 + (x * (-1.0 + (x * (x * (1.0 - x)))))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6e+152], N[(1.0 - N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+125], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 - t$95$0), $MachinePrecision] * N[(1.0 + N[(x * N[(-1.0 + N[(x * N[(x * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;y \leq -6 \cdot 10^{+152}:\\
\;\;\;\;1 - t\_0 \cdot \left(t\_0 \cdot t\_0\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+125}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\left(1 - t\_0\right) \cdot \left(1 + x \cdot \left(-1 + x \cdot \left(x \cdot \left(1 - x\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < -5.99999999999999981e152Initial program 99.7%
Taylor expanded in y around 0
--lowering--.f643.9%
Simplified3.9%
flip3--N/A
div-invN/A
metadata-evalN/A
flip3--N/A
frac-timesN/A
/-lowering-/.f64N/A
Applied egg-rr1.0%
Taylor expanded in x around 0
Simplified21.7%
if -5.99999999999999981e152 < y < 4.7999999999999999e125Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6486.2%
Simplified86.2%
if 4.7999999999999999e125 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6428.3%
Simplified28.3%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (* x (* x x)))))
(if (<= y -9e+152)
(* t_0 (+ 1.0 (* x (+ (* x x) -1.0))))
(if (<= y 2e+125)
(- 1.0 x)
(* t_0 (+ 1.0 (* x (+ -1.0 (* x (* x (- 1.0 x)))))))))))
double code(double x, double y) {
double t_0 = 1.0 - (x * (x * x));
double tmp;
if (y <= -9e+152) {
tmp = t_0 * (1.0 + (x * ((x * x) + -1.0)));
} else if (y <= 2e+125) {
tmp = 1.0 - x;
} else {
tmp = t_0 * (1.0 + (x * (-1.0 + (x * (x * (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 * x))
if (y <= (-9d+152)) then
tmp = t_0 * (1.0d0 + (x * ((x * x) + (-1.0d0))))
else if (y <= 2d+125) then
tmp = 1.0d0 - x
else
tmp = t_0 * (1.0d0 + (x * ((-1.0d0) + (x * (x * (1.0d0 - x))))))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (x * (x * x));
double tmp;
if (y <= -9e+152) {
tmp = t_0 * (1.0 + (x * ((x * x) + -1.0)));
} else if (y <= 2e+125) {
tmp = 1.0 - x;
} else {
tmp = t_0 * (1.0 + (x * (-1.0 + (x * (x * (1.0 - x))))));
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (x * (x * x)) tmp = 0 if y <= -9e+152: tmp = t_0 * (1.0 + (x * ((x * x) + -1.0))) elif y <= 2e+125: tmp = 1.0 - x else: tmp = t_0 * (1.0 + (x * (-1.0 + (x * (x * (1.0 - x)))))) return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(x * Float64(x * x))) tmp = 0.0 if (y <= -9e+152) tmp = Float64(t_0 * Float64(1.0 + Float64(x * Float64(Float64(x * x) + -1.0)))); elseif (y <= 2e+125) tmp = Float64(1.0 - x); else tmp = Float64(t_0 * Float64(1.0 + Float64(x * Float64(-1.0 + Float64(x * Float64(x * Float64(1.0 - x))))))); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (x * (x * x)); tmp = 0.0; if (y <= -9e+152) tmp = t_0 * (1.0 + (x * ((x * x) + -1.0))); elseif (y <= 2e+125) tmp = 1.0 - x; else tmp = t_0 * (1.0 + (x * (-1.0 + (x * (x * (1.0 - x)))))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+152], N[(t$95$0 * N[(1.0 + N[(x * N[(N[(x * x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+125], N[(1.0 - x), $MachinePrecision], N[(t$95$0 * N[(1.0 + N[(x * N[(-1.0 + N[(x * N[(x * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{+152}:\\
\;\;\;\;t\_0 \cdot \left(1 + x \cdot \left(x \cdot x + -1\right)\right)\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+125}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(1 + x \cdot \left(-1 + x \cdot \left(x \cdot \left(1 - x\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < -9.0000000000000002e152Initial program 99.7%
Taylor expanded in y around 0
--lowering--.f643.9%
Simplified3.9%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6413.1%
Applied egg-rr13.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6421.7%
Simplified21.7%
if -9.0000000000000002e152 < y < 1.9999999999999998e125Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6486.2%
Simplified86.2%
if 1.9999999999999998e125 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6428.3%
Simplified28.3%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(if (<= y -1.26e+151)
(* (- 1.0 (* x (* x x))) (+ 1.0 (* x (+ (* x x) -1.0))))
(if (<= y 4.2e+124)
(- 1.0 x)
(* (+ 1.0 (* x (+ -1.0 (* x (- 1.0 x))))) (- 1.0 (* x x))))))
double code(double x, double y) {
double tmp;
if (y <= -1.26e+151) {
tmp = (1.0 - (x * (x * x))) * (1.0 + (x * ((x * x) + -1.0)));
} else if (y <= 4.2e+124) {
tmp = 1.0 - x;
} else {
tmp = (1.0 + (x * (-1.0 + (x * (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 <= (-1.26d+151)) then
tmp = (1.0d0 - (x * (x * x))) * (1.0d0 + (x * ((x * x) + (-1.0d0))))
else if (y <= 4.2d+124) then
tmp = 1.0d0 - x
else
tmp = (1.0d0 + (x * ((-1.0d0) + (x * (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 <= -1.26e+151) {
tmp = (1.0 - (x * (x * x))) * (1.0 + (x * ((x * x) + -1.0)));
} else if (y <= 4.2e+124) {
tmp = 1.0 - x;
} else {
tmp = (1.0 + (x * (-1.0 + (x * (1.0 - x))))) * (1.0 - (x * x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.26e+151: tmp = (1.0 - (x * (x * x))) * (1.0 + (x * ((x * x) + -1.0))) elif y <= 4.2e+124: tmp = 1.0 - x else: tmp = (1.0 + (x * (-1.0 + (x * (1.0 - x))))) * (1.0 - (x * x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.26e+151) tmp = Float64(Float64(1.0 - Float64(x * Float64(x * x))) * Float64(1.0 + Float64(x * Float64(Float64(x * x) + -1.0)))); elseif (y <= 4.2e+124) tmp = Float64(1.0 - x); else tmp = Float64(Float64(1.0 + Float64(x * Float64(-1.0 + Float64(x * 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 <= -1.26e+151) tmp = (1.0 - (x * (x * x))) * (1.0 + (x * ((x * x) + -1.0))); elseif (y <= 4.2e+124) tmp = 1.0 - x; else tmp = (1.0 + (x * (-1.0 + (x * (1.0 - x))))) * (1.0 - (x * x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.26e+151], N[(N[(1.0 - N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(x * N[(N[(x * x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+124], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 + N[(x * N[(-1.0 + N[(x * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.26 \cdot 10^{+151}:\\
\;\;\;\;\left(1 - x \cdot \left(x \cdot x\right)\right) \cdot \left(1 + x \cdot \left(x \cdot x + -1\right)\right)\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+124}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\left(1 + x \cdot \left(-1 + x \cdot \left(1 - x\right)\right)\right) \cdot \left(1 - x \cdot x\right)\\
\end{array}
\end{array}
if y < -1.26000000000000006e151Initial program 99.7%
Taylor expanded in y around 0
--lowering--.f643.9%
Simplified3.9%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6413.1%
Applied egg-rr13.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f6421.7%
Simplified21.7%
if -1.26000000000000006e151 < y < 4.20000000000000023e124Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6486.2%
Simplified86.2%
if 4.20000000000000023e124 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip--N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-lowering-*.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6428.2%
Simplified28.2%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (* x x))))
(if (<= y -2.7e+151)
(* t_0 (+ 1.0 (* x (+ x -1.0))))
(if (<= y 7.5e+124)
(- 1.0 x)
(* (+ 1.0 (* x (+ -1.0 (* x (- 1.0 x))))) t_0)))))
double code(double x, double y) {
double t_0 = 1.0 - (x * x);
double tmp;
if (y <= -2.7e+151) {
tmp = t_0 * (1.0 + (x * (x + -1.0)));
} else if (y <= 7.5e+124) {
tmp = 1.0 - x;
} else {
tmp = (1.0 + (x * (-1.0 + (x * (1.0 - 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 - (x * x)
if (y <= (-2.7d+151)) then
tmp = t_0 * (1.0d0 + (x * (x + (-1.0d0))))
else if (y <= 7.5d+124) then
tmp = 1.0d0 - x
else
tmp = (1.0d0 + (x * ((-1.0d0) + (x * (1.0d0 - x))))) * t_0
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.7e+151) {
tmp = t_0 * (1.0 + (x * (x + -1.0)));
} else if (y <= 7.5e+124) {
tmp = 1.0 - x;
} else {
tmp = (1.0 + (x * (-1.0 + (x * (1.0 - x))))) * t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (x * x) tmp = 0 if y <= -2.7e+151: tmp = t_0 * (1.0 + (x * (x + -1.0))) elif y <= 7.5e+124: tmp = 1.0 - x else: tmp = (1.0 + (x * (-1.0 + (x * (1.0 - x))))) * t_0 return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(x * x)) tmp = 0.0 if (y <= -2.7e+151) tmp = Float64(t_0 * Float64(1.0 + Float64(x * Float64(x + -1.0)))); elseif (y <= 7.5e+124) tmp = Float64(1.0 - x); else tmp = Float64(Float64(1.0 + Float64(x * Float64(-1.0 + Float64(x * Float64(1.0 - x))))) * t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (x * x); tmp = 0.0; if (y <= -2.7e+151) tmp = t_0 * (1.0 + (x * (x + -1.0))); elseif (y <= 7.5e+124) tmp = 1.0 - x; else tmp = (1.0 + (x * (-1.0 + (x * (1.0 - x))))) * t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+151], N[(t$95$0 * N[(1.0 + N[(x * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+124], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 + N[(x * N[(-1.0 + N[(x * N[(1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - x \cdot x\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+151}:\\
\;\;\;\;t\_0 \cdot \left(1 + x \cdot \left(x + -1\right)\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+124}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\left(1 + x \cdot \left(-1 + x \cdot \left(1 - x\right)\right)\right) \cdot t\_0\\
\end{array}
\end{array}
if y < -2.7000000000000001e151Initial program 99.7%
Taylor expanded in y around 0
--lowering--.f643.9%
Simplified3.9%
flip--N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6410.4%
Applied egg-rr10.4%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-lowering-*.f6410.4%
Applied egg-rr10.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6421.5%
Simplified21.5%
if -2.7000000000000001e151 < y < 7.50000000000000038e124Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6486.2%
Simplified86.2%
if 7.50000000000000038e124 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip--N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-lowering-*.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6428.2%
Simplified28.2%
Final simplification69.2%
(FPCore (x y) :precision binary64 (if (<= y -2.6e+152) (* (- 1.0 (* x x)) (+ 1.0 (* x (+ x -1.0)))) (if (<= y 4.8e+125) (- 1.0 x) (* (- 1.0 x) (- 1.0 (* x (* x x)))))))
double code(double x, double y) {
double tmp;
if (y <= -2.6e+152) {
tmp = (1.0 - (x * x)) * (1.0 + (x * (x + -1.0)));
} else if (y <= 4.8e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - x) * (1.0 - (x * (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.6d+152)) then
tmp = (1.0d0 - (x * x)) * (1.0d0 + (x * (x + (-1.0d0))))
else if (y <= 4.8d+125) then
tmp = 1.0d0 - x
else
tmp = (1.0d0 - x) * (1.0d0 - (x * (x * x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.6e+152) {
tmp = (1.0 - (x * x)) * (1.0 + (x * (x + -1.0)));
} else if (y <= 4.8e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - x) * (1.0 - (x * (x * x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.6e+152: tmp = (1.0 - (x * x)) * (1.0 + (x * (x + -1.0))) elif y <= 4.8e+125: tmp = 1.0 - x else: tmp = (1.0 - x) * (1.0 - (x * (x * x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.6e+152) tmp = Float64(Float64(1.0 - Float64(x * x)) * Float64(1.0 + Float64(x * Float64(x + -1.0)))); elseif (y <= 4.8e+125) tmp = Float64(1.0 - x); else tmp = Float64(Float64(1.0 - x) * Float64(1.0 - Float64(x * Float64(x * x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.6e+152) tmp = (1.0 - (x * x)) * (1.0 + (x * (x + -1.0))); elseif (y <= 4.8e+125) tmp = 1.0 - x; else tmp = (1.0 - x) * (1.0 - (x * (x * x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.6e+152], N[(N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(x * N[(x + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+125], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] * N[(1.0 - N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+152}:\\
\;\;\;\;\left(1 - x \cdot x\right) \cdot \left(1 + x \cdot \left(x + -1\right)\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+125}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\left(1 - x\right) \cdot \left(1 - x \cdot \left(x \cdot x\right)\right)\\
\end{array}
\end{array}
if y < -2.6000000000000001e152Initial program 99.7%
Taylor expanded in y around 0
--lowering--.f643.9%
Simplified3.9%
flip--N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f6410.4%
Applied egg-rr10.4%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-lowering-*.f6410.4%
Applied egg-rr10.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f6421.5%
Simplified21.5%
if -2.6000000000000001e152 < y < 4.7999999999999999e125Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6486.2%
Simplified86.2%
if 4.7999999999999999e125 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f6426.3%
Simplified26.3%
Final simplification68.8%
(FPCore (x y) :precision binary64 (let* ((t_0 (- 1.0 (* x (* x x))))) (if (<= y -2.5e+151) t_0 (if (<= y 3.2e+125) (- 1.0 x) (* (- 1.0 x) t_0)))))
double code(double x, double y) {
double t_0 = 1.0 - (x * (x * x));
double tmp;
if (y <= -2.5e+151) {
tmp = t_0;
} else if (y <= 3.2e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - 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 - (x * (x * x))
if (y <= (-2.5d+151)) then
tmp = t_0
else if (y <= 3.2d+125) then
tmp = 1.0d0 - x
else
tmp = (1.0d0 - x) * t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (x * (x * x));
double tmp;
if (y <= -2.5e+151) {
tmp = t_0;
} else if (y <= 3.2e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - x) * t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (x * (x * x)) tmp = 0 if y <= -2.5e+151: tmp = t_0 elif y <= 3.2e+125: tmp = 1.0 - x else: tmp = (1.0 - x) * t_0 return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(x * Float64(x * x))) tmp = 0.0 if (y <= -2.5e+151) tmp = t_0; elseif (y <= 3.2e+125) tmp = Float64(1.0 - x); else tmp = Float64(Float64(1.0 - x) * t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (x * (x * x)); tmp = 0.0; if (y <= -2.5e+151) tmp = t_0; elseif (y <= 3.2e+125) tmp = 1.0 - x; else tmp = (1.0 - x) * t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e+151], t$95$0, If[LessEqual[y, 3.2e+125], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+151}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+125}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\left(1 - x\right) \cdot t\_0\\
\end{array}
\end{array}
if y < -2.5000000000000001e151Initial program 99.7%
Taylor expanded in y around 0
--lowering--.f643.9%
Simplified3.9%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6413.1%
Applied egg-rr13.1%
Taylor expanded in x around 0
Simplified21.2%
if -2.5000000000000001e151 < y < 3.19999999999999983e125Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6486.2%
Simplified86.2%
if 3.19999999999999983e125 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f6426.3%
Simplified26.3%
Final simplification68.8%
(FPCore (x y) :precision binary64 (if (<= y -8e+151) (- 1.0 (* x (* x x))) (if (<= y 4.8e+125) (- 1.0 x) (* (- 1.0 x) (- 1.0 (* x x))))))
double code(double x, double y) {
double tmp;
if (y <= -8e+151) {
tmp = 1.0 - (x * (x * x));
} else if (y <= 4.8e+125) {
tmp = 1.0 - x;
} else {
tmp = (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 <= (-8d+151)) then
tmp = 1.0d0 - (x * (x * x))
else if (y <= 4.8d+125) then
tmp = 1.0d0 - x
else
tmp = (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 <= -8e+151) {
tmp = 1.0 - (x * (x * x));
} else if (y <= 4.8e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - x) * (1.0 - (x * x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8e+151: tmp = 1.0 - (x * (x * x)) elif y <= 4.8e+125: tmp = 1.0 - x else: tmp = (1.0 - x) * (1.0 - (x * x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -8e+151) tmp = Float64(1.0 - Float64(x * Float64(x * x))); elseif (y <= 4.8e+125) tmp = Float64(1.0 - x); else tmp = Float64(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 <= -8e+151) tmp = 1.0 - (x * (x * x)); elseif (y <= 4.8e+125) tmp = 1.0 - x; else tmp = (1.0 - x) * (1.0 - (x * x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8e+151], N[(1.0 - N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+125], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] * N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+151}:\\
\;\;\;\;1 - x \cdot \left(x \cdot x\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+125}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\left(1 - x\right) \cdot \left(1 - x \cdot x\right)\\
\end{array}
\end{array}
if y < -8.00000000000000014e151Initial program 99.7%
Taylor expanded in y around 0
--lowering--.f643.9%
Simplified3.9%
flip3--N/A
div-invN/A
*-lowering-*.f64N/A
metadata-evalN/A
--lowering--.f64N/A
cube-multN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
metadata-evalN/A
+-lowering-+.f64N/A
distribute-rgt-outN/A
+-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f6413.1%
Applied egg-rr13.1%
Taylor expanded in x around 0
Simplified21.2%
if -8.00000000000000014e151 < y < 4.7999999999999999e125Initial program 100.0%
Taylor expanded in y around 0
--lowering--.f6486.2%
Simplified86.2%
if 4.7999999999999999e125 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip--N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-lowering-*.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f6425.9%
Simplified25.9%
Final simplification68.7%
(FPCore (x y) :precision binary64 (if (<= y 4.4e+125) (- 1.0 x) (* (- 1.0 x) (- 1.0 (* x x)))))
double code(double x, double y) {
double tmp;
if (y <= 4.4e+125) {
tmp = 1.0 - x;
} else {
tmp = (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 <= 4.4d+125) then
tmp = 1.0d0 - x
else
tmp = (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 <= 4.4e+125) {
tmp = 1.0 - x;
} else {
tmp = (1.0 - x) * (1.0 - (x * x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.4e+125: tmp = 1.0 - x else: tmp = (1.0 - x) * (1.0 - (x * x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.4e+125) tmp = Float64(1.0 - x); else tmp = Float64(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 <= 4.4e+125) tmp = 1.0 - x; else tmp = (1.0 - x) * (1.0 - (x * x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.4e+125], N[(1.0 - x), $MachinePrecision], N[(N[(1.0 - x), $MachinePrecision] * N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.4 \cdot 10^{+125}:\\
\;\;\;\;1 - x\\
\mathbf{else}:\\
\;\;\;\;\left(1 - x\right) \cdot \left(1 - x \cdot x\right)\\
\end{array}
\end{array}
if y < 4.39999999999999982e125Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f6475.0%
Simplified75.0%
if 4.39999999999999982e125 < y Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f642.0%
Simplified2.0%
flip--N/A
/-lowering-/.f64N/A
metadata-evalN/A
--lowering--.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f641.9%
Applied egg-rr1.9%
clear-numN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
--lowering--.f64N/A
*-lowering-*.f641.9%
Applied egg-rr1.9%
Taylor expanded in x around 0
mul-1-negN/A
unsub-negN/A
--lowering--.f6425.9%
Simplified25.9%
(FPCore (x y) :precision binary64 (if (<= x 2600.0) 1.0 (- 0.0 x)))
double code(double x, double y) {
double tmp;
if (x <= 2600.0) {
tmp = 1.0;
} else {
tmp = 0.0 - x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 2600.0d0) then
tmp = 1.0d0
else
tmp = 0.0d0 - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2600.0) {
tmp = 1.0;
} else {
tmp = 0.0 - x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2600.0: tmp = 1.0 else: tmp = 0.0 - x return tmp
function code(x, y) tmp = 0.0 if (x <= 2600.0) tmp = 1.0; else tmp = Float64(0.0 - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2600.0) tmp = 1.0; else tmp = 0.0 - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2600.0], 1.0, N[(0.0 - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2600:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;0 - x\\
\end{array}
\end{array}
if x < 2600Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f6466.4%
Simplified66.4%
Taylor expanded in x around 0
Simplified64.3%
if 2600 < x Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f6459.7%
Simplified59.7%
Taylor expanded in x around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6458.5%
Simplified58.5%
sub0-negN/A
neg-lowering-neg.f6458.5%
Applied egg-rr58.5%
Final simplification61.2%
(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
--lowering--.f6462.8%
Simplified62.8%
(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
--lowering--.f6462.8%
Simplified62.8%
Taylor expanded in x around 0
Simplified30.5%
herbie shell --seed 2024160
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, E"
:precision binary64
(+ (- 1.0 x) (* y (sqrt x))))