The document contains definitions for 3 functions - fact calculates the factorial of a number n recursively by multiplying n by the factorial of n-1, norm calculates the norm (length) of a vector by taking the square root of the sum of the squares of x and y, and twice simply returns twice the value of its input n.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
44 views1 page
Lib 2
The document contains definitions for 3 functions - fact calculates the factorial of a number n recursively by multiplying n by the factorial of n-1, norm calculates the norm (length) of a vector by taking the square root of the sum of the squares of x and y, and twice simply returns twice the value of its input n.