math.h is now a prerequisite in
certain cases; a couple of assignments is added; and perhaps some other
small things.
Group 0
0
1
2
Freddy Black
X
X
Helle Gucci
X
X
X
Lars Luksus
X
X
printf function" to
problems1.
ssh to your account.
cd,
cp,
ls,
mkdir,
mv,
rm.
sudo apt-get install nano
(or install your other favourite editor) and learn how to create, save, and edit
text files with it.
sudo apt-get install build-essential.
printf function;
C math functions, math library (remember -lm); type-generic math
tgmath.h.
malloc;
Passing arrays as parameters to functions.
main invocation.
atoi (ascii to integer) and atof (ascii
to double) functions from <stdlib.h>.
printf(...) or fprintf(stderr,...)
debugging amounts to
...inserting printf commands that output more or less carefully chosen status
information at key points in the program flow, observing that information
and deducing what's wrong based on that information.
...Although often looked down on by users of modern debugging software,
printf() debugging continues to prove itself indispensable.
clang compiler
(install it with sudo apt-get install clang). Clang largely takes the same options as GCC.
fprintf(stderr,...) command at the strategic
points of the program and localize the source of the error.
TRACE macro
(read the C
preprocessor chapter)
and use it instead of directly using fprintf function. The
macro can then be simply disabled after debugging. For example:
#ifndef NDEBUG
#define TRACE fprintf
#else
#define TRACE(...)
#endif
or, more elegantly,
#ifndef NDEBUG #define TRACE(...) fprintf(stderr,__VA_ARGS__) #else #define TRACE(...) #endif
sudo apt-get --yes install gnuplot-x11
sudo apt-get --yes install pyxplot gv
The --yes option automatically answers 'yes' on all questions
apt-get might ask.
Some of you might have managed to install a special version of gnuplot,
called gnuplot-nox where 'nox' means 'no X-window'. This
version, predictably, has no x-window terminal. If you plan to use
gnuplot interactively, you have to install 'gnuplot', not 'gnuplot-nox'.
The two plotting utilities have very similar scripting languages but otherwise are somewhat different. Pyxplot uses LaTeX to render all text on the plot which is rather convenient. Gnuplot has more terminals. Look at their web-pages, gnuplot and pyxplot (specifically, the examples), and choose the one you like most (or both).
sudo apt-get install libgsl0-dev gsl-bin
gsl_odeiv2_system with the fields
function, jacobian, dimension, params to hold an
Ordinary Differential Equations Initial Value System.
gsl_odeiv2_step_rk2,
gsl_odeiv2_step_rk4,
gsl_odeiv2_step_rk45, ... ,
gsl_odeiv2_step_bsimp. Note which of the algorithms require the
Jacobian of the system.
gsl_odeiv2_driver_alloc_y_new" and
"gsl_odeiv2_driver_apply"
gsl_integration_qag
gsl_integration_qags (singular integrand)
gsl_integration_qagi (infinite interval)
gsl_integration_qagiu (infinite upper interval)
gsl_integration_qagil (infinite lower interval)
gsl_integration_cquad
gsl_multiroot_function
gsl_multiroot_fsolver_alloc
gsl_multiroot_fsolver_free
gsl_multiroot_fsolver_set
gsl_multiroot_fsolver_iterate
gsl_multiroot_test_residual
gsl_multimin_function
gsl_multimin_fminimizer
gsl_multimin_fminimizer_nmsimplex2
gsl_multimin_fminimizer_alloc
gsl_multimin_fminimizer_set
gsl_multimin_fminimizer_iterate
gsl_multimin_fminimizer_size
gsl_multimin_fminimizer_test_size
sudo apt-get install texlive texlive-latex-extra
~/.nanorc to show the otherwise invisible tabulator
characters:
syntax "makefile" "[Mm]akefile"
color white,magenta " "
The character in between the quotation mark in the second line should be the tabulator sign.
#include<assert.h> and use assertions plentifully:
you can easily disable all assertions by simply
recompiling the code with -DNDEBUG c-flag:
CFLAGS += -DNDEBUG