天软金融分析.NET函数大全 > 数据仓库函数 > 向导函数 > N日

SignedPower    

简述
符号次方。特殊当x=0时,N<0,返回Nan;N=0, 返回1;N>0, 返回0。
定义
SignedPower(Exp:String;N:Integer):Real
参数
名称类型说明
ExpString字符串。函数表达式
NInteger实数。次方
返回Real实数。符号次方。
  • 算法
    SignedPower(x,n)=sign(x)*(abs(x)^n)
    范例

    SetSysParam(pn_stock(),"SH600585");
    SetSysParam(pn_date(),20231030T);
    return SignedPower(@close(),3);
    //结果:14402.12
相关