about log2 for octave-3.1.51 (Not 3.1.50)

John W. Eaton jwe at bevo.che.wisc.edu
Mon Jul 28 14:09:16 CDT 2008


On 25-Jul-2008, Jaroslav Hajek wrote:

| On Fri, Jul 25, 2008 at 9:43 AM, Tatsuro MATSUOKA <tmacchant at yahoo.co.jp> wrote:
| > Hello
| >
| >
| > I have gottten the imformation at cygwin ML.
| >
| >
| > -----BEGIN PGP SIGNED MESSAGE-----
| > Hash: SHA256
| >
| > Tatsuro MATSUOKA wrote:
| > | The following lines the config.log which are related to log2.
| > | The existence of log2 is found.  However it did not go well octave
| > configure test.
| >
| > log2 is defined as a cpp macro in <math.h>.  You either need to fix the
| > configure test, or you may find it easier to pass "ac_cv_func_log2=yes"
| > to configure.
| >
| >
| > Yaakov
| > -----BEGIN PGP SIGNATURE-----
| >
| > Is the above useful?
| >
| 
| I think we're getting closer :) math.h should never be included in any
| c++ header, but rather cmath (this is handled by liboctave/lo-math.h).
| The cmath header tries to undefine the functional macros defined in
| math.h - but log2 is apparently missing. I reckon this is a bug in
| g++; given that log and log10 are both there, log2 should probably be
| as well. Would you like to report this to gcc bugzilla?
| Still, it's reasonable to workaround the bug in some way. The easiest
| fix I can think of is the attached changeset.

I applied this changeset.

Thanks,

jwe


More information about the Bug-octave mailing list