Introduction
The factorial of n,
, is given by
![Rendered by QuickLaTeX.com \[n! = \begin{cases} n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1, & \text{if } n = 1, 2, 3, \ldots; \\ 1, & \text{if } n = 0. \end{cases}\]](https://kohar.ca/wp-content/ql-cache/quicklatex.com-56db6b74c562291026d56733bd653561_l3.png)
In Fortran, there is no intrinsic function for factorial, so we must write our own.
Richard Kohar — Adventures into Mathematics
You are currently browsing articles tagged Fortran.
The factorial of n,
, is given by
![Rendered by QuickLaTeX.com \[n! = \begin{cases} n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1, & \text{if } n = 1, 2, 3, \ldots; \\ 1, & \text{if } n = 0. \end{cases}\]](https://kohar.ca/wp-content/ql-cache/quicklatex.com-56db6b74c562291026d56733bd653561_l3.png)
In Fortran, there is no intrinsic function for factorial, so we must write our own.
Tags: Fortran
These notes were developed as I was learning how to program in Fortran 90. Matlab is a great scripting language; however, when you need to do a lot of numerical computations, nothing beats Fortran (or C).
Recent Comments