Results 1 to 7 of 7

Thread: -

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Eclipse Plugin Developer aphex's Avatar
    Join Date: Mar:2003
    Location: Karlsruhe
    Posts: 546

    Post -

    -1,4*10^-45 32 IEEE 754 ?

    , , . !

  2. #2
    Registered User
    Join Date: Oct:2003
    Location:
    Posts: 4,317
    , .
    , " ".
    , , , Google "c float range" ( ), :
    http://en.wikipedia.org/wiki/IEEE_754 ( )

    http://en.wikipedia.org/wiki/Floating_point ( ).

  3. #3
    Eclipse Plugin Developer aphex's Avatar
    Join Date: Mar:2003
    Location: Karlsruhe
    Posts: 546
    , . . , .

    . .

  4. #4
    Wall-e delian's Avatar
    Join Date: May:2003
    Location: ::1
    Posts: 4,723
    " "

  5. #5
    Banned haste's Avatar
    Join Date: Mar:2006
    Location:
    Posts: 759
    . .
    , .

    - !

  6. #6
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    IEEE 754, C:
    Code:
    int i;
    unsigned char c[sizeof(float)];
    
    *(float *)c = -1.4e-45; //  (float)M_PI
    printf("0x");
    for (i = sizeof(float)-1; i >= 0; i--) printf("%02X", c[i]);
    printf("\n");
    , 1 ( ), 8 ( ) 23 () :

    -1.4e-45: 0x80000001 = 1 00000000 00000000000000000000001
    : 0x40490FDB = 0 10000000 10010010000111111011011

    , . , 2 - , . = 3.141592653589... : 3 = 2 + 1 = 11(2). :
    2*0.14159265358979311 = 0 + 0.28318530717958623
    2*0.28318530717958623 = 0 + 0.56637061435917246
    2*0.56637061435917246 = 1 + 0.13274122871834492
    2*0.13274122871834492 = 0 + 0.26548245743668985
    2*0.26548245743668985 = 0 + 0.53096491487337971
    2*0.53096491487337971 = 1 + 0.06192982974675942
    2*0.06192982974675942 = 0 + 0.12385965949351884
    2*0.12385965949351884 = 0 + 0.24771931898703769
    2*0.24771931898703769 = 0 + 0.49543863797407539
    2*0.49543863797407539 = 0 + 0.99087727594815078
    2*0.99087727594815078 = 1 + 0.98175455189630156
    2*0.98175455189630156 = 1 + 0.96350910379260312
    2*0.96350910379260312 = 1 + 0.92701820758520625
    2*0.92701820758520625 = 1 + 0.85403641517041251
    2*0.85403641517041251 = 1 + 0.70807283034082502
    2*0.70807283034082502 = 1 + 0.41614566068165004
    2*0.41614566068165004 = 0 + 0.83229132136330008
    2*0.83229132136330008 = 1 + 0.66458264272660017
    2*0.66458264272660017 = 1 + 0.32916528545320034
    2*0.32916528545320034 = 0 + 0.65833057090640068
    2*0.65833057090640068 = 1 + 0.31666114181280136
    2*0.31666114181280136 = 0 + 0.63332228362560272
    2*0.63332228362560272 = 1 + 0.26664456725120544
    ...
    T.e.
    = 11.00100100001111110110101...(2)
    , .. , - 2 - 1, . :
    = 1.100100100001111110110101...(2) * 2^1

    , [1,2) ( ), - 1, . 23 , :
    0.100100100001111110110101...(2) ~= 0.10010010000111111011011(2)

    2^1 , 1 127 ( 32- IEEE 754). , . :
    1 + 127 = 128 = 10000000(2)

    , - 0 ( , 1). :
    : 0(2)
    : 10000000(2)
    : 10010010000111111011011(2)

    :
    pi = 01000000010010010000111111011011(2) = 40490FDB(16) - , C. !
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  7. #7
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    icaci,

    "" FP ... , source code- Quake 2- "Carmack's inverse" ( )...
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |