Exception 返回算术溢出的db2exp()命令
嗨,我在DB2中对float类型的列使用EXP()命令Exception 返回算术溢出的db2exp()命令,exception,db2,overflow,arithmetic-expressions,Exception,Db2,Overflow,Arithmetic Expressions,嗨,我在DB2中对float类型的列使用EXP()命令 select distinct 1 - power(0.9144,exp(beta - 0.1)) from mytable 在我引入exp()之前(beta-0.1)。贝塔是一个浮动,范围在3018.87897931和12289.951602012534之间 我得到的错误是 Arithmetic overflow or other arithmetic exception occurred.. SQLCODE=-802,SQLSTATE
select distinct 1 - power(0.9144,exp(beta - 0.1)) from mytable
在我引入exp()之前(beta-0.1)。贝塔是一个浮动,范围在3018.87897931和12289.951602012534之间
我得到的错误是
Arithmetic overflow or other arithmetic exception occurred.. SQLCODE=-802,SQLSTATE=22003,DRIVER=3.64.106
这里可能有什么问题?显然,这里的问题是您超出了64位浮点数格式可表示的最大范围,即+1.79769E+308
如果您需要使用更大的数字,请考虑在<代码> DEXFLASH(34)中执行计算(如果DB2版本支持此数据类型),