I use mod operation to deal with big numbers (10^101) but the result is not correct....(I used fmod)
can someone help me?
Modulo Operation with big numbers
Moderator: Board moderators
rz,
as far as I know fmod takes double parameters - and I am pretty positive that numbers in the range of 10^101 are not really fitting in a double.... plus I believe that this problem wasn't designed to be solved by standard library fucntions. There are several problems on the acm site, which are related to big numbers, and they are all fairly easy, once you get the hold fo it - spend some time developing your bigNumber library, and just use them :) if you search this forum, i recall there was a _huge_ C++ library
as far as I know fmod takes double parameters - and I am pretty positive that numbers in the range of 10^101 are not really fitting in a double.... plus I believe that this problem wasn't designed to be solved by standard library fucntions. There are several problems on the acm site, which are related to big numbers, and they are all fairly easy, once you get the hold fo it - spend some time developing your bigNumber library, and just use them :) if you search this forum, i recall there was a _huge_ C++ library
Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
Success is also easy to handle: You've solved the wrong problem. Work hard to improve.
-
- Experienced poster
- Posts: 202
- Joined: Fri Mar 22, 2002 2:00 am
- Location: Chittagong. CSE - CUET
- Contact:
Yeap! Here is the link............ done by Suman...............isn't it Ok ???
http://acm.uva.es/board/viewtopic.php?t=1725
http://acm.uva.es/board/viewtopic.php?t=1725
