Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

sin, sinf, sinl - Sinus

&pagelevel(4)&pagelevel

Definition

#include <math.h>

double sin(double x);
float sinf(float x); (C11)
long double sinl(long double x); (C11)

Diese Funktionen berechnen für eine Gleitkommazahl x die trigonometrische Funktion Sinus. x gibt den Winkel im Bogenmaß an.

Returnwert sin(x)      eine Gleitkommazahl im Intervall [-1.0, +1.0].

Beispiel

Folgendes Programm gibt Sinuswerte aus dem Bereich -pi bis +pi aus.

#include <math.h>
#include <stdio.h>
#define pi 3.14159265358979
int main(void)
{
   double x;
   for (x = -pi; x <= pi; x = x + pi/4.)
       printf(" sin(%1.2f) = %.4f \n ", x, sin(x));
   return 0;
}

Siehe auch  cos, asin, sinh