floating-accuracy
define double constant as hexadecimal?
I would like to have the closest number below 1.0 as a floating point. By reading wikipedia\'s article on IEEE-754 I have managed to find out that the binary representation for 1.0 is 3FF0000000000000[详细]
2023-01-20 00:54 分类:问答Why don't operations on double-precision values give expected results?
System.out.开发者_StackOverflow中文版println(2.14656); 2.14656 System.out.println(2.14656%2); 0.14656000000000002[详细]
2023-01-19 19:09 分类:问答Some questions about floating points
I\'m wondering if a number is re开发者_开发百科presented one way in a floating point representation, is it going to be represented in the same way in a representation that has a larger size.[详细]
2023-01-19 11:27 分类:问答Finding the smallest integer that can not be represented as an IEEE-754 32 bit float [duplicate]
This question already has answers here: Closed 12 years ago. Pos开发者_开发技巧sible Duplicate: Which is the first integer that an IEEE 754 float is incapable of representing exactly?[详细]
2023-01-19 09:54 分类:问答why is 1.2 * 30 = 35?
Why does this: int main(v开发者_StackOverflow社区oid) { short w = 30; return1.2 * w; } return 35?If you want to get more suitable result, try the following:[详细]
2023-01-18 01:53 分类:问答Is it possible to increase accuracy of floating point arithemtic with gcc?
some program in C which does extensive floating point calculations get right results on a pc linux box, but wrong results on the SPE of the cell processor, but not on the PPU of t开发者_如何学Gohe cel[详细]
2023-01-17 17:59 分类:问答Addition vs Subtraction in loss of significance with floating-points
While learning about precision in floating point arithmetic and different methods to avoid it (using a conjugate, taylor series,...) books frequently mention the subtraction of two very similar number[详细]
2023-01-16 22:17 分类:问答Real number arithmetic in a general purpose language?
As (hopefully) most of you know, floating point 开发者_开发问答arithmetic is different from real number arithmetic. It\'s for starters imprecise. Many numbers, especially decimals (0.1, 0.3) cannot be[详细]
2023-01-16 09:20 分类:问答Why see -0,000000000000001 in access query?
I have an sql: SELECT Sum(Field1),开发者_开发问答 Sum(Field2), Sum(Field1)+Sum(Field2) FROM Table[详细]
2023-01-16 07:22 分类:问答C# .Net double issue... 6.8 != 6.8?
I was doing some unit testing at work and a peculiar error popped up for one of the assertions. Note that expectedValue and actualValue are both doubles.[详细]
2023-01-12 06:40 分类:问答