News
Index
Working with MUMIE as author
- Initial steps:
- Articles:
- Problems:
- Programming with Python
- Visualizations with JSXGraph
- Visualizations with CindyJS
- Media Documents:
Working with MUMIE as teacher
Using MUMIE via plugin in local LMS
FAQ
You're not logged in
Working with MUMIE as author
Working with MUMIE as teacher
Using MUMIE via plugin in local LMS
FAQ
A function definition, the definition may include variables and other functions.
When an included variable is not defined, it will be a free variable.
Again, the \field{...}
command determines how the numbers within the function will be interpreted.
\function[<action>]{<variable>}{<expression>}
\function[normalize]{f}{x*x+3+4+0*z}
$$f = x^2 + 7$$
12345 \begin{variables}
\number{a}{1}
\number{b}{3}
\function[...]{...}{...}
\end{variables}
Action | Description | Example |
---|---|---|
replace | Replace all variables in the expression (this is the default action and can be omitted) |
\function[replace]{f}{a/b} $f = \frac{1}{3}$ |
normalize | Replaces all variables and normalizes the expression. Normalize applies the following rules. | \function[normalize]{f}{x*x+3+4+0*z} $f = x^2 + 7$ |
expand | Replaces all variables and expands the expression. Expand applies the following rules. | \function[expand, normalize]{f}{(x-1)(x-2)} $f = x^2 - 3x + 2$ |
sort | Replaces all variables and sorts the expression. | \function[sort]{f}{c-b+a*c*b} $f = abc - b + c$ |
calculate | Replaces all variables and calculates the expression. Using this option will always result in a number, in the case where a variable is undefined it takes the value 0. | \function[calculate]{f}{a/b} $f = 0.333333333333333$ amount of digit |
substitute | Creates a new function by replacing a free variable by an earlier defined variable. [https://wiki.mumie.net/pages/Substitute/edit] | \substitute{h}{f}{x}{g} |
Functions evaluated with the calculate option will show the result with 15 digits behind the decimal mark.
This is undesired when you want to output this value on the screen. In order to reduce the amount of digits behind the
decimal mark, you can provide a second (optional) parameter. The calculated result
will then be rounded to this precision.
Optional Second parameter
12345678 \number{a}{1}
\number{b}{3}
\function[calculate, 3]{f}{a/b}
% instead of a number one can use the option display
% the result will then be displayed based on \displayprecision
\function[calculate, display]{f}{a/b}
$$f = 0.333$$
Updated by Ruedi Seiler, 3 years, 10 months ago – 8ebb5c3