不可行的行为 [英] unprectable behaviour
问题描述
在我的代码片段中,我看到一些简单的行为,简单的
函数,例如math.h中的pow()函数返回,-1#IND0
对于简单的参数如POW((double)1,(double)2)和
任意甚至一些简单的乘法似乎返回相同,
-1#IND0(在调试模式下,各个变量都有正确的值
但最终产品未定义)。
我是试图解决这个问题,在这个过程中,发现了一个奇怪的解决方案,在
上再次重复相同的行给出了正确的结果。
TIA >
再见,
快点。
Hi,
In my piece of code I see some unprectable behaviour for simple
functions like for example pow() function in math.h returns, -1#IND0
for simple arguments like POW( (double) 1, (double) 2 ) and
arbitrarily even some simple multiplication seem to return the same,
-1#IND0 ( in debugging mode, individual variables have correct values
but final product is undefined).
I was trying to solve this and in the process, found a wierd soltn, on
just repeating the same line again gives the correct result.
TIA
bye,
hurry.
推荐答案
" hurry" <胡********* @ gmail.com>写道:
"hurry" <hu*********@gmail.com> wrote:
在我的代码片段中,我看到一些简单的行为,例如math.h中的pow()函数返回,-1#IND0
任意甚至一些简单的乘法似乎返回相同,
-1#IND0(在调试模式下,个别变量有正确的值
但是最终产品是未定义的。
In my piece of code I see some unprectable behaviour for simple
functions like for example pow() function in math.h returns, -1#IND0
for simple arguments like POW( (double) 1, (double) 2 ) and
arbitrarily even some simple multiplication seem to return the same,
-1#IND0 ( in debugging mode, individual variables have correct values
but final product is undefined).
狂野的猜测......你还记得#include< math.h>?
Richard
Wild guess... did you remember to #include <math.h>?
Richard
是的我做了
yup I did
hurry写道:
hurry wrote:
在我的代码片段中,我看到一些简单的行为,例如pow()函数等简单的函数在math.h返回,-1#IND0
对于简单的参数如POW((double)1,(double)2)和
任意甚至一些简单的乘法似乎返回sam e,
-1#IND0(在调试模式下,个别变量具有正确的值
但最终产品未定义)。
我试图解决这个问题并在此过程中,发现了一个奇怪的解决方案,
只是重复相同的行再次给出正确的结果。
再见,
快点。
Hi,
In my piece of code I see some unprectable behaviour for simple
functions like for example pow() function in math.h returns, -1#IND0
for simple arguments like POW( (double) 1, (double) 2 ) and
arbitrarily even some simple multiplication seem to return the same,
-1#IND0 ( in debugging mode, individual variables have correct values
but final product is undefined).
I was trying to solve this and in the process, found a wierd soltn, on
just repeating the same line again gives the correct result.
TIA
bye,
hurry.
您能否发布您的代码?
Could you please post your code ?
这篇关于不可行的行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!