What is happening here in pow function?

前端 未结 5 544
北海茫月
北海茫月 2020-12-01 23:53

I have seen various answer here that depicts Strange behavior of pow function in C.
But I Have something different to ask here.

In the below code I

5条回答
  •  旧巷少年郎
    2020-12-02 00:52

    You've fooled it into thinking that the inputs are real and so it gives an approximate answer, which happens to be slightly under 100, e.g. 99.999999 that is then truncated to 99.

提交回复
热议问题