All

Syntax

All
specifies all elements of an expression at a particular level.

Details

Examples

{ x^2, y^4, z^5 }[All, 1] {x, y, z}

See also

Part[…]

And&&

Syntax

And(bool1, bool2, … ) bool1 && bool2 &&
gives the logical AND of the expressions booli.
And(int1, int2, … ) int1 && int2 &&
gives the binary AND of the integers inti.

Details

Examples

True && False False 12 && 7 4 And stops to evaluate its arguments if False occurs. (Print(1);True) && False && (Print(2);True) 1 False Expressions which are evaluated into True will be erased. 2==2 && a==5 && b==10 && True a == 5 && b == 10

See also

False  —  True  —  Or||

Complex

Syntax

Complex
is the head of a complex number.
x + y*I
is a complex number with a real part x and imaginary part y. Both parts can be Integer, Rational or Real numbers.

Details

Examples

Head(1+2*I) Complex (1-I)^3 -2-2*I 1/2 + 0.4*I 0.5+0.4*I

See also

Integer  —  Rational  —  Real

Depth

Syntax

Depth(exp)
gives the maximum nesting depth of exp.

Details

Examples

Depth( { {1,2}, 3, {4,{5,6}} } ) 3 Depth( 123 ) 0 Depth works with any expressions, not only lists. Depth( a + 2*b + c ) 2 Depth( f(x^2) ) 2 Rational and complex numbers have a depth of 0. Depth( 1/3 ) 0 Depth( 1+2*I ) 0

See also

Length  —  Part[…]

E

Syntax

E
represents Euler's number e ≅ 2.71828.

Details

Examples

Calculate(E) 2.71828 E*2 2*E E*2.0 5.43656 Some functions give exact results for terms with E. Log(E) 1

See also

I  —  Pi

Equal==

Syntax

Equal(exp1, exp2, … ) exp1 == exp2 ==
gives True if all expressions expi are mathematically equal, and False otherwise.

Details

Examples

1 == 1 True Integer 1 and Real 1.0 are mathematically equal, but not identical. { 1 == 1.0 , 1 === 1.0 } {True, False} The equality of Overflows is unknown, but they are identical. { Overflow == Overflow , Overflow === Overflow } {Overflow == Overflow, True} Equal stays unevaluated if equality is unknown. a == b a == b

See also

Same===  —  Unequal!=

Expression

Syntax

head(arg1, arg2, … )
is an expression with a head head and any number of arguments argi.

Details

Examples

Head( func(a, b) ) func Head( h(y)(a, b) ) h(y) f(1) = 3 3 { f(0), f(1) } {f(0), 3} { f(0), f(1) } {f(0), 3}

See also

Symbol  —  Head

False

Syntax

False
represents the boolean value false.

Details

Examples

1 == 2 False Not(False) True

See also

True  —  Not!

Greater>

Syntax

Greater(x1, x2, … ) x1 > x2 >
gives True if xi is greater than xi + 1 for all arguments, and False if xi is less than or equal to xi + 1 for at least one pair.

Details

Examples

2 > 1 True 1/3 > 0 > -0.5 True x > 2 > 2 False The comparison will be simplified if possible. 2 > 1 > x 1 > x The value of an exact expression is approximated for comparison. Sin(2) > 0 True

See also

GreaterEqual>=  —  Less<  —  LessEqual<=  —  Equal==  —  Unequal!=

GreaterEqual>=

Syntax

GreaterEqual(x1, x2, … ) x1 >= x2 >=
gives True if xi is greater than or equal to xi + 1 for all arguments, and False if xi is less than xi + 1 for at least one pair.

Details

Examples

2 >= 1 True 3/2 >= 1.5 >= -0.5 True x >= 1 >= 2 False The comparison will be simplified if possible. 2 >= 1 >= x 1 >= x The value of an exact expression is approximated for comparison. Sin(2) >= 0 True

See also

Greater>  —  Less<  —  LessEqual<=  —  Equal==  —  Unequal!=

I

Syntax

I
represents the imaginary unit i.

Details

Examples

I*I -1 (-1)^(1/2) I

See also

E  —  Pi  —  Complex

Integer

Syntax

Integer
is the head of an integer number.
n
with an arbitrary number of digits represents an integer number.

Details

Examples

Head(123) Integer 3^100 515377520732011331036461129765621272702107522001

See also

Rational  —  Real  —  Complex

Join~

Syntax

Join(exp1, exp2, … ) exp1 ~ exp1 ~
joins all expressions expi that have the same head, e.g. List{…}.
Join(str1, str2, … ) str1 ~ str1 ~
joins all strings stri.

Examples

Join( {1,2} , {3,4,5} ) {1, 2, 3, 4, 5} Join( "Hello ", "World!" ) "Hello World!" Join works with any expressions, not only lists, as long as they have the same head. Join( a + b , c + d ) a + b + c + d Join( f(1, 2), f(x) ) f(1, 2, x)

See also

Depth  —  Length  —  Part[…]

Length

Syntax

Length(exp)
gives the number of elements in expression exp.
Length(str)
gives the number of characters in string str.

Details

Examples

Length( {1,2,3,4,5} ) 5 Length( "Hello World!" ) 12 Length works with any expressions, not only lists. Length( a + 2*b + c ) 3 Length( f(a, b) ) 2 Rational and complex numbers have a length of 0. Length( 1/3 ) 0 Length( 1+2*I ) 0

See also

Depth  —  Part[…]

Less<

Syntax

Less(x1, x2, … ) x1 < x2 <
gives True if xi is less than xi + 1 for all arguments, and False if xi is greater than or equal to xi + 1 for at least one pair.

Details

Examples

1 < 2 True -0.5 < 0 < 1/3 True x < 2 < 2 False The comparison will be simplified if possible. 1 < 2 < x 2 < x The value of an exact expression is approximated for comparison. Sin(4) < 0 True

See also

LessEqual<=  —  Greater>  —  GreaterEqual>=  —  Equal==  —  Unequal!=

LessEqual<=

Syntax

LessEqual(x1, x2, … ) x1 <= x2 <=
gives True if xi is less than or equal to xi + 1 for all arguments, and False if xi is greater than xi + 1 for at least one pair.

Details

Examples

1 <= 2 True -0.5 <= 1.5 <= 3/2 True x <= 2 <= 1 False The comparison will be simplified if possible. 1 <= 2 <= x 2 <= x The value of an exact expression is approximated for comparison. Sin(4) <= 0 True

See also

Less<  —  Greater>  —  GreaterEqual>=  —  Equal==  —  Unequal!=

List{…}

Syntax

List(e1, e2, … ) { e1, e2, … }
represents a list of elements ei.

Examples

List( 1, 2, 3 ) {1, 2, 3} {{a1,a2}, {b1,b2}} {{a1, a2}, {b1, b2}}

See also

Length  —  Depth  —  Part[…]

Not!

Syntax

Not(bool) !bool
gives the logical NOT of the expression bool.
Not(int) !int
gives the binary NOT of the integer int.

Details

Examples

! False True ! 15 -16 Negation of comparisons are simplified if possible. Not( x < 3 ) x >= 3 Double negation of an expression is the expression itself. Not( Not( exp ) ) exp

See also

False  —  True  —  Or||  —  And&&

Or||

Syntax

Or(bool1, bool2, … ) bool1 || bool2 ||
gives the logical OR of the expressions booli.
Or(int1, int2, … ) int1 || int2 ||
gives the binary OR of the integers inti.

Details

Examples

True || False True 12 || 7 15 Or stops to evaluate its arguments if True occurs. (Print(1);False) || True || (Print(2);False) 1 True Expressions which are evaluated into False will be erased. 1==2 || a==5 || b==10 || False a == 5 || b == 10

See also

False  —  True  —  And&&

Part[…]

Syntax

Part(exp, level1, level2, … ) exp[level1, level2, … ]
gives a part of the expression exp specified by leveli for the different nesting levels.
Part(str, part) str[part]
gives a part of the string str specified by part.
The part and level specifications can have the following forms: [n]
gives the nth element of an expression or the nth character of a string.
[-n]
counts from the end of the expression or the string.
[{n1, n2, … }]
gives the expression with elements specified by ni or the string with characters specified by ni.
[m..n]
gives the expression with a Span of elements or the string with characters from m until n in steps of s.
[m..n..s]
gives a Span of elements or characters from m until n in steps of s.
[ All ]
gives the expression with all elements in this level or the string with all characters.

Examples

Pick an element or a character: Part( {a,b,c,d,e} , 3 ) c "Hello World!"[-1] "!" Pick multiple elements or characters: {a,b,c,d,e}[{-1,3,3}] {e, c, c} "Hello World!"[{1,8,3,-2}] "Hold" Pick a Span of elements or characters: {a,b,c,d,e}[2..-2] {b, c, d} Part( "Hello World!" , 1..7..2 ) "HloW" Pick all 2nd elements from the second level: {{a1,a2}, {b1,b2}, {c1,c2}}[All, 2] {a2, b2, c2} Part works on any expression. Part( x^3+2*x+1 , 2, 1) 2

See also

Depth  —  Length  —  Span..

Pi

Syntax

Pi
represents the contant π ≅ 3.14159.

Details

Examples

Calculate(Pi) 3.14159 Pi*2 2*Pi Pi*2.0 6.28319 Some functions give exact results for terms with Pi. Sin(Pi/2) 1

See also

E  —  I

Rational

Syntax

Rational
is the head of a rational number.
a/b
is a rational number represented as a fraction of two Integer numbers with numerator a and denominator b.

Details

Examples

Head(1/2) Rational 4/12 1/3

See also

Integer  —  Real  —  Complex

Real

Syntax

Real
is the head of an real number.
x
with a limited number of digits and a decimal point represents a real number.

Details

Examples

Head(1.0) Real 1 + 2.0 3.0

See also

Integer  —  Rational  —  Complex

Same===

Syntax

Same(exp1, exp2, … ) exp1 === exp2 ===
gives True if all expressions expi are identical, and False otherwise.

Details

Examples

x === y False Integer 1 and Real 1.0 are not identical, but mathematically equal. { 1 === 1.0 , 1 == 1.0 } {False, True} Overflows are identical, but the equality is unknown. { Overflow === Overflow , Overflow == Overflow } {True, Overflow == Overflow}

See also

Equal==

Span..

Syntax

Span(m, n) m .. n
represents a span between the integers m and n.
Span(m, n, s) m .. n .. s
represents a span between the integers m and n in steps of s.

Details

Examples

"Hello World!"[7..-1] "World!" "Hello World!"[-1..-6..-1] "!dlroW"

See also

Part[…]

String"…"

Syntax

String
is the head of a string.
""
is a string, a lateral sequence of characters in quote marks.

Details

Examples

"Hello World!" "Hello World!" Head("Text") String

See also

Length

Symbol

Syntax

Symbol
is the head of a string.
s
with a sequence of any kind of unicode characters is a symbol.

Details

Examples

Head(var) Symbol φ = f(1) 3 φ 3

See also

Length

True

Syntax

True
represents the boolean value true.

Details

Examples

1 == 1 True Not(True) False

See also

False  —  Not!

Unequal!=

Syntax

Unequal(exp1, exp2, … ) exp1 != exp2 !=
gives True if all expressions expi are mathematically unequal, and False otherwise.

Details

Examples

1 != 2 True Integer 1 and Real 1.0 are mathematically not unequal. 1 != 1.0 False All argument combination pairs must be unequal. 1 != 2 != 1 False Unequal stays unevaluated if inequality is unknown. a != b a != b

See also

Same===  —  Equal==

Xor!!

Syntax

Xor(bool1, bool2, … ) bool1 !! bool2 !!
gives the logical XOR (exclusive OR) of the expressions booli.
Xor(int1, int2, … ) int1 !! int2 !!
gives the binary XOR (exclusive OR) of the integers inti.

Details

Examples

True !! False True 12 !! 7 11 Xor is simplified depending on the number of True ocuurs in the arguments. True !! exp !exp True !! exp !! True exp

See also

False  —  True  —  And&&  —  Or||  —  Not!

Sycola – Documentation

Content

Object Types

Integer  —  Rational  —  Real  —  Complex  —  String"…"  —  Symbol  —  Expression

Reserved Symbols

True  —  False  —  All  —  E  —  I  —  Pi  —  Indeterminate

Arithmetic & Mathematical Functions

Plus  —  Subtract  —  Times  —  Divide  —  Power
Abs  —  Arg  —  Calculate  —  Cos  —  Floor  —  Log  —  Minus  —  Mod  —  Random  —  Sin

Comparison

Same===  —  Equal==  —  Unequal!=  —  Greater>  —  GreaterEqual>=  —  Less<  —  LessEqual<=

Logical & Bit Operation

Not!  —  And&&  —  Or||  —  Xor!!

List & Expressions

Depth  —  Length  —  Part[…]  —  Span..  —  Join~  —  List{…}