f[x_Integer,y_Complex]:=x + Abs[y]

f[3,5.]

f[3,5.I]

f[x_,y_/;y^2≤1]:= "Def #2"

{f[3,4],f[3,.4 I],f[3,.4]}

f[x_/;x^2+y^2≤ 1,y_]:="VERY likely NOT what you want"

f[x_,y_/;x^2+y^2≤ 1]:="likely NOT what you want"

f[x_,y_]/;x^2+y^2≤ 1:={x,y}   
(* f defined in a circle or radius 1 *)

{f[.2,1.2],f[1,1.4 I],f[3,.4]}

f[x_,y_]/;x^2+y^2≤ 2:={x,y}
(* f defined in a circle or radius 2 *)

{f[.2,1.2],f[1,1.4 I],f[3,.4]}

?f

f[3 I, 2]

Clear[g]

g[x_]:=Sin[x]/x

Plot[g[x],{x,-10,10}]

g[0]

g[0.]

Limit[g[t],t->0]

?g

g[0]:=1  (* why :=  ? *)

g[0]=1  (* ok, but how do I know "1"? *)

g[0]=Limit[Sin[t]/t,t->0]

(* or even *)
g[0]=Limit[g[t],t->0]

?g

g[0.]=Limit[g[t],t->0]

?g

Clear[g]

g[x_]:=Sin[x]/x

eps = 10.^-5;

g[x_]/;Abs[x]≤eps:=1

?g

Plot[g[x],{x,-3eps,2eps}]

eps=10^-8;

Plot[g[x],{x,-3eps,2eps}]
(* why?!?! *)

(* because *) 
eps=10^-6;
Map[g,
Table[x,{x,-2.eps,2.eps,eps/10.}]
]
eps=10^-8;
Map[g,
Table[x,{x,-2.eps,2.eps,eps/10.}]
]

Clear[g]

g[x_]:=Limit[Sin[t]/t,t->x]

g[5.]

g[0]

?g

Plot[g[x],{x,-2,3}]

Clear[g]

g[x_]:=g[x]=Limit[Sin[t]/t,t->x]

?g

g[6]

g[6.]

g[0]

?g

Plot[g[x],{x,-2,3}]

?g

Clear[f]

f[x_]:=(1-x)/(1+x^2)

Plot[f[x],{x,-1,2}]

Clear[f2]

values={};

f2[x_]:=
(values=Join[values,{x}];
f[x]
)

f2[Pi+3]

values

values={};

Plot[f2[x],{x,-1,2}]

Length[values]

ListPlot[
values
]

ListPlot[
Sort[values]
]

ListPlot[
Map[f,Sort[values]]
]

f[x_,y_]:=Sin[4x]+Cos[y]

Plot3D[f[x,y],{x,-Pi/2,Pi/2},{y,-Pi/2,Pi/2}]

f2[x_,y_]:=
(values=Join[values,{{x,y}}];
f[x,y])

values={};

Plot3D[f2[x,y],{x,-Pi/2,Pi/2},{y,-Pi/2,Pi/2}]

values//Length

Clear[showP]

showP[point_]:=Point[{point[[1]],point[[2]],0}]

Show[Graphics3D[
Map[showP,values]
]
]

values[[34]]

showP[{x_,y_}]:=
Point[{x,y,f[x,y]}]

Show[Graphics3D[
Map[showP,values]
]
]

showP[{x_,y_}]

Head[{x_,y_}]

Clear[f]

f[List[a_,b_]]:= a b

f[Times[a_,b_]]:=a+b

f[{Pi,E}]

f[Times[Pi,E]]

f[Pi E]

f[4*5]

f[4*5.]

f[Pi 2]

f[a b]

f[a * b]

a=5;b=3;

f[a * b]

f[a * b c]

Clear[g]

g[{{a_,b_},{0,c_}}]:= "UPPER"

{{1,2},{3,4}}//MatrixForm

g[{{1,2},{3,4}}]

{{1,2},{0,4}}//MatrixForm

g[{{1,2},{0,4}}]

g[{Plus[a_,b_],{0,c_}}]:= "caught"

g[{a+Pi,{0,Sin[r]}}]

Clear[a,b]

g[{a+a,{0,Sin[r]}}]

Clear[h]

h[x_,y_]:=x+y

{
h[1,2],
h[2,2],
h[2,{2}],
h[{1,2}],
h[Pi,{1,2}],
h[{1,2},{1,2}],
h[{1,2,3},{1,2}],
h[1,2,3]
}//ColumnForm

h[x_,x_]:=x

{
h[1,2],
h[2,2],
h[2,{2}],
h[{1,2}],
h[Pi,{1,2}],
h[{1,2},{1,2}],
h[{1,2,3},{1,2}],
h[1,2,3]
}//ColumnForm

?h

h[x_,y_]/;x==y:=

h[x_,{1,2}]:=
{a,b}[[RandomInteger[]+1]]

?h

{
h[1,2],
h[2,2],
h[2,{2}],
h[{1,2}],
h[Pi,{1,2}],
h[{1,2},{1,2}],
h[{1,2,3},{1,2}],
h[1,2,3]
}//ColumnForm

RandomInteger[{50,60},{10}]