# HG changeset patch
# User Johan Grönqvist <johan.gronqvist@gmail.com>
# Date 1272570845 7200
# Node ID 4288ffc0537a779495d904564b751cd19bcb8ba4
# Parent e5264d202a8568007c5571b2ecf2658a4bf325fd
Trac 8825: Improve documentation of "norm".
diff r e5264d202a85 r 4288ffc0537a sage/misc/functional.py
a

b


1061  1061  def norm(x): 
1062  1062  """ 
1063  1063  Returns the norm of x. 
1064   
 1064  
 1065  For matrices and vectors, this returns the L2norm. 
 1066  For complex numbers, it returns the field norm. 
 1067  
1065  1068  EXAMPLES:: 
1066  1069  
1067  1070  sage: z = 1+2*I 
1068  1071  sage: norm(z) 
1069  1072  5 
 1073  sage: norm(vector([z])) 
 1074  sqrt(5) 
 1075  sage: norm(matrix([[z]])) 
 1076  2.2360679775 
1070  1077  sage: norm(CDF(z)) 
1071  1078  5.0 
1072  1079  sage: norm(CC(z)) 