| 1994 | // grade-school multiplication algorithm |
| 1995 | template <uint16_t size> |
| 1996 | bool large_mul(stackvec<size>& x, limb_span y) noexcept { |
| 1997 | if (y.len() == 1) { |
| 1998 | FASTFLOAT_TRY(small_mul(x, y[0])); |
| 1999 | } else { |
| 2000 | FASTFLOAT_TRY(long_mul(x, y)); |
| 2001 | } |
| 2002 | return true; |
| 2003 | } |
| 2004 | |
| 2005 | // big integer type. implements a small subset of big integer |
| 2006 | // arithmetic, using simple algorithms since asymptotically |