473,804 Members | 2,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculating Large Factorials

3 New Member
Hey everyone I just registered. Seems like a nice community and all the other sentimental BS :). So my problem in a nutshell is I wanna write a programme that calculates Large factorials (lets say 1000!) using linked lists(to store the numbers like 4 digits in each node). My problem is putting the result of such large factorials in Linked Lists so if you know how to give me an Idea about it pretty pretty thank you with a cherry on top. (If you don't have anything useful to say with all due respect keep your mouth shut.)
Jan 12 '08 #1
4 4273
sicarie
4,677 Recognized Expert Moderator Specialist
Wow, as incredibly pleasant as you are, and all that BS, did you try Googling this? There are several math libraries that you can include to store large numbers.

Like in this thread...
Jan 12 '08 #2
Voltem
3 New Member
Wow, as incredibly pleasant as you are, and all that BS, did you try Googling this? There are several math libraries that you can include to store large numbers.

Like in this thread...
Well I wanted to prevent the posts like yours that's why I said those precautionary things. Yes, I've tried googling the answer to My question not yours and haven't found anything useful. Did you even read my post? Did I tell you my problem is storing large numbers? or did I tell it is storing large numbers IN LINKED LISTS. Thank you very much as incredibly smart as you are.
Jan 19 '08 #3
sicarie
4,677 Recognized Expert Moderator Specialist
Well I wanted to prevent the posts like yours that's why I said those precautionary things. Yes, I've tried googling the answer to My question not yours and haven't found anything useful.
You wanted to stop people from posting useful links that related to your issue? Oh, sorry for trying to help, I guess you're good enough to be able to figure all this stuff out on your own... (not entirely sure why you're posting, then, but whatever)

Did you even read my post? Did I tell you my problem is storing large numbers? or did I tell it is storing large numbers IN LINKED LISTS. Thank you very much as incredibly smart as you are.
I did read your post. That's why I linked you to the thread with a link to a collection of mathematical libraries, including ones that will allow you to store large numbers (greater than those of an unsigned int).

And if you can't Google search "linked list c (or c++)," then I'm wasting my time anyway. So I'm done, best of luck figuring this out on your own.

Next time, it might be worth it to be nicer to the people offering help - and it might pay to read the things they post all the way through. (And to that end - the Guidelines for the site, which, had you read, would have made it clear that unless you had posted what you had tried, you would have gotten the standard answer I posted from any and every other person.)
Jan 19 '08 #4
send2aansari
7 New Member
Hey everyone I just registered. Seems like a nice community and all the other sentimental BS :). So my problem in a nutshell is I wanna write a programme that calculates Large factorials (lets say 1000!) using linked lists(to store the numbers like 4 digits in each node). My problem is putting the result of such large factorials in Linked Lists so if you know how to give me an Idea about it pretty pretty thank you with a cherry on top. (If you don't have anything useful to say with all due respect keep your mouth shut.)

For a big number you can find the factorial of big number by Sterling approximation formula.
n! ~ e^(-n)*n^n*Sqrt(2*P I*n)

Note: For very big number this approximation formula acuurate calculate as computer tolerate negligable.


If you wanna compute factorial by program then use this code
Expand|Select|Wrap|Line Numbers
  1. Code removed per posting guidelines
  2.  

Asadullah Ansari
Jan 22 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
8809
by: Ron Adam | last post by:
Hi, I'm having fun learning Python and want to say thanks to everyone here for a great programming language. Below is my first Python program (not my first program) and I'd apreciate any feedback on how I might do things differently to make it either more consice, readable, or faster. ie... are there better ways to do it in Python? It won't break any records for calculating pi, that wasn't my goal, learning Python was. But it might...
3
2220
by: julry | last post by:
I need to compute factorials, but I hit a limit around 170!. Is there anyway to handle numbers larger than the float data type can handle? Thanks.
2
2318
by: Tim Marshall | last post by:
Wondering if anyone has any suggestions for this. Sometimes in the form reports my users run, a data sheet subform on a main form, with totals in text boxes with calculated controlsources (=sum(whatever)), the records returned are large. By "large" I mean that there is a significant lag time before the totals get calculated and display. Lag time and what constitutes "large" varies with the user's PC hardware/configuration.
13
3541
by: bob | last post by:
If you were designing a class to represent very large integers in C++, what kind of internal representation would be best?
5
1991
by: skyline789 | last post by:
Hello guys! Just started learning java and kind of struggling my way through the code of factorials. Well, basically we were asked to write a code that displays the factorials of numbers from 1 to 20. The extra task is to skip between displaying even and odd numbers so it will start with 1! and skip 2! and show 3!,4! and skip 5! and so on. I`ve got the code that displays the odd numbers only. Would some 1 help me with this code plz? ...
10
3791
by: Lisa | last post by:
In translating the formula for calculating lottery odds for various conditions into a Visual Basic Program, I have apparently missed something in that I get errors in the part of the calculation where the number of ways of failure (pFal) is calculated Both errors happen in the code section x1 = Draw - MatchesReq x2 = Field - Selections For Counter = 1 To (Draw - MatchesReq - 1) x1 = x1 * (Draw - MatchesReq - Counter)
59
5825
by: Py-Fun | last post by:
I'm stuck trying to write a function that generates a factorial of a number using iteration and not recursion. Any simple ideas would be appreciated.
11
2882
by: ladan | last post by:
hi i have to write a c++ program that can calculate big factorials using a vector sized 17(for example c)and c can hold 8 digits i need help plz help me
4
2091
by: =?Utf-8?B?TmF2YW5lZXRoLksuTg==?= | last post by:
Say I have a class like, class Sample { public decimal first = 10; public decimal second = 20; } I have initialized it
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10089
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9171
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.