|
In Infinity the objects are: numbers,
constants and names.
Numbers can be integer, rational (fraction), with floating decimal,
for example:9, 589 , 12/7, 3.34562134568906E10
Calculations for real numbers are carried out by default with 16 significant
figures, but, having overdetermined the variable Digits
you can work with a different mantissa.
'Pi' Pi := 3.14159265358979323846264338327950288...
'Catalan' Catalan’s constant
:= 0.91596559417721901505460351493238411...
'Euler' Euler’s constant
:= 0.577215664901532860... Every variable
of the program Infinity has a name. A name is a character set beginning
with a letter. Note that capital and small letters differ. Besides
letters, figures and underlining can be used. Here are various examples
of names:
NewValue, newvalue,
new_value1
To assign a value to a variable it is necessary to enter a mode offer:
VarName := Var1+Var2*Var3;
To save equality in a variable it is necessary to enter a mode offer:
VarName := LeftSideOfOde
= RightSideOfOde;
where
VarName is the name of a variable,
LeftSideOfOde is the left part
of an equation,
RightSideOfOde is the right part
of an equation.
The difference in their use can be illustrated by the following example
of a two equations system solution
sols := lsolve({3*x+5*y
= 7, -2*x+10*y
= -5}, {x, y})
As a result we get:
sols := {x=19/8,y=-1/40}
Expressions and variables usually serve as parameters of Infinity
commands. A standard command looks like this:
command(par1,par2,...,parn);
Copyright
© 1998-2004, MathRevolt. All rights reserved
|