---
title: v?sind
description: "计算输入的正弦值，输入为角度向量。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/kunpengaccel_kml_0099.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/kunpengaccel_kml_0099.html
indexId: 51945aab329f80e87fa34413e7c5d6b510c7d3d25506699635c42e4c60227f8e61
---
# v?sind

计算输入的正弦值，输入为角度向量。

#### 接口定义

C interface：

void vssind(const int len, const float* src, float* dst);

void vdsind(const int len, const double* src, double* dst);


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| len | 整型数 | 表示输入向量的元素个数。 len≤0时会提示参数len无效并返回。 | 输入 |
| src | 在vssind中是单精度浮点类型。 在vdsind中是双精度浮点类型。 | 输入向量src，向量长度为len。 若为空指针，会提示空指针错误并返回。 | 输入 |
| dst | 在vssind中是单精度浮点类型。 在vdsind中是双精度浮点类型。 | 输出dst，向量长度为len。 若为空指针，会提示空指针错误并返回。 | 输出 |


#### 输出结果

- 每一个运算值返回角度值x的正弦函数值y=sind(x)=sin(x * π / 180)，y ∈ [-1, +1]。
- 其他特殊值参考如下说明。| 输入角度值（src） | 输出正弦值（dst） |
| --- | --- |
| +0 | +0 |
| \-0 | \-0 |
| +inf | nan |
| \-inf | nan |
| nan | nan |


#### 依赖

C: "kvml.h"


#### 示例

C interface：```
float src[LEN] = {0.0f, 2.0f, INFINITY, NAN};
    float* dst = (float*)malloc(sizeof(float) * LEN);
    if (dst == NULL) {
        printf("Malloc Failed!\n");
        return;
    }
    vssind(LEN, src, dst);
    /**
     *  Output dst:
     *     0.0  0x1.1de58cp-5  nan  nan
     *
     */
```
