Matrix sorting and factorial

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2007
Posts: 1
Reputation: Aarthi Gopal is an unknown quantity at this point 
Solved Threads: 0
Aarthi Gopal's Avatar
Aarthi Gopal Aarthi Gopal is offline Offline
Newbie Poster

Matrix sorting and factorial

 
0
  #1
Nov 1st, 2007
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..
Aarthi
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 62
Reputation: Ptolemy is an unknown quantity at this point 
Solved Threads: 8
Ptolemy's Avatar
Ptolemy Ptolemy is offline Offline
Junior Poster in Training

Re: Matrix sorting and factorial

 
0
  #2
Nov 1st, 2007
>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?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1734 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC