octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unwarranted old-style cast warning and non-critical error


From: Daniel J Sebald
Subject: Re: Unwarranted old-style cast warning and non-critical error
Date: Thu, 23 Aug 2012 04:30:52 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 08/22/2012 03:37 PM, John W. Eaton wrote:
On 17-Aug-2012, Daniel J Sebald wrote:

[snip]

| However, INT_MIN and DBL_MIN are not analogous.  DBL_MIN is the smallest
| positive double value (i.e., greater than zero).  I printed out the value:
|
| DBL_MIN = 2.22507e-308
|
| If the minval is meant to be -DBL_MAX, apparently this doesn't make a
| difference in behavior, otherwise a bug would have shown up long ago.

Right.  I went with -octave_Inf and octave_Inf instead.

I also checked in another change that replaces all uses of DBL_MIN,
DBL_MAX, DBL_EPSILON, FLT_MIN, FLT_MAX, and FLT_EPSILON in C++ code
with std::numeric_limits functions.

That's gotten rid of most of the warnings, but there are several still hanging around in the smaller lib subdirectories where there seem to be ".in" files that are translated upon ./configure. Try

grep DBL_EPSILON */*/*
(There are a few .cc files)

grep DBL_EPSILON */*
(There are many .cc files and a few .in files)

grep FLT_EPSILON */*
(Just a couple .in files)
liboctave/Quad-opts.in:  INIT_VALUE = "::sqrt (FLT_EPSILON)"
liboctave/Quad-opts.in:  INIT_VALUE = "::sqrt (FLT_EPSILON)"

All the rest looks like C code.

Dan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]