POV-Ray : Newsgroups : povray.programming : To POV-Team: Please put "#define fabs fabs" into config.h... : Re: To POV-Team: Please put "#define fabs fabs" into config.h... Server Time
28 Jul 2024 10:22:26 EDT (-0400)
  Re: To POV-Team: Please put "#define fabs fabs" into config.h...  
From: Vadim Sytnikov
Date: 28 May 2002 14:32:48
Message: <3cf3cd50$1@news.povray.org>
> ...not all C
> libraries define fabs() as a macro, since often there are more efficient
way
> to do the job. And I was talking about those other C libraries.

Specifically, windows/config.h contains the following code:

  #ifdef _MSC_VER            /* Microsoft Visual C++ */ /* [LSK] */
    #define COMPILER_VER            ".msvc"
    #define IFF_SWITCH_CAST       (long)
    ...

I thought it would be perfectly appropriate to augment that with:

    #define fabs fabs

that would force the use of intrinsic fabs() generating a single
instruction -- just for the particular development system with known
features.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.