Fedora Linux Support Community & Resources Center
Prev Previous Post   Next Post Next
Old 8th February 2012, 01:37 AM
dave539 Offline
Registered User
Join Date: Jun 2011
Posts: 30
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?

Reply With Quote

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 12:22 PM
SiS 630 and wierd 3D fish Hardware & Laptops 3 2nd December 2003 12:56 PM

Current GMT-time: 03:22 (Friday, 18-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

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