Re: TZF - Calculating
Chris Morgan <[email protected]> Tue, 9 Sep 2003 10:21:33 +0100
| Newsgroups | gmane.comp.lang.delphi.topaz |
|---|---|
| Message-ID | <[email protected]> |
Pierre, Nothing is wrong. Have a look at http://www.bancoems.com/CompLangPascalDelphiMisc-MiniFAQ.htm#Q3 which discusses floating point accuracy. Cheers, Chris ----- Original Message ----- From: "Pierre Wittwer" <[email protected]> To: <[email protected]> Sent: Tuesday, September 09, 2003 12:44 AM Subject: TZF - Calculating > Hi Topaz-users (or Delphi-users), > > I have a simple question. I have to convert a string into a real.e.g. > s = '3.10' and r is the real. > Using Val(s,r,code) I get the real as r = 3.09999999999854......instead of > 3.10 > Using the SReal of Topaz I get the correct '3.10' in the string. But for > calculating I need the real r > What is wrong? Thank you for your help > > > Pierre Wittwer > CH Stans > --^---------------------------------------------------------------- This email was sent to: [email protected] EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt Or send an email to: [email protected] TOPICA - Start your own email discussion group. FREE! http://www.topica.com/partner/tag02/create/index2.html --^----------------------------------------------------------------