I don't understand at all how you tell the computer to evaluate a complicated factorial expression such as the one given in in the infinite sum of binomial theorem as(adsbygoogle = window.adsbygoogle || []).push({});

Ʃ [n! / k!(n-k)! ] * x^k

where n is the final value of the sum and k is where you are in the loop.

It's supposed to be

INTEGER :: k, n

REAL :: sum, fact, x

ASK INPUT (what are x and n?)

DO k = 0,n

sum = sum + fact*x**k

fact = fact * (n-k)/(k+1)

END DO

Is there a procedure to figure out what the term multiplied by the fact variable should be?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fortran Factorials

Loading...

Similar Threads - Fortran Factorials | Date |
---|---|

How to buy Fortran Programming Software Commersial License | Jan 30, 2018 |

Fortran for Computational Fluid Dynamics Problems | Jan 11, 2018 |

Porting Python Code to Fortran for Parallel Computing | Dec 15, 2017 |

Factorial fortran 90 | May 29, 2015 |

**Physics Forums - The Fusion of Science and Community**