User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 456,580 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,582 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 891 | Replies: 1
Reply
Join Date: Nov 2007
Posts: 1
Reputation: Aarthi Gopal is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Aarthi Gopal's Avatar
Aarthi Gopal Aarthi Gopal is offline Offline
Newbie Poster

Question Matrix sorting and factorial

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 62
Reputation: Ptolemy is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 8
Ptolemy's Avatar
Ptolemy Ptolemy is offline Offline
Junior Poster in Training

Re: Matrix sorting and factorial

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C Forum

All times are GMT -4. The time now is 6:23 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC