🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #21538

Re: Problem z dokładnością double??

#21538
From: Robert Winkler
Date: Wed, 02 Jun 2010 06:50
16 lines
1438 bytes
>> double we = 8893.897645320;
>
> Na podglądzie w programie:
> we 8893.8976453199994 double
> Taka wartość to może mi milimetry zamienić na metry

Witaj,
Jakiego środowiska i kompilatora używasz?
Uruchomiłem właśnie u siebie coś takiego:
      double we = 8893.897645320;
      Debug.WriteLine(string.Format("{0:F20}", we));
i jako wynik otrzymałem:
      8893,89764532000000000000

____
Robert Winkler 
Technical Details
Message-ID: <hu4uvm$eo$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <4C04D85E.3070406@cbk.poznan.pl> <4C04F250.1090103@cbk.poznan.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: "Robert Winkler" <winkel@NOSPAMpoczta.fm>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: Problem z dokładnością double??
Date: Wed, 2 Jun 2010 08:50:26 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 17
Message-ID: <hu4uvm$eo$1@inews.gazeta.pl>
References: <4C04D85E.3070406@cbk.poznan.pl> <4C04F250.1090103@cbk.poznan.pl>
NNTP-Posting-Host: gate.alan-systems.com
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1275461430 472 62.181.186.82 (2 Jun 2010 06:50:30 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Wed, 2 Jun 2010 06:50:30 +0000 (UTC)
Importance: Normal
In-Reply-To: <4C04F250.1090103@cbk.poznan.pl>
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
X-Priority: 3
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-User: robert.k.winkler
X-MSMail-Priority: Normal
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit