Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Pelle-48
Forum: Programming 07-22-2011
2,819
Posted By Pelle-48
OK now it works...I must link libm with -lm gcc...
OK now it works...I must link libm with -lm
gcc trig.c -lm -o trig

Is this kind of trig faster than using a table?
I have seen that some routines for FFT are using a table with sin/cos data.
Forum: Programming 07-22-2011
2,819
Posted By Pelle-48
I get this with Fedora 15: $ gcc -o trig trig.c...
I get this with Fedora 15:
$ gcc -o trig trig.c
/tmp/cc5d4TTg.o: In function `main':
trig.c:(.text+0x40): undefined reference to `sin'
trig.c:(.text+0x50): undefined reference to `cos'...
Forum: Programming 07-22-2011
2,819
Posted By Pelle-48
Simple code
OK this is a simple code:
#include<stdio.h>
#include<math.h>

void main ()
{
int a;
float b,c,d,e;

a=628;
b=a/600;
c=sin(b);
d=cos(b);
e=tan(b);

printf("\n%d",a);
printf("\n%f",b);...
Forum: Programming 07-21-2011
2,819
Posted By Pelle-48
Trigonometry missing?
I have been testing some c-files in Fedora 6 and 15 and it looks as if the math.h is different in Linux compared to Windows (BCC 4 and VC5). Where are all trigonometrics like sin and cos?
Showing results 1 to 4 of 4

 

Featured Tech Videos

All times are GMT -4. The time now is 04:06 PM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy