🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.programming
1 messages
1 total messages Started by Ryszard Cichy Mon, 27 May 1996 00:00
IEEE floating point
#777
Author: Ryszard Cichy
Date: Mon, 27 May 1996 00:00
16 lines
1001 bytes
Hej, purysci-programisci.
Wyczytalem, ze jesli we floacie (single) bity 23-31 (potega 2) sa 
ustawione na 1 to taki float jest traktowany jako +NAN. Bardzo mi 
sie to podoba i uzywam do przechowywania danych pomiarowych:
float to float, a jak sie nie dalo zmierzyc lub w ogole nie bylo 
pomiaru ustawiam w pamieci 0x7F800000 + przyczyna bledu.
Dokladnie robie cos takiego:
class num { 
            union { float x;unsigned U[2];
                  };
            i tu same funkcje..
          };
I tak bede tak robil, ale moze ktos mi powie na ile to jest 
legalne, a na ile jest to wstretna sztuczka.
Rysiek.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads