Testing the hw3 function

Recall hw3:
void hw3(double r1, double r2, double *s)
{
  *s = sin(r1 + r2);
}
Test:
>>> from hw import hw3
>>> r1 = 1;  r2 = -1;  s = 10
>>> hw3(r1, r2, s)
>>> print s
10   # should be 0 (sin(1-1)=0)
Major problem - as in the Fortran case

previousnexttable of contents