0

Not Yet Answered # double

can anyone explain me the all precison and exponent, significant bits which double can handle ? i am not getting it. wiki says it has 53 bits significant bits and 11 exponent. am a little bit confused. can anyone explain me ? (in their own way) thanks alot. although i have used double alot but now , come up with some problem. thanks.

rubberman 1,109 Discussion Starter nitin1 15 DavidB 44 jephthah 1,888 Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...

0

0

Read this article for detailed information: https://en.wikipedia.org/wiki/IEEE_floating_point

FWIW, my close friend, Bruce Ravenel when he architected the Intel 8087 math processor, implemented the first IEEE 754 device in hardware, back in the late 1970's. Here is another wikipedia article about the Intel 8086/8087 development, citeing Bruce for his work on the architecture of the 8087: http://en.wikipedia.org/wiki/Intel_8086, and here is the article on the 8087: http://en.wikipedia.org/wiki/Intel_8087

*Edited 3 Years Ago by rubberman*

0

@ddanbe what is 1023 in this ? i mean when i am printing the value of some double using compiler,executing code, i am getting only 17 digits accurately and there after getting zeroes ?

secondly, can you explain how can i infer from these things the max value double can hold?

checked by 10/3 and it give me 3.333333333333333300000.... (16 times after decimal ) and when i am doing this, 100/3, then me getting 33.3333333333333330000..... (15 times after decimal). thanks.

0

There is a pretty good paper here:

http://docs.sun.com/source/806-3568/ncg_goldberg.html

It has been around for a long time and is pretty thorough.

There is also a lot of good information about dealing with floating point numbers on Bruce Dawson's blog:

http://randomascii.wordpress.com/

Hope this helps.

0

@nitin1:

remember everything is in Base2, *binary*. so 2^11, the exponent, is a value between -1022 and +1023, but that is still the exponent of a base2 number, i.e. 2^-1022 to 2^1023 as a range, so in *base10* it gives a total *decimal* range of 10^-383 to 10^384.

Similarly, 52 + 1 significant bits (fraction bits plus sign bit) is also in base2; when converted to base10, you get a total *decimal* precision of ~16 digits, plus or minus 1 digit, for a decimal range of 15-17 digits depending on how the rounding works out.

the various links given above explain the detail, but i think it's just remembering the several conversions between base2 and base10 that is tripping you up. It should all make sense to you once you remember that.

*Edited 3 Years Ago by jephthah*

This article has been dead for over six months. Start a new discussion instead.

Recommended Articles

Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.

btn_addline :

`Private Sub btn_addline_Click(ByVal ...`

I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:

```
try
{
Runtime run = Runtime.getRuntime();
Process pr = ...
```