Octave 3.0.1 available for ftp

David Bateman David.Bateman at motorola.com
Thu Apr 24 05:47:03 CDT 2008


Tatsuro MATSUOKA wrote:
> Hello  Michael 
>
>   
>> On Tue, Apr 22, 2008 at 11:04 AM, Tatsuro MATSUOKA
>> <tmacchant at yahoo.co.jp> wrote:
>>     
>>>  > This should have been fixed. Can you check whether HAVE_ROUND is
>>>  > defined in your config.h?
>>>  =====================================================
>>>
>>>  488: /* Define to 1 if you have the `round' function. */
>>>  489: #define HAVE_ROUND 1
>>>
>>>  It was defined.
>>>       
>> Then it might be that the "round" implementation in MinGW is
>> broken (there's no "round" in MSVC). Manually undefined HAVE_ROUND
>> in config.h and recompile lo-mappers.cc (and liboctave.dll) and see if
>> if helps.
>>     
>
> You are right.
> in config.h, I modified as:
> /* Define to 1 if you have the `round' function. */
> //#define HAVE_ROUND 1
> #undef HAVE_ROUND
>
>  d:\usr\Tatsu\OctSrc\octave-3.0.1\scripts/general\bitcmp.m  PASS   15/15
>
> success!!!
> I will propose the following patch
> ==================================================
> *** lo-mappers.cc       Tue Apr 22 01:00:19 2008
> --- lo-mappers.mingw.cc Thu Apr 24 18:11:42 2008
> ***************
> *** 72,78 ****
>   double
>   xround (double x)
>   {
> ! #if defined (HAVE_ROUND)
>     return round (x);
>   #else
>     if (x >= 0)
> --- 72,78 ----
>   double
>   xround (double x)
>   {
> ! #if defined (HAVE_ROUND) && ! defined (__MINGW32__)
>     return round (x);
>   #else
>     if (x >= 0)
>
>   
Wouldn't it better better to have the autoconf test refuse to set
HAVE_ROUND for mingw rather than hard code in the source.. Alternatively
we code test the behavior of the round function in an autoconf test to
see if it fails for the case near bitmax, though that would be more work
to implement..

D.



-- 
David Bateman                                David.Bateman at motorola.com
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



More information about the Help-octave mailing list