Skip to content

Commit

Permalink
WIP #1034 NSum, NExpectation NProbability
Browse files Browse the repository at this point in the history
- use interfaces `IDiscreteDistribution, IContinuousDistribution`
- defined keyword `NProduct`
  • Loading branch information
axkr committed Aug 3, 2024
1 parent 568bab0 commit 5528f54
Show file tree
Hide file tree
Showing 14 changed files with 1,753 additions and 1,169 deletions.
24 changes: 24 additions & 0 deletions symja_android_library/doc/functions/NSum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## NSum

```
NSum(expr, {i, imin, imax})
```

> evaluates the numerical approximated sum of `expr` with `i` ranging from `imin` to `imax`.
```
NSum(expr, {i, imin, imax, di})
```

> `i` ranges from `imin` to `imax` in steps `di`
See
* [Wikipedia - Summation](https://en.wikipedia.org/wiki/Summation)
* [Wikipedia - Convergence_tests](https://en.wikipedia.org/wiki/Convergence_tests)

### Examples

```
>> Num(k, {k, 1, 10})
55
```
1 change: 1 addition & 0 deletions symja_android_library/doc/functions/Sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Sum(expr, {i, imin, imax}, {j, jmin, jmax}, ...)
See
* [Wikipedia - Summation](https://en.wikipedia.org/wiki/Summation)
* [Wikipedia - Faulhaber's formula](https://en.wikipedia.org/wiki/Faulhaber%27s_formula)

### Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ private static void init() {
S.NonCommutativeMultiply
.setEvaluator(new org.matheclipse.core.reflection.system.NonCommutativeMultiply());
S.NSolve.setEvaluator(new org.matheclipse.core.reflection.system.NSolve());
S.NSum.setEvaluator(new org.matheclipse.core.reflection.system.NSum());
S.NumberLinePlot.setEvaluator(new org.matheclipse.core.reflection.system.NumberLinePlot());

S.Out.setEvaluator(new org.matheclipse.core.reflection.system.Out());
Expand Down
Loading

0 comments on commit 5528f54

Please sign in to comment.