std1.0.0-beta-7 SafeC docs

std :: ml::gpu_spirv

Function std::spirv_pow

#include <std/ml/gpu_spirv.h> source ยท definition

int spirv_pow(struct SpirvBuf a, struct SpirvBuf b, struct SpirvBuf out, unsigned long n)

a^b as exp(b log a) and sqrt(a) as exp(log(a) / 2): for a >= 0 (a negative base gives NaN, as powf does for a non-integer exponent).