Click here to Skip to main content
15,905,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Model - Modeless dialog problem Pin
softwaremonkey9-Apr-09 2:36
softwaremonkey9-Apr-09 2:36 
GeneralRe: Model - Modeless dialog problem Pin
ashtwin9-Apr-09 3:05
ashtwin9-Apr-09 3:05 
QuestionPrint Event Pin
Green Fuze9-Apr-09 0:45
Green Fuze9-Apr-09 0:45 
QuestionRe: Print Event Pin
Iain Clarke, Warrior Programmer9-Apr-09 1:42
Iain Clarke, Warrior Programmer9-Apr-09 1:42 
AnswerRe: Print Event Pin
Green Fuze9-Apr-09 2:01
Green Fuze9-Apr-09 2:01 
GeneralRe: Print Event Pin
Iain Clarke, Warrior Programmer9-Apr-09 2:40
Iain Clarke, Warrior Programmer9-Apr-09 2:40 
GeneralRe: Print Event Pin
Green Fuze9-Apr-09 3:26
Green Fuze9-Apr-09 3:26 
QuestionCLR Linking takes long time Pin
KASR19-Apr-09 0:23
KASR19-Apr-09 0:23 
AnswerRe: CLR Linking takes long time Pin
Rajesh R Subramanian9-Apr-09 0:48
professionalRajesh R Subramanian9-Apr-09 0:48 
GeneralRe: CLR Linking takes long time Pin
CPallini9-Apr-09 5:27
mveCPallini9-Apr-09 5:27 
QuestionWhy the copy construct of GraphicsPath is protected? Pin
followait9-Apr-09 0:18
followait9-Apr-09 0:18 
AnswerRe: Why the copy construct of GraphicsPath is protected? Pin
Iain Clarke, Warrior Programmer9-Apr-09 1:45
Iain Clarke, Warrior Programmer9-Apr-09 1:45 
Questioncompression/Zip problem Pin
chandrakar ashish9-Apr-09 0:01
chandrakar ashish9-Apr-09 0:01 
AnswerRe: compression/Zip problem Pin
Hamid_RT9-Apr-09 0:05
Hamid_RT9-Apr-09 0:05 
GeneralRe: compression/Zip problem Pin
chandrakar ashish9-Apr-09 1:23
chandrakar ashish9-Apr-09 1:23 
GeneralRe: compression/Zip problem Pin
Rajesh R Subramanian9-Apr-09 1:31
professionalRajesh R Subramanian9-Apr-09 1:31 
GeneralRe: compression/Zip problem Pin
chandrakar ashish9-Apr-09 1:39
chandrakar ashish9-Apr-09 1:39 
AnswerRe: compression/Zip problem Pin
Rajesh R Subramanian9-Apr-09 0:44
professionalRajesh R Subramanian9-Apr-09 0:44 
AnswerRe: compression/Zip problem Pin
Divyang Mithaiwala9-Apr-09 0:54
Divyang Mithaiwala9-Apr-09 0:54 
Questionpointer casting Pin
Jorge8-Apr-09 23:48
Jorge8-Apr-09 23:48 
QuestionRe: pointer casting Pin
CPallini8-Apr-09 23:55
mveCPallini8-Apr-09 23:55 
AnswerRe: pointer casting Pin
Jorge9-Apr-09 0:07
Jorge9-Apr-09 0:07 
GeneralRe: pointer casting Pin
CPallini9-Apr-09 0:45
mveCPallini9-Apr-09 0:45 
The code is working fine, anyway it is not performing a conversion, it is interpreting the raw bits as a double.
You have the following string of bits (only the first two ints of the array matters):

                                 1                                   2
00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000010


as a double it is
 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000010
 ^
 0 as sign (first bit on the left), i.e. positive number

 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000010
  ^---------^ 
       0 as exponent with in excess -1023 representation represents denormals when fraction is <> 0
       (as in your case).
 
 00000000 00000000 00000000 00000001 00000000 00000000 00000000 00000010
             ^---------------------------------------------------------^
        2^-20 + 2^-51 = 9,5367431685033920985006261616945e-7 as fraction

That gives, for a denormalized number


  fraction * 2^-1021 = 4,2439915839068072135877506064327e-314


Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: pointer casting Pin
Rajesh R Subramanian9-Apr-09 1:19
professionalRajesh R Subramanian9-Apr-09 1:19 
GeneralRe: pointer casting Pin
CPallini9-Apr-09 1:55
mveCPallini9-Apr-09 1:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.