|
|
Эта страница руководства является частью версии 5.0 Инструментов XCodeПолучить эти инструменты:
Если Вы выполняете версию Инструментов XCode кроме 5,0, просматриваете документацию локально:
Читать страницы руководстваСтраницы руководства предназначаются как справочник для людей, уже понимающих технологию.
|
__TANPI(3) BSD Library Functions Manual __TANPI(3)
NAME
__tanpi -- tangent-pi function
SYNOPSIS
#include <math.h>
float
__tanpif(float x);
double
__tanpi(double x);
DESCRIPTION
The __tanpi() function returns the tangent of pi times x (measured in radians). This can be computed
more accurately than tan(M_PI * x), because it can implicitly use as many bits of pi as are necessary
to deliver a well-rounded result, instead of the 53-bits to which M_PI is limited. For large x it may
also be more efficient, as the argument reduction involved is significantly simpler.
This function may be especially useful for working with degrees; whereas tan(M_PI * x / 18_._) cannot
produce exact results for angles that naively "should" be exact, like 90 degrees, __tanpi(x / 18_._)
can be computed exactly.
SPECIAL VALUES
__tanpi(-x) is the same as - __tanpi(x) for any finite x.
__tanpi(+-_) returns +-0.
__tanpi(n) returns +0 for any positive even integer n.
__tanpi(n) returns -0 for any positive odd integer n.
__tanpi(n + _.5) returns +infinity for any even integer n.
__tanpi(n + _.5) returns -infinity for any odd integer n.
__tanpi(+-infinity) raises the invalid floating-point exception and returns NaN.
VECTOR OPERATIONS
If you need to apply the __tanpi() function to SIMD vectors or arrays, using the following functions
provided by the Accelerate.framework may be useful:
#include <Accelerate/Accelerate.h>
vFloat vtanpif(vFloat x);
void vvtanpif(float *y, float *x, const int n);
void vvtanpi(double *y, double *x, const int n);
SEE ALSO
__cospi(3), __sinpi(3), __sincospi(3), math(3)
BSD December 15, 2012 BSD
|
Сообщение о проблемах
Способ сообщить о проблеме с этой страницей руководства зависит от типа проблемы:
- Ошибки содержания
- Ошибки отчета в содержании этой документации со ссылками на отзыв ниже.
- Отчеты об ошибках
- Сообщите об ошибках в функциональности описанного инструмента или API через Генератор отчетов Ошибки.
- Форматирование проблем
- Отчет, форматирующий ошибки в интерактивной версии этих страниц со ссылками на отзыв ниже.