[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc and j0,j1,jn, y0, y1, yn



On Mon, Oct 30, 2000 at 03:32:54PM -0500, mgi@vt.edu wrote:
> 
> It appears that the bessel functions j0, j1, jn, and y0, y1, yn are
> included in the libc as documented in the man page.
> 
> However, it appears that gcc needs some option flags for these
> functions to be found in the include file bits/mathcall.h
> 
> Any suggestions which flag would do the trick?

Like:

/* my_j0.c: Test bessel function */
#include <stdio.h>
#include <math.h>

int
main(void) {
	double answer = j0(1.2345);
	fprintf(stderr, "answer = %f\n", answer);

	return 0;
}

$ gcc -g -o my_j0 my_j0.c -lm

Have to link to the math library.  No idea what they're used for...

-- 
#! /bin/sh
# ppp-address: What's my Internet Address for ppp0 ?
/sbin/ifconfig ppp0 2> /dev/null | grep 'inet addr:' | sed \
's=.*inet addr\:\([0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\).*=\1='



Reply to: