Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
Math code snippet to divide two sets of product terms. For example: for sets n and d, where n = {1,2,3,4} and d = {1,2,3}, DivideTerms returns (1*2*3*4)/(1*2*3)=4. This can be used to divide two factorials.
#include <vector> |
#include <functional> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.