|
|
@ -77,7 +77,7 @@ unsigned int addition_precision_float(unsigned int p1, unsigned int p2) { |
|
|
|
return addition_uint(p1, p2); |
|
|
|
} |
|
|
|
|
|
|
|
// writing number out of sign, exponent and precision |
|
|
|
// writing floating number out of sign, exponent and precision |
|
|
|
|
|
|
|
unsigned int output_float(unsigned int sign, unsigned int exponent, unsigned int precision) { |
|
|
|
return (sign << 31) | (exponent << 23) | precision; |
|
|
@ -130,3 +130,9 @@ unsigned long long exponent_double(unsigned long long number) { |
|
|
|
unsigned long long exponent = 0x7ff0000000000000; |
|
|
|
return (number & exponent) >> 52; |
|
|
|
} |
|
|
|
|
|
|
|
// writing double number out of sign, exponent and precision |
|
|
|
|
|
|
|
unsigned long long output_double(unsigned long long sign, unsigned long long exponent, unsigned long long precision) { |
|
|
|
return (sign << 63) | (exponent << 52) | precision; |
|
|
|
} |