944,150 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 1305
  • C RSS
Oct 5th, 2005
0

modululs equivalent for large numbers?

Expand Post »
Hi,

I have a program that needs to perform billions of loops. I want to print out something to the screen for every certain number of iterations (ie let's say 1 million). Because % is only suposed to work for integers, how do I get the equivalent functionality with long double?

Thanks,
Winbatch
Similar Threads
Reputation Points: 68
Solved Threads: 18
Posting Pro in Training
winbatch is offline Offline
466 posts
since Feb 2005
Oct 5th, 2005
0

Re: modululs equivalent for large numbers?

fmod() can be used with doubles. perhaps your compiler has an fmod that accepts long doubles too.
Reputation Points: 19
Solved Threads: 5
Junior Poster
Stoned_coder is offline Offline
164 posts
since Jul 2005
Oct 5th, 2005
0

Re: modululs equivalent for large numbers?

I'm using doubles for now (fmod is working nicely). Thanks.
Reputation Points: 68
Solved Threads: 18
Posting Pro in Training
winbatch is offline Offline
466 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: RC4 project
Next Thread in C Forum Timeline: copying unknown string lenghts





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC