Go to Post Unless your HS students have earned BSEE and BSME degreees already, how can they lead or run an engineering team? - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 11-02-2011, 09:17
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Testing for infinity

Hi,

I would like to test if the value returned in a double is infinity. I tried comparing if the bytes of the double were equal to 0x7F00000000000000 and I tried if(atof("infinity") == doubleVal) but the first always returned false and the second always returned true. I see a function infinity( ) in mathALib that looked like it might be helpful but I'm not sure how to include that lib. I can compile using that function but get a link error once on the cRIO. So really two questions here:

1. How to link with a lib like mathALib?
2. A nice way to check for infinity (and maybe NaN while your at it)?

Thanks!
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:33.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi