Here are some C programs that may be helpful. On cortex, to compile
such a program, use gcc, e.g.:
gcc plr.c -lm -o plr
This takes the C program in plr.c, uses the math library (-lm), and produces as output an executable called plr. You may then simply type:
plr
to run the program.