[CLN-list] cl_inhibit_floating_point_underflow

Bruno Haible bruno at clisp.org
Mon Oct 3 09:48:57 CEST 2011


Kåre Olaussen wrote:
> I wonder if section 12.2 of the manual should be modified?
> The behaviour maybe  depends on compilers and systems.

The manual is as precise and unambiguous as it can be:

   "If you set the global variable
         cl_boolean cl_inhibit_floating_point_underflow
    to `cl_true', the error will be inhibited, and a floating-point zero
    will be generated instead.  The default value of
    `cl_inhibit_floating_point_underflow' is `cl_false'."

This means:
  1) You should _set_ the variable.
  2) The variable is already defined, and it has a default value.

Setting a global variable means assigning it. This behaviour is not
compiler or system dependent.

What you have tried to do, is to _redefine_ the variable in your code.
Here the effect is system dependent: On ELF systems, a redefinition of
a variable or function usually overrides (takes precedence over) the original
one (*), whereas on other systems (Windows, MacOS X, AIX, HP-UX), it usually
does when you are linking with cln as a static library but *not* when you are
linking with it as a shared library.

But that is common knowledge; I don't think the CLN manual should explain
the difference between assignment and redefinition.

Bruno

(*) The cases where a redefinition does not override the original definition
    imply dynamic loading of shared libraries.


More information about the CLN-list mailing list