开发者

C fprintf program outputing -1.#J instead of real numbers

Statement in program:

fprintf(OutBasalArea,"\t %12.2lf",SpecBasalArea[ks]);

Getting -1.#J

Why and what change开发者_运维百科 do I need to make to program statement?


This happens because your number is -infinite.

Try to print the numbers without the length specifier 12.2 (use just %lf ). In this case, the output will be: -1.#INF00 (or something like that).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜