Fedora Linux Support Community & Resources Center
Prev Previous Post   Next Post Next
  #1  
Old 8th February 2012, 12:37 AM
dave539 Offline
Registered User
 
Join Date: Jun 2011
Posts: 30
windows_xp_2003opera
Unhappy wierd output of fprintf for double variable

I don't do too much programming any more. However, I just got bit by something 'interesting'. I am caculating some percentages for names in an array. It works great IF what I am calculating the percentage for has some value other than 0. On the other hand, if the percentage should be zero what I get is -nan % instead of 0.0 %. I have tried this a couple of different outpout specs including 5.1F, D, and others.

I need a clue (yes that does mean I'm clueless). Does -nan stand for anything?

Thanks.
Reply With Quote
 

Tags
double, fprintf, output, variable, wierd

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"shared class variable" vs "class instance variable" recondite Programming & Packaging 5 23rd August 2010 12:48 AM
Command display output on console and simultaneously save the command and its output satimis Linux Chat 10 1st August 2008 03:02 AM
It is Wierd bokken Using Fedora 91 29th October 2007 04:52 PM
output a file to ternimal but keep the output updated Saint Mike Using Fedora 2 30th December 2006 11:22 AM
SiS 630 and wierd 3D fish Hardware & Laptops 3 2nd December 2003 11:56 AM


Current GMT-time: 14:27 (Thursday, 02-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat