possible bug in getDoubleValue
"Carsten P. Gehrke" <[email protected]> Tue, 08 Oct 2002 01:56:36 -0700
| Newsgroups | gmane.comp.gcc.cgicc.bugs |
|---|---|
| Message-ID | <5.1.1.6.2.20021008014039.08f6e1b0@Shire> |
--=====================_638299656==_
Content-Type: text/plain; charset="us-ascii"; format=flowed
Using cgicc for the first time, I came across some behavior which I could
not explain. I have distilled the code to a minimum which still exhibits
the problem, and have taken the liberty to pack everything in a gzipped
tarball attached to this message. I have included the recommended output
of support/config.guess and ./configure in the aptly named file out.
The problem I have encountered is in the getDoubleValue method of a form
parameter. If I invoke this method without MIN and MIX limits (i.e. as
getDoubleValue()), and pass a negative value, the result is an extremely
small number (something like 2.22507e-308) and not the expected value. If
I specify MIN and MAX limits, the result is as expected. If I pass a
positive value, the result is as expected (regardless if limits are
specified or not). If I invoke the getIntegerValue method, the results are
as expected in any case.
Instead of using a form, I have used a simple href link like this:
<a href="/cgi-bin/getDoubleValue_bug?value=-10.5>
I do not see this as a problem, although I could be wrong.
The tarball contains these files:
out - the output of support/config.guess and ./configure, as suggested
getDoubleValue_bug.cpp - a short program invoking the getIntegerValue and
getDoubleValue methods with and without MIN and MAX limits, and generating
a simple HTML document with the results
Makefile - to build the above program
getDoubleValue_bug.html - simple Web page to invoke the above program with
different values
I have taken a glance at the source code for getDoubleValue, but could not
find anything that seemed to be the obvious culprit. Perhaps I am just
using the cgicc package incorrectly. Any help in this matter would be very
much appreciated.
Thank you,
Carsten Gehrke
--
========================================================================
Carsten P. Gehrke
mailto:[email protected]
========================================================================
--=====================_638299656==_
Content-Type: application/x-compressed; name="cgicc_bug.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cgicc_bug.tgz"
H4sIAHyIoj0AA+0aa2/cuDFfo19BuIeDHUcPr73eINm4SNZpLqhzDer0+qEpAi7FlVRLpCBSXi8O
9987Q0mrfUjrTc8OWpQDONJyHhzOi0MqLEoY+zotI//Jo0EQnAWj0RCeQTA6P1t71vAkGA2HwT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