Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
i want to use % (mod ) operator for a variable of type double
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
sharadbags
New Member
Join Date:
Dec 2006
Posts:
14
#1
i want to use % (mod ) operator for a variable of type double
May 9 '07, 07:25 AM
it is giving an error
how do i get this operation done
JosAH
Recognized Expert
MVP
Join Date:
Mar 2007
Posts:
11453
#2
May 9 '07, 07:26 AM
There's a function for that: fmod(double x, double y).
kind regards,
Jos
Comment
Post
Cancel
bluesteel
New Member
Join Date:
Mar 2007
Posts:
84
#3
May 9 '07, 11:37 PM
Originally posted by
JosAH
There's a function for that: fmod(double x, double y).
kind regards,
Jos
And the library you have to include is math.h
Comment
Post
Cancel
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#4
May 9 '07, 11:37 PM
Mathematically speaking, the modulus operation applies only to integers.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment