From 0e451a2eb6b57ac1d1e4be50501f00531b24748b Mon Sep 17 00:00:00 2001 From: anazaz Date: Tue, 29 Sep 2026 10:06:41 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20lab2/README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lab2/README.md | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/lab2/README.md b/lab2/README.md index db0b709..b496fa0 100644 --- a/lab2/README.md +++ b/lab2/README.md @@ -10,35 +10,3 @@ # Ход работы: -*Задание 1* -Основнвой код: -```C -#include -#include -#include - -union FloatCvrt{ - uint32_t raw_bits; - float value; -}; - -float makeFloat(uint32_t sign, uint8_t exp, uint32_t mantissa){ - union FloatCvrt converter; - - converter.raw_bits = ((sign & 0x1) << 31) | (((uint32_t)exp & 0xFF) << 23) | (mantissa & 0x7FFFFF); - - return converter.value; -}; - - -int main(){ - float f1 = makeFloat(0,127,0); - printf("Custom 1.0f = %f\n", f1); - - float f2 = makeFloat(1,128,0x200000); - printf("Custom -2.5f = %f\n", f2); - - return 0; -}; - -``` \ No newline at end of file