提示:warning C4244:'argument' :conversion from 'double' to 'fl
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/16 16:58:56
提示:
warning C4244:'argument' :conversion from 'double' to 'float',possible loss of data
下面是出错的那段函数:
double XsatPH(float p,float H) //饱和蒸气干度 计算(已知压力、焓)
{ double h,h1,h2,t,x;
x = 0.5;
loop:
t = TempSatur(p);
h2 = EnthSteamPT(p,t); 出错的地方
h1 = EnthWaterPT(p,t);
h = (1.-x)*h1 + x*h2;
if( fabs((h-H)/H) > 0.0001 )
{ x = x * H/h;
goto loop;
}
else
return (x);
}
EnthSteamPT(p,t)在程序中是double EnthSteamPT(float p,float t)这样定义的.
我不知道怎么把那个出错的地方进行强制转换
warning C4244:'argument' :conversion from 'double' to 'float',possible loss of data
下面是出错的那段函数:
double XsatPH(float p,float H) //饱和蒸气干度 计算(已知压力、焓)
{ double h,h1,h2,t,x;
x = 0.5;
loop:
t = TempSatur(p);
h2 = EnthSteamPT(p,t); 出错的地方
h1 = EnthWaterPT(p,t);
h = (1.-x)*h1 + x*h2;
if( fabs((h-H)/H) > 0.0001 )
{ x = x * H/h;
goto loop;
}
else
return (x);
}
EnthSteamPT(p,t)在程序中是double EnthSteamPT(float p,float t)这样定义的.
我不知道怎么把那个出错的地方进行强制转换
t是定义成double的,但EnthSteamPT(p,t)接受的是float.
或者直接把EnthSteamPT(p,t); 定义成
double EnthSteamPT(double p,double t);
或者不理会这个Warning,毕竟影响不大.
或者直接把EnthSteamPT(p,t); 定义成
double EnthSteamPT(double p,double t);
或者不理会这个Warning,毕竟影响不大.
matlab绘图求助 提示错误Conversion to double from sym is not possible
matlab Conversion to double from sym is not possible
matlab 新手 Conversion to double from sym is not possible.
matlab中 Error using ==> plot Conversion to double from sym i
Matlab Error using ==> plot Conversion to double from sym is
matlab高手求助,Conversion to double from sym is not possible.
matlab问题:plot Conversion to double from sym is not possible,
matlab 画图出错 Conversion to double from sym is not possible.
Matlab求助!问题出现是Conversion to double from sym is not possible.
matlab高手求教!Error using plot Conversion to double from sym is
matlab中出现?Conversion to double from sym is not possible.
matlab里面Conversion to double from sym is not possible.怎么回事啊?