| To: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
|---|---|
| Subject: | Re: Different behavior of Str(Double)? / Re: Floating point overflow |
| From: | David Grogono <dave@grogware.com> |
| Date: | Mon, 29 Sep 2008 10:27:58 -0500 |
| Authentication-results: | mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com |
| Delivered-to: | listarchive@realsoftware.com |
| In-reply-to: | <0CA35735-C38B-4711-976F-09B836D5E577@inspiringapps.com> |
| References: | <mailman.3643.1222365006.22874.realbasic-nug@lists.realsoftware.com> <D8B903FF324D454BA0300ABE6555093D1757A4@BASEL.rothsoft.local> <0CA35735-C38B-4711-976F-09B836D5E577@inspiringapps.com> |
| Reply-to: | REALbasic NUG <realbasic-nug@lists.realsoftware.com> |
| Sender: | realbasic-nug-bounces@lists.realsoftware.com |
On Sep 29, 2008, at 9:27 AM, Joe Strout wrote: yes: because with 15 significant digits, the double gets represented more accurate in a string? (-> feature)That's what you want, you could use the Variant->String conversion, Except that as I reported last week, the precision of Variant.StringValue has been decreased by 2 digits. Code that worked in earlier versions is now broken in 2008r4. Here's a simplified example: dim v as Variant = 1/3 if val(v.StringValue) = v.DoubleValue then MsgBox "Good" else MsgBox "Bad" endThere have obviously been some changes in 2008r4 with Str and Variant.StringValue although nothing is mentioned in the release notes. This is what I've seen mentioned so far: 1) Str(1/0) now hangs the app 2) Str has now has 15 digits precision rather than 7 3) Variant.StringValue now has 15 digits precision rather than 17Obviously the first change was unintentional. Since there are no release notes, it is difficult to know whether the other 2 changes were intentional but both obviously have the potential to break people's code. - David -- David Grogono www.grogware.com _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Can't go back to 2007r3 after installing 2008r4, Wade Maxfield |
|---|---|
| Next by Date: | Re: Different behavior of Str(Double)? / Re: Floating point overflow, Norman Palardy |
| Previous by Thread: | Re: Different behavior of Str(Double)? / Re: Floating point overflow, Joe Strout |
| Next by Thread: | Re: Different behavior of Str(Double)? / Re: Floating point overflow, Michael Diehr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |