Question
Why doesn't fortran have intrinsic functions for something as simple as factorial?

Answers

Two reasons. Factorial isn't all that common in heavy duty scientific and engineering applications. When it does occur, it almost always in a context where it is more computationally efficient to generate it as you go. You need 2! first then 3!, then 4!, etc. You are basically stuck doing a factorial within the context of a do loop unless you get really good and learn to write "recursive functions", but then you are just fooling yourself and writing another form of do loop. When you are taking the factorial of a large number and don't need an exact answer you can resort to Stirling's Approximation. A Fortran statement that will load the value of this approximation into the variable nfact is.

nfact = sqrt(2*3.1415963*n)*(n/2.71828)**n   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What is the full form of BSE
  • Q What movie cast included James Garner, Richard Attenbourough, Steve McQueen, Charles Bronson, Donald Pleasance, James Coburn, Gordon Jackson, Angus McPhee among many others
  • Q How do u code the program for getting time base on different country timings?
  • Q Expand NBA
  • Q How can you decide the query performance is slow or fast?
  • Q Time period of Revolution for a Geo–stationary satellite is–
  • Q Have you used rollup component? describe how?
  • Q LRA 2002 requires people applying for registration to provide information about over riding interests, in order that they can be placed on the register... (A)True (B)False
  • Q How do you create staff assignments?
  • Q I have created a .net user control page (.ascx) but i cannot compile and run it.
  • Q In certain amino acids, which elements is found in addition to carbon, hydrogen, nitrogen and oxygen?