Project

General

Profile

« Previous | Next » 

Revision 30849ea7

Added by David Sorber about 4 years ago

Initial version of integer division for the fixed point type.

View differences:

software/fixed/fixed_util.cc
int main(int argc, char** argv)
{
std::cout << "Fixed Type Test Util\n" << std::endl;
fixed_64_64 val;
fixed_64_64 val2;
val.parse("0.314159263538979");
std::cout << "[1] Val: " << val << std::endl;
val2 = val * 10;
std::cout << "[2] Val: " << val2 << std::endl;
val2 = val * 86;
std::cout << "[3] Val: " << val2 << std::endl;
#if 0
//-------------------------------------------------------------------------
fixed_64_64 foobar;
std::cout << "Type size: " << sizeof(fixed_64_64) << std::endl;
......
uint128_t u128Val = strtoull_128(strVal, nullptr, 0);
std::cout << "String value: " << strVal << std::endl;
std::cout << "Parsed value: " << u128Val << std::endl;
#endif
return 0;
}

Also available in: Unified diff