Skip to content

Commit

Permalink
Improve markdown docs
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Dec 19, 2023
1 parent cf9ffad commit 8197711
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 7 deletions.
8 changes: 8 additions & 0 deletions symja_android_library/doc/02-symbols-and-assignments.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
Symbols need not be declared in Symja, they can just be entered and remain variable
(Only the symbols which consists of exactly one character are case sensitive.
For all other identifiers the input parser doesn't distinguish between lower and upper case characters):

```
>> x
x
```

Basic simplifications are performed:

```
>> x + 2 * x
3*x
```

Symbols can have any name that consists of characters and digits:

```
>> iAm1Symbol ^ 2
iam1symbol^2
```

You can assign values to symbols:

```
>> a = 2
2
Expand All @@ -36,16 +40,19 @@ You can assign values to symbols:
```

Assigning a value returns that value. If you want to suppress the output of any result, add a `;` to the end of your query:

```
>> a = 4;
```

Values can be copied from one variable to another:

```
>> b = a;
```

Now changing a does not affect b:

```
>> a = 3;
Expand All @@ -55,6 +62,7 @@ Now changing a does not affect b:

Such a dependency can be achieved by using “delayed assignment” with the `:=` operator
(which does not return anything, as the right side is not even evaluated):

```
>> b := a ^ 2
Expand Down
2 changes: 2 additions & 0 deletions symja_android_library/doc/05-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ b
```

Lists can be nested:

```
>> mymatrix = {{1, 2}, {3, 4}, {5, 6}};
```
Expand Down Expand Up @@ -81,6 +82,7 @@ d
```

Lists can be used to assign values to multiple variables at once:

```
>> {a, b} = {1, 2};
Expand Down
2 changes: 2 additions & 0 deletions symja_android_library/doc/08-control-statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ c

Compound statements can be entered with `;`.
The result of a compound expression is its last part or `Null` if it ends with a `;`.

```
>> 1; 2; 3
3
Expand All @@ -68,6 +69,7 @@ The result of a compound expression is its last part or `Null` if it ends with a
```

Inside For, While, and Do loops, Break() exits the loop and Continue() continues to the next iteration.

```
>> For(i = 1, i <= 5, i++, If(i == 4, Break()); Print(i))
1
Expand Down
4 changes: 3 additions & 1 deletion symja_android_library/doc/99-function-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ Functions in alphabetical order:
* &#x2705; [Exp](functions/Exp.md)
* &#x2705; [Expand](functions/Expand.md)
* &#x2705; [ExpandAll](functions/ExpandAll.md)
* [ExpandDenominator](functions/ExpandDenominator.md)
* [ExpandNumerator](functions/ExpandNumerator.md)
* &#x2705; [Expectation](functions/Expectation.md)
* &#x2705; [ExpIntegralE](functions/ExpIntegralE.md)
* &#x2705; [ExpIntegralEi](functions/ExpIntegralEi.md)
Expand Down Expand Up @@ -876,7 +878,7 @@ Functions in alphabetical order:
* &#x2705; [Sow](functions/Sow.md)
* [Span](functions/Span.md)
* &#x2705; [SparseArray](functions/SparseArray.md)
* [SparseArrayQ](functions/SparseArrayQ.md)
* &#x2705; [SparseArrayQ](functions/SparseArrayQ.md)
* &#x2705; [Sphere](functions/Sphere.md)
* &#x1F9EA; [SphericalBesselJ](functions/SphericalBesselJ.md)
* &#x1F9EA; [SphericalBesselY](functions/SphericalBesselY.md)
Expand Down
2 changes: 1 addition & 1 deletion symja_android_library/doc/functions/EulerGamma.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See
```

### Related terms
[E](E.md), [Pi](Pi.md)
[E](E.md), [Glaisher](Glaisher.md), [Khinchin](Khinchin.md), [Pi](Pi.md)



Expand Down
6 changes: 6 additions & 0 deletions symja_android_library/doc/functions/Range.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Range(a, b)

> returns a list of integers from `a` to `b`.
```
Range[a, b, di]
```

> returns a list of values from `a` to `b` using step $di$. More specifically, 'Range' starts from `a` and successively adds increments of `di` until the result is greater `(if di > 0)` or less `(if di < 0)` than `b`.
### Examples

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ If you type `SIN(x)` or `sin(x)`, Symja assumes you always mean the same built-i

Symja provides many common mathematical functions and constants.

For example `[Log](functions/Log.md)` calculates the natural logarithm for base `[E](functions/E.md)`. `[Log2](functions/Log2.md)` and `[Log10](functions/Log10.md)` are variants for logarithm to the bases `2` and `10`.
For example [Log](functions/Log.md) calculates the natural logarithm for base [E](functions/E.md). [Log2](functions/Log2.md) and [Log10](functions/Log10.md) are variants for logarithm to the bases `2` and `10`.

```
>> Log(E)
Expand All @@ -104,7 +104,7 @@ Of course, Symja has complex numbers and uses the equation:

$$\sqrt{-1}=I$$

In Symja the imaginary unit is represented by the uppercase letter `[I](functions/I.md)`:
In Symja the imaginary unit is represented by the uppercase letter [I](functions/I.md):

```
>> Sqrt(-4)
Expand All @@ -123,7 +123,7 @@ In Symja the imaginary unit is represented by the uppercase letter `[I](function
0.195577+I*0.842966
```

`[Abs](functions/Abs.md)` calculates absolute values for complex numbers:
[Abs](functions/Abs.md) calculates absolute values for complex numbers:

```
>> Abs(-3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
Symbols need not be declared in Symja, they can just be entered and remain variable
(Only the symbols which consists of exactly one character are case sensitive.
For all other identifiers the input parser doesn't distinguish between lower and upper case characters):

```
>> x
x
```

Basic simplifications are performed:

```
>> x + 2 * x
3*x
```

Symbols can have any name that consists of characters and digits:

```
>> iAm1Symbol ^ 2
iam1symbol^2
```

You can assign values to symbols:

```
>> a = 2
2
Expand All @@ -36,16 +40,19 @@ You can assign values to symbols:
```

Assigning a value returns that value. If you want to suppress the output of any result, add a `;` to the end of your query:

```
>> a = 4;
```

Values can be copied from one variable to another:

```
>> b = a;
```

Now changing a does not affect b:

```
>> a = 3;
Expand All @@ -55,6 +62,7 @@ Now changing a does not affect b:

Such a dependency can be achieved by using “delayed assignment” with the `:=` operator
(which does not return anything, as the right side is not even evaluated):

```
>> b := a ^ 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ b
```

Lists can be nested:

```
>> mymatrix = {{1, 2}, {3, 4}, {5, 6}};
```
Expand Down Expand Up @@ -81,6 +82,7 @@ d
```

Lists can be used to assign values to multiple variables at once:

```
>> {a, b} = {1, 2};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ c

Compound statements can be entered with `;`.
The result of a compound expression is its last part or `Null` if it ends with a `;`.

```
>> 1; 2; 3
3
Expand All @@ -68,6 +69,7 @@ The result of a compound expression is its last part or `Null` if it ends with a
```

Inside For, While, and Do loops, Break() exits the loop and Continue() continues to the next iteration.

```
>> For(i = 1, i <= 5, i++, If(i == 4, Break()); Print(i))
1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ Functions in alphabetical order:
* &#x2705; [Exp](functions/Exp.md)
* &#x2705; [Expand](functions/Expand.md)
* &#x2705; [ExpandAll](functions/ExpandAll.md)
* [ExpandDenominator](functions/ExpandDenominator.md)
* [ExpandNumerator](functions/ExpandNumerator.md)
* &#x2705; [Expectation](functions/Expectation.md)
* &#x2705; [ExpIntegralE](functions/ExpIntegralE.md)
* &#x2705; [ExpIntegralEi](functions/ExpIntegralEi.md)
Expand Down Expand Up @@ -876,7 +878,7 @@ Functions in alphabetical order:
* &#x2705; [Sow](functions/Sow.md)
* [Span](functions/Span.md)
* &#x2705; [SparseArray](functions/SparseArray.md)
* [SparseArrayQ](functions/SparseArrayQ.md)
* &#x2705; [SparseArrayQ](functions/SparseArrayQ.md)
* &#x2705; [Sphere](functions/Sphere.md)
* &#x1F9EA; [SphericalBesselJ](functions/SphericalBesselJ.md)
* &#x1F9EA; [SphericalBesselY](functions/SphericalBesselY.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See
```

### Related terms
[E](E.md), [Pi](Pi.md)
[E](E.md), [Glaisher](Glaisher.md), [Khinchin](Khinchin.md), [Pi](Pi.md)



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Range(a, b)

> returns a list of integers from `a` to `b`.
```
Range[a, b, di]
```

> returns a list of values from `a` to `b` using step $di$. More specifically, 'Range' starts from `a` and successively adds increments of `di` until the result is greater `(if di > 0)` or less `(if di < 0)` than `b`.
### Examples

```
Expand Down

0 comments on commit 8197711

Please sign in to comment.