Click here to Skip to main content
15,118,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to call c# callback function from VC++ Pin
Richard MacCutchan29-Dec-15 1:57
mveRichard MacCutchan29-Dec-15 1:57 
QuestionRESET USB Pin
Member 1223302928-Dec-15 16:17
MemberMember 1223302928-Dec-15 16:17 
QuestionRe: RESET USB Pin
David Crow28-Dec-15 18:01
MemberDavid Crow28-Dec-15 18:01 
QuestionCollecting openions/suggestions for Masters Project (topic: Firewall Optimisation) Pin
SujithKG28-Dec-15 6:15
MemberSujithKG28-Dec-15 6:15 
SuggestionRe: Collecting openions/suggestions for Masters Project (topic: Firewall Optimisation) Pin
Richard MacCutchan28-Dec-15 8:36
mveRichard MacCutchan28-Dec-15 8:36 
Questionwhy this funny double is not a true zero? Pin
includeh1027-Dec-15 4:13
Memberincludeh1027-Dec-15 4:13 
AnswerRe: why this funny double is not a true zero? Pin
Richard Andrew x6427-Dec-15 7:17
professionalRichard Andrew x6427-Dec-15 7:17 
AnswerRe: why this funny double is not a true zero? Pin
CPallini28-Dec-15 11:46
mveCPallini28-Dec-15 11:46 
Just got a more consistent behaviour on Linux:
C++
#include <cstdio>
#include <cmath>

void out_double( double db )
{
  printf("%f\n", db);
}

int main()
{

  const double dbInf  = 1.0/::sin(0);   //infinite
  const double dbZero = (::fabs(::cos(3.14159/2))<0.9)?0:1; //line 1

  out_double( dbZero );
  out_double( dbZero * dbInf );
  out_double( 0 * dbInf );

}


outputs
0.000000
-nan
-nan


[update]
The same program, on Windows 8, compiled with Visual Studio 2012, produces
0.000000
-1.#IND00
-1.#IND00

[/update]

modified 28-Dec-15 16:54pm.

AnswerRe: why this funny double is not a true zero? Pin
emersony21-Jan-16 9:37
Memberemersony21-Jan-16 9:37 
QuestionDatabase creation on external HD Pin
Amr.Mohammad8724-Dec-15 21:16
MemberAmr.Mohammad8724-Dec-15 21:16 
AnswerRe: Database creation on external HD Pin
Richard MacCutchan24-Dec-15 22:08
mveRichard MacCutchan24-Dec-15 22:08 
GeneralRe: Database creation on external HD Pin
Amr.Mohammad8725-Dec-15 8:21
MemberAmr.Mohammad8725-Dec-15 8:21 
GeneralRe: Database creation on external HD Pin
David Crow26-Dec-15 6:26
MemberDavid Crow26-Dec-15 6:26 
GeneralHello!I'm a young programmer from China Pin
Mike Covariant Lee23-Dec-15 2:39
MemberMike Covariant Lee23-Dec-15 2:39 
GeneralRe: Hello!I'm a young programmer from China Pin
Mike Covariant Lee23-Dec-15 2:41
MemberMike Covariant Lee23-Dec-15 2:41 
GeneralRe: Hello!I'm a young programmer from China Pin
CPallini23-Dec-15 3:29
mveCPallini23-Dec-15 3:29 
GeneralRe: Hello!I'm a young programmer from China Pin
Mike Covariant Lee23-Dec-15 19:00
MemberMike Covariant Lee23-Dec-15 19:00 
GeneralRe: Hello!I'm a young programmer from China Pin
Arthur V. Ratz29-Dec-15 22:34
mvaArthur V. Ratz29-Dec-15 22:34 
GeneralRe: Hello!I'm a young programmer from China Pin
Kleine schnappi9-Jan-16 0:23
MemberKleine schnappi9-Jan-16 0:23 
Questionplease fix my generic function Pin
Member 1150578522-Dec-15 10:04
MemberMember 1150578522-Dec-15 10:04 
AnswerRe: please fix my generic function Pin
Richard Andrew x6422-Dec-15 11:15
professionalRichard Andrew x6422-Dec-15 11:15 
GeneralRe: please fix my generic function Pin
Member 1150578522-Dec-15 22:29
MemberMember 1150578522-Dec-15 22:29 
AnswerRe: please fix my generic function Pin
k505422-Dec-15 11:17
mvek505422-Dec-15 11:17 
GeneralRe: please fix my generic function Pin
Member 1150578522-Dec-15 22:28
MemberMember 1150578522-Dec-15 22:28 
QuestionWhy CButton-derived class with BS_GROUPBOX style doesn't get messages? Pin
Yaumen19-Dec-15 21:45
MemberYaumen19-Dec-15 21:45 

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.