AngouriMath
MultiplyAll(System.Collections.Generic.IEnumerable{AngouriMath.Entity})
Method (no overloads)
Summary
Multiplies all the given terms and returns the resulting expression
new Entity[]{ 1, 2, 3 }.MultiplyAll() -> "1 * 2 * 3"
new Entity[]{ 1, 2, 3 }.MultiplyAll() -> "1 * 2 * 3"
Example
var factorial = Enumerable.Range(1, 5).Select(i => (Entity)i).MultiplyAll();
Console.WriteLine(factorial);
Console.WriteLine(factorial.EvalNumerical());Prints
1 * 2 * 3 * 4 * 5
120Remarks
The empty product is 1 , for the reason the empty sum is 0 — see
SumAll(System.Collections.Generic.IEnumerable{AngouriMath.Entity}).
SumAll(System.Collections.Generic.IEnumerable{AngouriMath.Entity}).
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online