diff --git a/src/addition.c b/src/addition.c index 0b864a9..d43de60 100644 --- a/src/addition.c +++ b/src/addition.c @@ -114,4 +114,9 @@ float addition_float(float number1, float number2) { unsigned long sign_double(unsigned long a) { if (a & 0x8000000000000000 == 0x8000000000000000) return 1; else return 0; +} + +unsigned long precision_double(unsigned long a) { + a &= 0x000fffffffffffff; + return a; } \ No newline at end of file diff --git a/src/addition.h b/src/addition.h index 89a0297..c770bd8 100644 --- a/src/addition.h +++ b/src/addition.h @@ -25,4 +25,6 @@ float addition_float(float number1, float number2); unsigned long sign_double(unsigned long a); +unsigned long precision_double(unsigned long a); + #endif // ADDITION_H \ No newline at end of file