Updates:
Status: Fixed
Comment #7 on issue 165 by benoit.m...@gmail.com: Arithmetic problem with
float
http://code.google.com/p/gambas/issues/detail?id=165
In revision #4365:
- I done the float to string conversion a bit differently.
- I correctly detect the glibc mathematical
Comment #6 on issue 165 by jussi.la...@gmail.com: Arithmetic problem with
float
http://code.google.com/p/gambas/issues/detail?id=165
That is kind of expected result,
since with doubles (float in Gambas) the actual value is (5.025 - 5):
0.0253552713678800500929355621337890625000
And
Now you guys come up with samples of floating point rounding hehehehe
A couple months ago I was looking for such rounding demos for my tutorials
I am writing. Note that this is just a part of programming. Many real
numbers do not have a direct representation in base 2 (binary). So to
You can use the samples. BUT some of them are because of bug of Gambas, not
the general problem with floating points!
Example, Log2(536870912) = 29 is true with double precision floating points
but not with Gambas.
Also 8388608.0 is 8388608.0 in double precision floating point, but in
Gambas
Here is real sample for you:
Dim sngA As Single = 4.1
Dim sngB As Single = 2.2
Print sngA - sngB
1.899
Jussi
On Fri, Dec 23, 2011 at 20:33, Jussi Lahtinen jussi.lahti...@gmail.comwrote:
You can use the samples. BUT some of them are because of bug of Gambas,
not the general problem
-- Original Message ---
From: gam...@googlecode.com
To: gambas-user@lists.sourceforge.net
Sent: Wed, 21 Dec 2011 19:12:21 +
Subject: [Gambas-user] Issue 165 in gambas: Arithmetic problem with float
Status: New
Owner:
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any
to the beginning of time
-Fernando
-- Original Message ---
From: gam...@googlecode.com
To: gambas-user@lists.sourceforge.net
Sent: Wed, 21 Dec 2011 19:12:21 +
Subject: [Gambas-user] Issue 165 in gambas: Arithmetic problem with float
Status: New
Owner:
Labels: Version
Updates:
Status: Accepted
Labels: -Version -Priority-Medium Version-TRUNK Priority-Low
Comment #1 on issue 165 by benoit.m...@gmail.com: Arithmetic problem with
float
http://code.google.com/p/gambas/issues/detail?id=165
I think the problem is in the float to string conversion.
Comment #2 on issue 165 by jussi.la...@gmail.com: Arithmetic problem with
float
http://code.google.com/p/gambas/issues/detail?id=165
Not sure.
Dim ff As Float
ff = Log2(536870912)
Print ff
ff = CInt(Log2(536870912))
Print ff
Print Log2(536870912) CInt(Log2(536870912))
Result:
*29*
*29*
Comment #3 on issue 165 by jussi.la...@gmail.com: Arithmetic problem with
float
http://code.google.com/p/gambas/issues/detail?id=165
Or do I file another bug report?
Jussi
--
Write once. Port to many.
Get the SDK
Comment #4 on issue 165 by benoit.m...@gmail.com: Arithmetic problem with
float
http://code.google.com/p/gambas/issues/detail?id=165
?8388608.0
8388607,
So I think the problem is in the Float-String conversion (which does not
use the C library).
Status: New
Owner:
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any
Desktop-Any GUI-Any
New issue 165 by jussi.la...@gmail.com: Arithmetic problem with float
http://code.google.com/p/gambas/issues/detail?id=165
1) Describe the problem.
Dim ff As Float = 2 ^ 23
Print
12 matches
Mail list logo