943,918 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2449
  • C RSS
Nov 1st, 2007
0

Matrix sorting and factorial

Expand Post »
i had a prob wen i had to sort each column of a matrix. the prob s wen i use larger values say 2453,23465 etc. the sorted matrix returned garbage values.. y s that? n how do i find factorial for 300 n bigger numbers?? i'm not able to store them as long int also..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Aarthi Gopal is offline Offline
1 posts
since Nov 2007
Nov 1st, 2007
0

Re: Matrix sorting and factorial

>wen i use larger values say 245323465 etc. the sorted matrix returned garbage values.. y s that?
Garbage values usually mean that you either didn't initialize the value in the first place, or you overflowed it through calculations. I'm guessing that you're seeing overflow errors that should be checked for if you're using built in data types, or removed by using an arbitrary length math library.

>n how do i find factorial for 300 n bigger numbers??
Use an arbitrary length math library or write one yourself. C arithmetic types have very hard (and sometimes painfully small) limits.

>i'm not able to store them as long int also..
How are you storing them now and what are your storage requirements?
Reputation Points: 44
Solved Threads: 8
Junior Poster in Training
Ptolemy is offline Offline
62 posts
since Oct 2007

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: IPC/socket beginner
Next Thread in C Forum Timeline: warning:Warning: assignment from incompatible pointer type





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


Follow us on Twitter


© 2011 DaniWeb® LLC