###############################################################################
#
# This file contains expressions used for testing the evaluation of 
# expressions. It is intended to cover all the built-in functions with all
# possible parameter types.
#
###############################################################################


#####################################################################
# Plus
1+1
2

1+1+1+1+1+1+1+1
8

1+(1+(1+(1)))
4

(1+1)+1
3

1+i
i+1

i+i
2*i

#####################################################################
# Minus
1-1
0

1-1-1
-1

1-(1-1)
1

0-3
-3

1-i
-i+1

i-1
-1+i

#####################################################################
# Multiplication
0*1
0

1*2
2

2*1
2

#####################################################################
# Division
4/2
2

1/2-0.5
0

0/2
0

#####################################################################
# Modulus
1 % 2
1

0 % 3
0

3 % 2
1

3 % 2.5
0.5

5 % -2
1

-5 % 2
-1

#####################################################################
# Power
1^2
1

2^2
4

1^0
1

2^0
1

1^-1
1

2^-1
0.5

(-3)^2
9

-3^2
-9

i^2
-1

1^i
1



#####################################################################
# 'Correct' precedence of unary - and ^
-1^2
-1

(-1)^2
1


#####################################################################
# Pi
sin(pi)
0

pi*sin(0)
0

cos(pi)
-1

cos(pi/2)
0

#####################################################################
# Sine
sin(0)
0

sin(pi/2)
1

sin(pi)
0

sin(3*pi/2)
-1

sin(pi/6)
0.5

sin(pi/3)
sqrt(3)/2

#####################################################################
# Cosine
cos(0)
1

cos(pi/2)
0

cos(pi)
-1

cos(3*pi/2)
0

cos(pi/6)
sqrt(3)/2

cos(pi/3)
0.5

#####################################################################
# Tangent
tan(0)
0

tan(pi)
0

tan(pi/4)
1

#####################################################################
# Inverse Sine

asin(0)
0

asin(1)
pi/2

asin(-1)
-pi/2

#####################################################################
# Inverse Cosine
acos(0)
pi/2

acos(1)
0

acos(-1)
pi

#####################################################################
# Inverse Tangent
atan(0)
0

atan(1)
pi/4

atan(-1)
-pi/4

atan2(0, 0)
0

atan2(1, 0)
pi/2

atan2(0, 1)
0

atan2(-1, 0)
-pi/2

atan2(0, -1)
pi


#####################################################################
# Hyperbolic functions

sinh(0)
0

cosh(0)
1

tanh(0)
0

asinh(0)
0

acosh(1)
0

acosh(cosh(i))
i

atanh(0)
0

atanh(tanh(i))
i

#####################################################################
# Natural Logarithm

ln(1)
0

ln(e)
1

ln(e^32)
32

#####################################################################
# Log base 10

log(1)
0

log(10)
1

log(100)
2

#####################################################################
# Log base 2

lg(1)
0

lg(4)
2

lg(1024)
10

lg(.5)
-1

lg(.25)
-2

abs(lg(i) - 2.26618007 i) < 0.00000001
true

#####################################################################
# Complex algebra
i^2
-1

i*i
-1

i-i
0

i+i
2*i

(i+2)/2
(i/2+1)

i/i
1

(1+3*i)*2
(2+6*i)

(1+1*i)*(2+2*i)
(0+4*i)

#####################################################################
# Roots of negative numbers

(-1)^(1/2)
i

sqrt(-1)
i

(-4)^(1/2)
2*i

#(-8)^(1/3)
#-2

#(-27)^(1/3)
#-3

#####################################################################
# Not operator

!1
false

!0
true

!true
false

!false
true

#####################################################################
# equals operator

1==1
true

1==0
false

i == i
true

i == 0
false

0 == i
false

true == true
true

false == false
true

true == false
false

false == true
false

#####################################################################
# not equals


1!=1
false

1!=0
true

i != 1
true

1 != i
true

i != i
false

true != true
false

false != false
false

true != false
true

false != true
true


#####################################################################
# comparative


1<0
false

1<2
true

1>0
true

1>2
false

1>=1
true

1>=1.1
false

1<=1
true

1<=0.9
false

#####################################################################
# And

1 && 1
true

1 && 0
false

0 && 1
false

0 && 0
false

true && true
true

true && false
false

false && true
false

false && false
false

#####################################################################
# Or

1 || 0
true

1 || 1
true

0 || 1
true

0 || 0
false

true || false
true

true || true
true

false || true
true

false || false
false

#####################################################################
# String functions
# (need to use == operator in one line and compare
# to value because JEPTester does not handle String
# results)

"ab" == "ab"
true

"a" == "b"
false

"ab" + "c" == "abc"
true

"a" + "b" + "c" + "d" == "abcd"
true

"abcd" + "efg" == "abcdefg"
true

"abcd" + "efg" == "abcd"
false

"abcd" + "efg" == "efg"
false

"A" == "a"
false

"a" + "b" == "ab"
true

"a" != "b"
true

"ab" + "cd" != "abcd"
false

#####################################################################
# exp function

exp(0)
1

exp(1)
e

exp(2)
e^2

exp(-1.5)
e^(-1.5)

exp(pi*i)
-1

#####################################################################
# abs function

abs(-1)
1

abs(1)
1

abs(0)
0

abs(i)
1

abs(2*i)
2

abs(i+1)
sqrt(2)

#####################################################################
# rand function
rand() < 1
true

rand() > 0
true

#####################################################################
# modulus function

mod(11,10)
1

mod(1,2)
1

mod(1,5)
1

#####################################################################
# sqrt function
sqrt(1)
1

sqrt(0)
0

sqrt(-1)
i

sqrt(25)
5

#####################################################################
# Sum
sum(1,2)
3

# The following expression does not evaluate correctly in JEP 2.20 and 2.21
1+sum(1)
2

sum(1)
1

sum(1, 2)
3

# The following expression causes an error in JEP 2.3.0 and is a known bug
sum(1, 2, 3, 4)
10

sum(1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
10

sum(i)
i

sum(i, i)
2*i

sum(1, i)
1+i

sum(i, 1)
1+i

sum("a", "b") == "ab"
true


#####################################################################
# if function

if(1, 0, 1)
0

if(.001, 0, 1)
0

if(0, 0, 1)
1

if(-0.001, 0, 1)
1

if(-2, 0, 1)
1

if(1, 1, 2, 3)
1

if(-1, 1, 2, 3)
2

if(0, 1, 2, 3)
3

if(true, 1, 0)
1

if(false, 1, 0)
0

#####################################################################
# str function

str(1) == "1.0"
true

str("1") == "1"
true

#####################################################################
# floor function

floor(1)
1

floor(1.1)
1

floor(1.9)
1

#####################################################################
# ceil function

ceil(1)
1

ceil(1.0000001)
2

ceil(1.9)
2

#####################################################################
# round function

round(1)
1

round(1.1)
1

round(1.9)
2

round(1.9, 2)
1.9

round(1.9, 1)
1.9

round(1.9, 0)
2

round(-1.2)
-1

round(-1.9)
-2

round(-1.25, 1)
-1.2

round(-1.9, 1)
-1.9

#####################################################################
# binom - Binomial function

binom(1,1)
1

binom(2,1)
2

binom(2,2)
1

binom(3,2)
3

binom(100,1)
100

#####################################################################
# Large expressions (TODO: add more)

1+1*2-(1+1*2)+1+1*2-(1+1*2)+1+1*2-(1+1*2)+1+1*2-(1+1*2)+1+1*2-(1+1*2)
0

5+4*3-4-(21+4^2-sin(pi))/5+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1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1
1

#####################################################################
# Expressions with implicit multiplication

1 2 3
6

3sin(0)
0

sin(0)3
0

sin(3 sin(0))
0

0sin(pi/2)
0

#####################################################################
# Array notation

[]
[]

[1+1]
[2]

[1+1, 1]
[2, 1]

[1, 1, 1, 1, 1, 1]
[1, 1, 1, 1, 1, 2-1]


#####################################################################
# Array addition

[1] + [1]
[2]

[1,1] + [1,1]
[2,2]

#####################################################################
# Array subtraction
[1] - [1]
[0]

[1,1] - [1,1]
[0,0]

#####################################################################
# Array multiplication
[0, 1]*2
[0, 2]

2*[0, 1]
[0, 2]

i*[1, 2]
[i, 2*i]

[1, 2]*i
[i, 2*i]

#####################################################################
# Array division
[2, 2]/2
[1, 1]

#2/[2,2]
#[1,1]

# TODO: This should work
#[1, 1]/i
#-[i, i]

#(2*i)/[2, 2]
#[i, i]




#####################################################################
# Dot product

[1] . [1]
1

[1, 0] . [0, 1]
0

[1, 1] . [1, 1]
2

[1, 1, 1, 1, 1, 1] . [1, 1, 1, 1, 1, 1]
6


#####################################################################
# Cross product
[1, 0, 0] ^^ [ 0, 1, 0]
[0 , 0, 1]

[0, 1, 0] ^^ [ 1, 0, 0]
[0 , 0, -1]



#####################################################################
# re() function - real component of a complex number

re(i)
0

re(3)
3

re(4+i)
4

re(20*i)
0

#####################################################################
# im() function - imaginary component of a complex number

im(i)
1

im(2)
0

im(2*i)
2

im(20*i)
20

im(i*i)
0


#####################################################################
# conj() function - conjugate of a complex number

conj(i)
-i

conj(1+i)
1-i

conj(0)
0

conj(1)
1

#####################################################################
# polar function

polar(1, 0)
1

polar(1, pi)
-1

polar(1, pi/2)
i

polar(1, 3*pi/2)
-i

#####################################################################
# arg function

arg(0)
0

arg(1)
0

arg(-1)
pi

arg(2*i)
pi/2

arg(i)
pi/2

arg(i*i*i)
-pi/2

arg(1+i)
pi/4


#####################################################################
# avg function

avg([0])
0

avg([1])
1

avg([0,2])
1

avg([-1, 1])
0

avg([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])
1

avg(0)
0

avg(1)
1

avg(0,2)
1

avg(-1, 1)
0

avg(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
1

#####################################################################
# min function

min([0])
0

min([0,1])
0

min([1,0])
0

min([1,-1])
-1

min([1,0])
0

min([0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])
0

min(0)
0

min(0,1)
0

min(1,0)
0

min(1,-1)
-1

min(1,0)
0

min(0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
0

#####################################################################
# max function

max([0])
0

max([0,1])
1

max([1,0])
1

max([1,-1])
1

max([1,0])
1

max([0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])
1

max([2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1])
2

max(0)
0

max(0,1)
1

max(1,0)
1

max(1,-1)
1

max(1,0)
1

max(0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
1

max(2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
2