|
Double в строку
|
|||
---|---|---|---|
#18+
"R" выводит 15 знаков, но не всегда :( Точность double это всегда 17 знаков (внутри машины) "G17" выводит все 17 знаков. Но вот, что интересно. Округляю до 15 знаков некое число Math.Round(4.7129999999999992, 15) 4.7129999999999992 double а получаю 16 знаков после запятой. Чудеса. ... |
|||
:
Нравится:
Не нравится:
|
|||
01.11.2013, 20:59 |
|
Double в строку
|
|||
---|---|---|---|
#18+
LRDoubleConverter.ToExactString() Вещь! Спасибо!!! ... |
|||
:
Нравится:
Не нравится:
|
|||
01.11.2013, 21:04 |
|
Double в строку
|
|||
---|---|---|---|
#18+
vlsafЧудеса. Binary floating point and .NETWorked example Consider the following 64-bit binary number: 0100000001000111001101101101001001001000010101110011000100100011 As a double, this is split into: Sign: 0 Exponent: 10000000100 binary = 1028 decimal Mantissa: 0111001101101101001001001000010101110011000100100011 This is therefore a normal number of value (-1)0 x 1.0111001101101101001001001000010101110011000100100011 (binary) x 21028-1023 which is more simply represented as 1.0111001101101101001001001000010101110011000100100011 (binary) x 25 or 101110.01101101101001001001000010101110011000100100011 In decimal, this is 46.42829231507700882275457843206822872161865234375, but .NET will display it by default as 46.428292315077 or with the "round-trip" format specifier as 46.428292315077009. обратите внимание на последнюю фразу: but .NET will display it by default as 46.428292315077 or with the "round-trip" format specifier as 46.428292315077009 ... |
|||
:
Нравится:
Не нравится:
|
|||
01.11.2013, 21:06 |
|
|
start [/forum/topic.php?fid=20&startmsg=38450556&tid=1403757]: |
0ms |
get settings: |
9ms |
get forum list: |
14ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
73ms |
get topic data: |
7ms |
get forum data: |
2ms |
get page messages: |
43ms |
get tp. blocked users: |
2ms |
others: | 329ms |
total: | 487ms |
0 / 0 |