API Reference
In Arithmo is so easy declare a variable, you only need to use the keyword var and the name of the variable, then you can assign a value to the variable using the operator =, for example:
var x = "Hello World";In this case, the variable x is assigned the value "Hello World". You can also declare a variable without assigning a value, for example:
x; // Output: "Hello World"Derivates
To get the Derivates like trigonometric, polynomial or exponential, you don’t need to do any special, you only can called as follows:
global_deriv([1,2,3],constants=2,y); // Output: (2)*(2x^0)+(2)*(6x^1)global_deriv(cos,constants=1,y); // Output: -sin(y)In the case of derivatives of the chain, sum, product or quotient, it’s as follows:
deriv_gen(chain,z,[1,2,4],cos); // Output: (2cos(z)^0+8cos(z)^1)*-sin(z)Types of data
The lenguaje allows the use of the following types of data:
int: integerflt: floatsrg: stringbool: booleandbl: double
Operators
Arithmo is standardized in the use of basic operators, such as:
+: addition-: sustraction*: multiplication/: division=: equal==: comparison!=: different>: grater than<: less than>=: greater than or equal to<=: less than or equal to%: module\: root^: power&&: and||: or!: not++: increase--: decrement
Structure of data
The language allows the use of conventional data structures such as:
[]: array{}: dictionary[][]: matrix
Reserved words
The reserved words of Arithmo are mentioned as follows, and these should not be used to name variables:
var: variablefn: functionif: conditionalelse: conditionalwhile: cycledo: loopfor: loopswitch: switchcase: casedeft: deftcontinue: continuebreak: breakreturn: returnprint: printint: integerflt: floatsrg: stringbool: booleandbl: doubletrue: truefalse: false++: increase--: decrement*: multiplication/: division==: comparison!=: difference>=: greater than or equal to<=: less than or equal to%: module\: root^: power&&: and||: or!: not[]: array{}: dictionary[][]: matrix