Factorial methods are often written recursively just to show off. Iterative coding with a pedestrian for loop is much faster. Mathematicians like to use a powerful theorem proving technique called induction that works much like recursion, so they are enamoured of it and tend to recursion in Java where it is not warranted.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.62] | The information on this page is for non-military use only. | ||
| You are visitor number 16,704. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/jgloss/factorial.html | J:\mindprod\jgloss\factorial.html | ||