User defined floating point data type
Here, I am giving a user defined data-type class Double. this does not require any underlying floating point data-type as it works on the String data type /* hi, check this out. this program does not implement any underlying floating point data type. this program just only works on the basic datatypes int_64, char and string so it will avoid the different answers on different platform */ /* using string to store a double value */ //keeping significand and exponent in direct decimal format #include <string> #include <cstring> #include <sstream> #include <iostream> using namespace std; class Decimal { char sign; string significand; int64_t exponent; char ch; string str; public: void print() //check how to overload << { int64_t val=0; ...