Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 25th, 2006, 05:45 AM
Nialsh
Guest
 
Posts: n/a
Default How do I detect infinite floats?

I know division by zero is valid in floating point and stores with a
special infinity value but is there a standard constant to cover
testing that or am I supposed to make my own each time?

Thanks
Neal

  #2  
Old January 25th, 2006, 09:05 AM
owillebo
Guest
 
Posts: n/a
Default Re: How do I detect infinite floats?

http://www.gnu.org/software/libc/man...y-and-NaN.html

  #3  
Old January 25th, 2006, 05:15 PM
red floyd
Guest
 
Posts: n/a
Default Re: How do I detect infinite floats?

owillebo wrote:[color=blue]
> http://www.gnu.org/software/libc/man...y-and-NaN.html
>[/color]

check std::numeric_limits<> as well. Doesn't have "is{infinity,nan,...}
but does have methods that return the values for them.
  #4  
Old January 31st, 2006, 11:25 AM
Richard Herring
Guest
 
Posts: n/a
Default Re: How do I detect infinite floats?

In message <5eOBf.35163$dW3.28122@newssvr21.news.prodigy.com> , red floyd
<no.spam@here.dude> writes[color=blue]
>owillebo wrote:[color=green]
>> http://www.gnu.org/software/libc/man...y-and-NaN.html
>>[/color]
>
>check std::numeric_limits<> as well. Doesn't have
>"is{infinity,nan,...} but does have methods that return the values for
>them.[/color]

But don't forget that comparison with NaN may not have the result you
expect ;-)

--
Richard Herring
 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles