unsigned div
parent
cbb747634a
commit
de5d363fe8
|
@ -1,7 +1,7 @@
|
|||
cmake_minimum_required(VERSION 3.5)
|
||||
include(cmake/color.cmake)
|
||||
|
||||
set(BLT_VERSION 0.16.1)
|
||||
set(BLT_VERSION 0.16.2)
|
||||
set(BLT_TEST_VERSION 0.0.1)
|
||||
|
||||
set(BLT_TARGET BLT)
|
||||
|
|
|
@ -62,15 +62,15 @@ namespace blt
|
|||
|
||||
BLT_ATTRIB_NO_INLINE friend fp64 operator*(fp64 left, fp64 right)
|
||||
{
|
||||
auto lhs = static_cast<__int128>(left.v);
|
||||
auto rhs = static_cast<__int128>(right.v);
|
||||
auto lhs = static_cast<unsigned __int128>(left.v);
|
||||
auto rhs = static_cast<unsigned __int128>(right.v);
|
||||
return fp64(static_cast<u64>((lhs * rhs) >> 32));
|
||||
}
|
||||
|
||||
BLT_ATTRIB_NO_INLINE friend fp64 operator/(fp64 left, fp64 right)
|
||||
{
|
||||
auto lhs = static_cast<__int128>(left.v);
|
||||
auto rhs = static_cast<__int128>(right.v);
|
||||
auto lhs = static_cast<unsigned __int128>(left.v);
|
||||
auto rhs = static_cast<unsigned __int128>(right.v);
|
||||
return fp64(static_cast<u64>((lhs / rhs) << 32));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue