| | |
Matrix sorting and factorial
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
>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?
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?
![]() |
Similar Threads
- matrix multiplication help.. (C)
- Sorting 2D Dynamic array of integers , Snake Style (C)
- Factorial? (C++)
- The Matrix & Philosophy (Geeks' Lounge)
- Enter the Matrix-not working (Windows NT / 2000 / XP)
- MATRIX REVOLUTIONS in the IMAX (Geeks' Lounge)
- re: Sorting Algorithms (C++)
- Microsoft Releases Web Matrix (ASP.NET)
Other Threads in the C Forum
- Previous Thread: IPC/socket beginner
- Next Thread: warning:Warning: assignment from incompatible pointer type
Views: 1734 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for C
* adobe api append array arrays bash binarysearch char character cm copyanyfile copypdffile createcopyoffile createprocess() csyntax directory drawing dynamic executable execv feet fgets file floatingpointvalidation fork frequency function getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux highest homework i/o ide infiniteloop initialization interest intmain() iso keyboard kilometer lazy license linked linkedlist linux list lowest matrix meter microsoft mqqueue multi mysql oddnumber odf open openwebfoundation overwrite pause pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scheduling segmentationfault send single socketprogramming spoonfeeding stack standard strchr string student suggestions system test testautomation unix urboc user whythiscodecausesegmentationfault win32 win32api windows.h





