bug-cgicc
[Top][All Lists]
Advanced

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

[bug-cgicc] possible bug in getDoubleValue


From: Carsten P. Gehrke
Subject: [bug-cgicc] possible bug in getDoubleValue
Date: Tue, 08 Oct 2002 01:56:36 -0700

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:address@hidden
========================================================================

Attachment: cgicc_bug.tgz
Description: application/compressed


reply via email to

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