@@ -294,7 +294,7 @@ constexpr type_t half_hi(const long_uint_t<type_t, 2>& value) noexcept;
294294// make unsigned integer from low and high
295295
296296template <typename type_t , uint_t size>
297- constexpr long_uint_t <type_t , size> half_make (const long_uint_t <type_t , size / 2 >& high, const long_uint_t <type_t , size / 2 >& low) noexcept ;
297+ constexpr long_uint_t <type_t , size * 2 > half_make (const long_uint_t <type_t , size>& high, const long_uint_t <type_t , size>& low) noexcept ;
298298template <typename type_t >
299299constexpr long_uint_t <type_t , 2 > half_make (const type_t & high, const type_t & low) noexcept ;
300300
@@ -402,15 +402,15 @@ constexpr type_t half_hi(const long_uint_t<type_t, 2>& value) noexcept
402402
403403// //////////////////////////////////////////////////////////////////////////////////////////////////
404404template <typename type_t , uint_t size>
405- constexpr long_uint_t <type_t , size> half_make (const long_uint_t <type_t , size / 2 >& value_hi, const long_uint_t <type_t , size / 2 >& value_lo) noexcept
405+ constexpr long_uint_t <type_t , size * 2 > half_make (const long_uint_t <type_t , size>& value_hi, const long_uint_t <type_t , size>& value_lo) noexcept
406406{
407- constexpr uint_t half_size = size / 2 ;
408- long_uint_t <type_t , half_size > result;
407+ constexpr uint_t double_size = size * 2 ;
408+ long_uint_t <type_t , double_size > result;
409409
410- for (uint_t n = 0 ; n < half_size ; n++)
410+ for (uint_t n = 0 ; n < size ; n++)
411411 result.digits [n] = value_lo.digits [n];
412- for (uint_t n = half_size ; n < size ; n++)
413- result.digits [n] = value_hi.digits [n - half_size ];
412+ for (uint_t n = size ; n < double_size ; n++)
413+ result.digits [n] = value_hi.digits [n - size ];
414414
415415 return result;
416416}
0 commit comments