From 29d0070ef3174db2691175e57a5163d647e66ff2 Mon Sep 17 00:00:00 2001 From: Dennis Sperzel Date: Mon, 5 Feb 2024 11:46:43 +0100 Subject: [PATCH] addition read precision of a floating number --- src/addition.c | 5 +++++ src/addition.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/addition.c b/src/addition.c index ca1d9ed..afa0ea4 100644 --- a/src/addition.c +++ b/src/addition.c @@ -28,6 +28,11 @@ unsigned int s(unsigned int a) { return a >> 31; } +unsigned int m(unsigned int a) { + unsigned int num = 8388607; + return (a & num); +} + float addition_float(float a, float b) { return 0.0; } \ No newline at end of file diff --git a/src/addition.h b/src/addition.h index 80ede14..66497e0 100644 --- a/src/addition.h +++ b/src/addition.h @@ -9,6 +9,8 @@ unsigned int addition(num a, num b); unsigned int s(unsigned int a); +unsigned int m(unsigned int a); + float addition_float(float a, float b); #endif // ADDITION_H