What float value makes sprintf_s() produce “1.#QO”?

前端 未结 4 1046
清歌不尽
清歌不尽 2020-12-06 17:09

I have some (legacy embedded c) code which produces a .csv file by means of some sprintf calls. Occasionally I see values of 1.#QO. I\'ve tried rep

4条回答
  •  盖世英雄少女心
    2020-12-06 17:19

    "-1.#QO" is "-1.#QNAN" after "rounding" for 3 places after the decimal. The N rounds to an O as 'A' >= '5' and 'N' + 1 == 'O'.

    This is similarly why your debugger shows "-1.#QNAN00", as it prints with 7 places and adds padding zeros to the end.

    QNaN is quiet NaN.

提交回复
热议问题