---
title: svml128_pow_f?
description: "计算x的y次幂，x与y均为向量。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/2200/accel/kunpengaccel_kml_16_0271.html
sourcePath: /source/zh/kunpengboostkithistory/2200/accel/kunpengaccel_kml_16_0271.html
indexId: 4aba6e9122e72948976de600abe2b56386af0dc4c5ffd85497db9b5fcd9e3e0c74
---
# svml128_pow_f?

计算x的y次幂，x与y均为向量。

#### 接口定义

C interface：

float32x4_t svml128_pow_f32(float32x4_t src1, float32x4_t src2);

float64x2_t svml128_pow_f64(float64x2_t src1, float64x2_t src2);


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 |
| --- | --- | --- | --- |
| src1 | 在svml128\_pow\_f32中，src1是单精度浮点类型。 在svml128\_pow\_f64中，src1是双精度浮点类型。 | 表示输入向量的浮点值。 | 输入 |
| src2 | 在svml128\_pow\_f32中，src2是单精度浮点类型。 在svml128\_pow\_f64中，src2是双精度浮点类型。 | 表示输入向量的浮点值。 | 输入 |


#### 输出结果

- x大于0且y为小数，返回幂指数的结果，取值范围r ∈ (-INF, +INF)。
- 输入x为-0，y为负的奇数，则返回-∞；其他x为±0，y为负数，返回+∞。
- 输入x为±0，y为正的奇数，则返回±0；其他x为±0，y为正数，返回+0。
- 输入x为±1，y为任意值，则返回+1。
- 输入x为任意值，y为±0，则返回+1。
- 输入x小于+0，y为小数，则返回nan。
- 输入|x|小于1，y为-∞，则返回+∞；输入|x|大于1，y为-∞，则返回+0。
- 输入|x|小于1，y为+∞，则返回+0；输入|x|大于1，y为+∞，则返回+∞。
- 输入x为-∞，y为负奇数，则返回-0；其他x为-∞，y为负数，则返回+0。
- 输入x为-∞，y为正奇数，则返回-∞；其他x为-∞，y为正数，则返回+∞。
- 输入x为+∞，y小于+0，则返回+0；其他x为+∞，则返回+∞。
- 输入x为大的有限数，且y为大的有限数，则返回±∞。
- 输入x为nan，且y为nan，则返回nan。


#### 依赖

C: "ksvml.h"


#### 示例

C interface：
```
float32x4_t src = {0.0f, 2.0f, INFINITY, NAN};
float32x4_t src2 = {0.0f, 2.0f, INFINITY, NAN};
float32x4_t dst = svml128_pow_f32(src, src2);
printf("%.15g  %.15g  %.15g  %.15g\n", dst[0], dst[1], dst[2], dst[3]);
/**
*  Output dst:
*     1  4  inf  nan
*
*/
```
