sin()

Declaration

double sin(double dX);

Description:

This function returns the sine of the passed-in argument.

Overloads

float sin(float);
double sin(double);
long double sin(long double);

Related Functions

float sinf(float);
long double sinl(long double);

* Note: Since C does not allow function overloading, these other versions of this function exist.

Domain

(-∞, ∞)

Range

[-1, 1]

Periodicity

Symmetry

Origin

Asymptotes

None





Example

#include <iostream>
#include <cmath>

int main() {
    using namespace std;

    double dX = -1000.0;
    cout << "x = " << dX << "  sin(x) = " << sin(dX) << endl;

    dX = 1.8;
    cout << "x = " << dX << "  sin(x) = " << sin(dX) << endl;

    return 0;
}

Output:

sin() Output