diff --git a/src/addition.c b/src/addition.c index fd74c3e..e311e57 100644 --- a/src/addition.c +++ b/src/addition.c @@ -48,6 +48,12 @@ unsigned int exponent(unsigned int number) { return (number & exponent) >> 23; } +// adding two precision together with sum < 2^24 + +unsigned int addition_precision(unsigned int p1, unsigned int p2) { + return addition(p1, p2); +} + // writing number out of sign, exponent and precision unsigned int output(unsigned int sign, unsigned int exponent, unsigned int precision) { diff --git a/src/addition.h b/src/addition.h index 2d2878f..fcbf305 100644 --- a/src/addition.h +++ b/src/addition.h @@ -13,6 +13,8 @@ unsigned int precision(unsigned int number); unsigned int exponent(unsigned int number); +unsigned int addition_precision(unsigned int p1, unsigned int p2); + unsigned int output(unsigned int sign, unsigned int exponent, unsigned int precision); float addition_float(float number1, float number2);