I have noticed two problems with the interface and implementation of the
ieee.math_real package distributed with ghdl.

Firstly, the IEEE spec defines a function LOG2 as follows:

  function LOG2 (X : in REAL ) return REAL;
        -- Purpose:
        --         Returns logarithm base 2 of X

The supplied body does not provide an implementation.

Secondly, the (overloaded) function LOG() is defined by IEEE as
follows:

    function LOG (X: in REAL; BASE: in REAL) return REAL;
        -- Purpose:
        --         Returns logarithm base BASE of X

whereas the provided package has the following:

    function LOG (BASE: positive; X : real) return real;
        -- returns logarithm base BASE of X; X > 0

I am not sure whether the bug tracker is intended for bugs in the
library as well as the compiler/simulator itself. If it is, I will log
a bug.

If someone else has not already solved the issue, I could also
generate corrected package interface and body.

Best regards,
Ivan

Reply via email to