C: convert double to float, preserving decimal point precision

后端 未结 3 2056
野性不改
野性不改 2020-12-16 12:05

i wanted to convert double to float in C, but wanted to preserve the decimal point exactly as possible without any changes...

for example, let\'s say i have

3条回答
  •  孤城傲影
    2020-12-16 12:15

    Floating point numbers are represented in scientific notation as a number of only seven significant digits multiplied by a larger number that represents the place of the decimal place. More information about it on Wikipedia:

    http://en.wikipedia.org/wiki/Floating_point

提交回复
热议问题