On Wed, 23 Dec 2009, Tamas TEVESZ wrote:

Hi,

>  > Probably nothing though sometimes is good to check the details in
>  > platform documentation. It's possible that in ieeefp.h some functionality
>  > is extended, i.e. some math functions from math.h can be replaced by
>  > C99 compatible macros which can operate on any floating point types.
> so, if available, using these is desirable?

It really depends what it exactly does on given platform.
If it's not necessary at all then it's preferred to not include it at all
to not confuse users and increase dependency list.

> i'm asking because looking at current src/rtl/math.c, except for a few 
> specific cases, isinf() is used:
> 334 #   if defined( HB_OS_SUNOS )
> 335          else if( !finite( dResult ) )
> 336 #   elif defined( HB_OS_OS2 )
> 337          else if( !isfinite( dResult ) )
> 338 #   else
> 339          else if( isinf( dResult ) )
> 340 #   endif
> 
> at the same time, looking at the solaris manuals for finite(),
> isinf() and finite() here (won't have access to my sol box till next 
> year):
> 
> http://docs.sun.com/app/docs/doc/819-2246/isinf-3m?l=Ja&a=view
> http://docs.sun.com/app/docs/doc/819-2246/isfinite-3m?l=Ja&a=view
> http://docs.sun.com/app/docs/doc/801-6680-03/6i11qck75?a=view
> 
> it seems that the currently special-cased finite() for hb_os_sunos 
> specifically fits your above explanation less than as if it was to let 
> use isinf() as well.
> i may very well be misunderstanding you, though..

isinf() and isfinite() are C99 extensions so they are not available if
C99 features are not enabled.
There is problem with non GCC unix builds - they do not use HB_MATH_ERRNO
handler (I'll fix it in next commit) and it's the reason why current
src/rtl/math.c. do not need ieeefp.h.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to