From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dima Volodin To: Sam Lantinga Cc: egcs@egcs.cygnus.com, highlander@lokigames.com, dvenckus@activision.com Subject: Re: Rounding errors using doubles? Date: Thu, 18 Mar 1999 16:54:00 -0000 Message-id: <36F1A032.75E4DD44@dvv.ru> References: X-SW-Source: 1999-03/msg00634.html Sam Lantinga wrote: > I have to thank everyone here on this list for your responsiveness. > The problem was caused by unexpected values in code using doubles > that was ported from Windows. Apparently, by default, Windows uses > 53 bits of precision for it's double operations. Linux uses 64 bits. > > Since the code relies on the exact behavior of doubles quite extensively, > we are setting the precision of the FPU to 53 bits using the fldcw > instruction. :) > > BTW, does anyone know what precision is used on the PPC and Alpha > architectures? Man, I'm telling you - your code is _broken_. It's just sheer luck you see it working at all. > -Sam Lantinga (slouken@devolution.com) Dima From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dima Volodin To: Sam Lantinga Cc: egcs@egcs.cygnus.com, highlander@lokigames.com, dvenckus@activision.com Subject: Re: Rounding errors using doubles? Date: Wed, 31 Mar 1999 23:46:00 -0000 Message-ID: <36F1A032.75E4DD44@dvv.ru> References: X-SW-Source: 1999-03n/msg00639.html Message-ID: <19990331234600.fANCq0C_XfEQF-9GJWEa0HOMN-NogCgdsdwE9fKfW_g@z> Sam Lantinga wrote: > I have to thank everyone here on this list for your responsiveness. > The problem was caused by unexpected values in code using doubles > that was ported from Windows. Apparently, by default, Windows uses > 53 bits of precision for it's double operations. Linux uses 64 bits. > > Since the code relies on the exact behavior of doubles quite extensively, > we are setting the precision of the FPU to 53 bits using the fldcw > instruction. :) > > BTW, does anyone know what precision is used on the PPC and Alpha > architectures? Man, I'm telling you - your code is _broken_. It's just sheer luck you see it working at all. > -Sam Lantinga (slouken@devolution.com) Dima