[Bug 18073] New: VB6 Format decimal error
http://bugs.winehq.org/show_bug.cgi?id=18073 Summary: VB6 Format decimal error Product: Wine Version: 1.1.18 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: oleaut32 AssignedTo: wine-bugs(a)winehq.org ReportedBy: gabmoa(a)yahoo.it CC: damjan.jov(a)gmail.com Created an attachment (id=20475) --> (http://bugs.winehq.org/attachment.cgi?id=20475) test program I had posted bug 15387 (fixed) for a problem in VB6 Format but I find there is another problem in the Wine VarFormat function. MASK=#.### INPUT RESULTS LINUX WIN 0.099 0.099 0.099 -> ok 0.0999 0.099 0.1 -> wrong 0.09999 1.000 0.1 -> wrong!! 0.099999 1.000 0.1 -> wrong!! MASK=#.#### INPUT RESULTS LINUX WIN 0.099 0.099 0.099 -> ok 0.0999 0.0999 0.0999 -> ok 0.09999 0.09999 0.1 -> wrong 0.099999 1.000 0.1 -> wrong!! 0.099999 1.000 0.1 -> wrong!! In attachment there is a VB6 test program used to get these results. All the cases must have the same behaviour Thank you -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 --- Comment #1 from Damjan Jovanovic <damjan.jov(a)gmail.com> 2009-05-10 13:44:35 --- Confirming. In addition I see that in Wine #.### + 0.099 => .099 instead of 0.099 (missing leading 0). I am having a look. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Difficulty|--- |Days Summary|VB6 Format decimal error |VarFormat formats decimals | |wrongly --- Comment #2 from Damjan Jovanovic <damjan.jov(a)gmail.com> 2009-05-11 15:18:19 --- There are at least 3 problems I see: 1. When rounding a continuous sequence of digits that don't terminate before the first digit (eg. 999^-4 to 2 decimal places), the have_int variable is incremented, instead of the exponent variable. 2. Even with 1 fixed, the exponent is ignored when printing the digits before the decimal place, so we get no digits or wrong digits (0.9 + #.### = .900, 0.09999 + #.### = 1.000). (There's some variable called pad that might be the 'exponent' before the decimal point?) 3. The trailing zeroes should be discarded but aren't. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 --- Comment #3 from Gabriele Moabiti <gabmoa(a)yahoo.it> 2009-05-11 18:18:07 --- It seems intricate... (In replay to Comment #2) For the mask #.### the lack of zero is right for 0.099 (in comment #1 the right mask is 0.###.. for the examples), however the problems we have seen remain! -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 --- Comment #4 from Damjan Jovanovic <damjan.jov(a)gmail.com> 2009-05-12 11:43:56 --- Created an attachment (id=21056) --> (http://bugs.winehq.org/attachment.cgi?id=21056) patch for sequences of nines This patch fixes most of your problems. I've already sent it to wine-patches. The trailing zeroes, I'll try to get to later. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 --- Comment #5 from Gabriele Moabiti <gabmoa(a)yahoo.it> 2009-05-12 16:27:39 --- Great job!! #.### 0.099 => .099 should be right in my first table the mask was 0.###, my mistake! This case instead MASK #.### INPUT RESULTS LINUX WIN 0.0999 .099 .1 -> wrong 0.0995 .099 .1 -> wrong 0.0994 .099 .099 -> ok is still wrong, although it's less critical than the others one -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 --- Comment #6 from Damjan Jovanovic <damjan.jov(a)gmail.com> 2009-05-15 03:11:37 --- Another patch that strips the trailing decimal zeroes when rounding has been accepted into git last night. The only real problem I still see is that 0.099 + #.## is rounded to 0.09 instead of 0.1 - and I think I can fix that too. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 Damjan Jovanovic <damjan.jov(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |testcase --- Comment #7 from Damjan Jovanovic <damjan.jov(a)gmail.com> 2009-05-17 04:31:22 --- I've sent in a test showing how Wine truncates instead of rounding when the portion of the number having no leading or trailing zeroes has a negative exponent (eg. in 0.099 + #.##, the 99 has an exponent of -3, but the code that rounds only activates if the number of fractional digits, 2, is greater than the number of needed fractional digits, 2, hence it isn't called, and 0.099 is truncated to 0.09 instead of being rounded to 0.1). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 --- Comment #8 from Austin English <austinenglish(a)gmail.com> 2009-11-19 12:53:21 --- This is your friendly reminder that there has been no bug activity for 6 months. Is this still an issue in current (1.1.33 or newer) wine? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 --- Comment #9 from Gabriele Moabiti <gabmoa(a)yahoo.it> 2009-11-20 13:37:21 --- (In reply to comment #8)
This is your friendly reminder that there has been no bug activity for 6 months. Is this still an issue in current (1.1.33 or newer) wine?
0.0995 with format string #.### Wine 1.1.33 -> 0.099 Windows XP -> 0.1 Still a little issue (to reach 100% compatibility) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv(a)dawncrow.de -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 --- Comment #10 from André H. <nerv(a)dawncrow.de> 2010-03-01 12:38:46 --- should be fixed by my recent work... Gabriele, can you please retest it. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 Gabriele Moabiti <gabmoa(a)yahoo.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #11 from Gabriele Moabiti <gabmoa(a)yahoo.it> 2010-03-01 18:09:58 --- Tested ok. It' fixed! I change the state to resolved fixed -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=18073 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #12 from Alexandre Julliard <julliard(a)winehq.org> 2010-03-05 12:42:58 --- Closing bugs fixed in 1.1.40. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=18073 André H. <nerv(a)dawncrow.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a78490bf8a7f4dad58dccfe41bd | |b84efd1a58ed7 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org