Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

sin(3)  —  Subroutines

NAME

sin, cos, tan, cot, asin, acos, atan, atan2, sincos, sind, cosd, tand, cotd, asind, acosd, atand, atand2, sincosd − Trigonometric and inverse trigonometric functions in radian and degree calculations. 

LIBRARY

Math Library (libm.a)

SYNOPSIS

#include <math.h>

double sin      (double x);
float  sinf     (float  x);
double sind     (double x);
float  sindf    (float  x);
double cos      (double x);
float  cosf     (float  x);
double cosd     (double x);
float  cosdf    (float  x);
double tan      (double x);
float  tanf     (float  x);
double tand     (double x);
float  tandf    (float  x);
double cot      (double x);
float  cotf     (float  x);
double cotd     (double x);
float  cotdf    (float  x);
double asin     (double x);
float  asinf    (float  x);
double asind    (double x);
float  asindf   (float  x);
double acos     (double x);
float  acosf    (float  x);
double acosd    (double x);
float  acosdf   (float  x);
double atan     (double x);
float  atanf    (float  x);
double atand    (double x);
float  atandf   (float  x);
double atan2    (double y, double x);
float  atan2f   (float  y, float  x);
double atand2   (double y, double x);
float  atand2f  (float  y, float  x);
double_complex  sincos   (double x);
float_complex   sincosf  (float  x);
double_complex  sincosd  (double x);
float_complex   sincosdf (float  x);

DESCRIPTION

sin() and sinf() compute the sine of x, measured in radians. 

sind() and sindf() compute the sine of x, measured in degrees. 

cos() and cosf() compute the cosine of x, measured in radians. 

cosd() and cosdf() compute the cosine of x, measured in degrees. 

tan() and tanf() compute the tangent of x, measured in radians. 

tand() and tandf() compute the tangent of x, measured in degrees. 

cot() and cotf() compute the cotangent of x, measured in radians. 

cotd() and cotdf() compute the cotangent of x, measured in degrees. 

asin() and asinf() compute the principal value of the arc sine of x, in the interval [-pi/2,pi/2] radians. The value of x must be in the domain [-1,1]. 

asind() and asindf() compute the principal value of the arc sine of x, in the interval [-90,90] degrees. The value of x must be in the domain [-1,1]. 

acos() and acosf() compute the principal value of the arc cosine of x, in the interval [0,pi] radians. The value of x must be in the domain [-1,1]. 

acosd() and acosdf() compute the principal value of the arc cosine of x, in the interval [0,180] degrees. The value of x must be in the domain [-1,1]. 

atan() and atanf() compute the principal value of the arc tangent of x, in the interval [-pi/2,pi/2] radians. 

atand() and atandf() compute the principal value of the arc tangent of x, in the interval [-90,90] degrees. 

atan2() and atan2f() compute the principal value of the arc tangent of y/x, in the interval [-pi,pi] radians.  The sign of atan2() and atan2f() is determined by the sign of y. 

atand2() and atand2f() compute the principal value of the arc tangent of y/x, in the interval [-180,180] degrees.  The sign of atand2() and atand2f() is determined by the sign of y. 

sincos() and sincosf() compute the sine and cosine of x, measured in radians. 

sincosd() and sincosdf() compute the sine and cosine of x, measured in degrees. 

Double_complex and float_complex data types can only be used by languages that support them. 

Function Exceptional Argument Routine Behavior
sin(), sinf() |x| = infinity invalid argument
sind(), sindf() |x| = infinity invalid argument
sind(), sindf() |x| < (180/pi) ∗ min_float underflow
cos(), cosf() |x| = infinity invalid argument
cosd(), cosdf() |x| = infinity invalid argument
tan(), tanf() |x| = infinity invalid argument
tand(), tandf() |x| = infinity invalid argument
tand(), tandf() |x| < (180/pi) ∗ min_float underflow
tand(), tandf() x = (2n+1) ∗ 90 overflow
cot(), cotf() x = 0 overflow
cotd(), cotdf() |x| = multiples of 180 degrees overflow
asin(), asinf() |x| > 1 invalid argument
asind(), asindf() |x| > 1 invalid argument
acos(), acosf() |x| > 1 invalid argument
acosd(), acosdf() |x| > 1 invalid argument
atan2(), atan2f() x = y = 0 invalid argument
atan2(), atan2f() |x| = |y| = infinity invalid argument
atand2(), atand2f() x = y = 0 invalid argument
atand2(), atand2f() |x| = |y| = infinity invalid argument
sincos(), sincosf() |x| = infinity invalid argument
sincosd(), sincosdf() |x| = infinity invalid argument

Value Data Hexadecimal Value Decimal Value
Name Type

(180/pi) F_FLOAT 2EE10365 1.683772e-37
  ∗ min_float


G_FLOAT C1F81A63A5DC006C 3.187183529933798e-307
S_FLOAT 00000039 8.028849e-44
T_FLOAT 0000000000000039 2.830787630910868e-322

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026