|
@ -111,11 +111,22 @@ float addition_float(float number1, float number2) { |
|
|
return num3.number.floating; |
|
|
return num3.number.floating; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// reading sign out of an integer (double number) |
|
|
|
|
|
|
|
|
unsigned long long sign_double(unsigned long long a) { |
|
|
unsigned long long sign_double(unsigned long long a) { |
|
|
if (a & 0x8000000000000000) return 1; |
|
|
if (a & 0x8000000000000000) return 1; |
|
|
else return 0; |
|
|
else return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// reading precision out of an integer (double number) |
|
|
|
|
|
|
|
|
unsigned long long precision_double(unsigned long long a) { |
|
|
unsigned long long precision_double(unsigned long long a) { |
|
|
return a & 0x000fffffffffffff; |
|
|
return a & 0x000fffffffffffff; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// reading exponent out of an integer (double number) |
|
|
|
|
|
|
|
|
|
|
|
unsigned long long exponent_double(unsigned long long number) { |
|
|
|
|
|
unsigned long long exponent = 0x7ff0000000000000; |
|
|
|
|
|
return (number & exponent) >> 52; |
|
|
} |
|
|
} |