#include "muse_opcodes.h"Include dependency graph for muse_builtin_math.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| BEGIN_MUSE_C_FUNCTIONS muse_cell | fn_add (muse_env *env, void *context, muse_cell args) |
| (+ <numbers>). | |
| muse_cell | fn_sub (muse_env *env, void *context, muse_cell args) |
| (- <numbers>). | |
| muse_cell | fn_mul (muse_env *env, void *context, muse_cell args) |
| (* <numbers>). | |
| muse_cell | fn_div (muse_env *env, void *context, muse_cell args) |
| (/ <numbers>). | |
| muse_cell | fn_idiv (muse_env *env, void *context, muse_cell args) |
| (i/ numerator denominator). | |
| muse_cell | fn_mod (muse_env *env, void *context, muse_cell args) |
| (% numerator denominator). | |
| muse_cell | fn_inc (muse_env *env, void *context, muse_cell args) |
| (++ c). | |
| muse_cell | fn_dec (muse_env *env, void *context, muse_cell args) |
| (-- c). | |
| muse_cell | fn_trunc (muse_env *env, void *context, muse_cell args) |
| (trunc float-value). | |
| muse_cell | fn_rand (muse_env *env, void *context, muse_cell args) |
| (rand M [N]). | |
| muse_cell | fn_pow (muse_env *env, void *context, muse_cell args) |
| (pow base exponent). | |
| void | muse_math_load_common_unary_functions () |
| Defines log, log10, sqrt, sin, cos, tan, etc. | |
All rights reserved. See LICENSE.txt distributed with this source code or http://muvee-symbolic-expressions.googlecode.com/svn/trunk/LICENSE.txt for terms and conditions under which this software is provided to you.
(+ <numbers>).
add sums up all of its arguments and returns the result. The result will be an integer if all of its arguments are integers. Otherwise it'll be float.
(- <numbers>).
Takes 1 or more arguments.
(- m) gives -m(- m n) gives (m-n)(- m n o p) gives (m - (n+o+p)) (* <numbers>).
Multiplies all arguments. Result is float if at least one of the arguments is float. Otherwise it is an integer.
(/ <numbers>).
Takes 1 or more arguments.
(/ m) gives 1/m(/ m n) gives (m/n)(/ m n o p) gives (m / (n * o * p)) (i/ numerator denominator).
Takes 2 arguments. Divides first by the second and returns the quotient. Arguments must be integers.
(% numerator denominator).
Takes 2 arguments and returns the floating point or integer remainder on dividing first by the second.
(++ c).
Increments the integer contents of the given cell.
(-- c).
Decrements the integer contents of the given cell.
(trunc float-value).
Converts a float to int. If given an integer argument. returns it as is.
(rand M [N]).
Generates a random number.
(rand N) returns an integer random number in the range [0,N)(rand M N) returns an integer random number in the range [M,N)(rand F) returns a float random number in the range [0,F).(rand G F) returns a float random number in the range [G,F). (pow base exponent).
Computes base ^ exponent. The result is always a float.
| void muse_math_load_common_unary_functions | ( | ) |
Defines log, log10, sqrt, sin, cos, tan, etc.
1.4.7