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

Recommended Answers

All 2 Replies

fmod() can be used with doubles. perhaps your compiler has an fmod that accepts long doubles too.

I'm using doubles for now (fmod is working nicely). Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.