[MPlayer-dev-eng] Patch for gcc 3.4 against MPlayer-1.0pre5

A. Guru a.guru at sympatico.ca
Thu Sep 2 09:03:38 CEST 2004


* On Thursday 2004-09-02 at 08:12:10 +0200, Torinthiel wrote:
> On Thu, Sep 02, 2004 at 01:20:23AM +0100, Martin Simmons wrote:
> > Based on what spec?  It is normal for floating point rounding of an exact half
> > to generate an even integer, i.e.
> 
> I don't know spec's, but ALWAYS if two directions are possible, then
> half is rounded up. So that round(x)=trunc(x+0.5)
> I don't know about negative numbers though.
> 
> However, Maple (a symbolical mathematical package, used by
> mathematisians) rounds -0.5 to -1. So does scilab, a numerical package.
> Octave however (another numerical package) rounds -0.5 to 0.

$ man 3 fesetround
SYNOPSIS
       #include <fenv.h>

       int fegetround(void);
       int fesetround(int rounding_mode);

DESCRIPTION
   Rounding
       Each  of the macros FE_DOWNWARD, FE_TONEAREST, FE_TOWARDZERO, FE_UPWARD
       is defined when the implementation supports  getting  and  setting  the
       corresponding rounding direction.

       The  fegetround function returns the macro corresponding to the current
       rounding mode.

       The fesetround function sets the rounding  mode  as  specified  by  its
       argument and returns zero when it was successful.




More information about the MPlayer-dev-eng mailing list