---
title: v?pow3o2
description: "计算输入的3/2次方的值，输入为向量。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2300/accel/kunpengaccel_kml_16_0311.html
sourcePath: /source/zh/kunpengboostkithistory/2300/accel/kunpengaccel_kml_16_0311.html
indexId: fe3cef9b73ce5b4c796fd87da4d77f6c9e3844fcc85bb2294e1bbe3928eb654474
---
# v?pow3o2

计算输入的3/2次方的值，输入为向量。

#### 接口定义

C interface：

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

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


#### 参数

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


#### 输出结果

| 输入值（src） | 输出值（dst） |
| --- | --- |
| <+0 | nan |
| +0 | +0 |
| \-0 | \-0 |
| \-inf | nan |
| +inf | +inf |
| nan | nan |


#### 依赖

C: "kvml.h"


#### 示例

C interface：

```
int i, len = 4;
float src[len] = {0.0f, 2.0f, inf, nan};
float* dst = (float*)malloc(sizeof(float) * len);
if (dst == NULL) {
printf("Malloc Failed!\n");
return 0;
}
vspow3o2(len, src, dst);
/**
*  Output dst:
*     0.0  2.828427  nan  nan
*
*/
```
