Bug in hdfview table editor

Hi,

I am using hdfview 3.0 and found an issue with the table editor. For float
datasets, you cannot enter and validate a negative number. The issue is in
hdf.view.Tools.checkValidFloat where Float.MIN_VALUE is erroneously used
instead of -Float.MAX_VALUE as the lower bound for floats. Thanks,

Jonathan Jara-Almonte

It likely comes from C/C++:

<http://en.cppreference.com/w/c/types/limits>

Cheers,

···

On Fri, 1 Dec 2017 15:30:55 +0000, Jordan Henderson said:

Thank you for reporting this issue. I had naively assumed that
Float.MIN_VALUE would represent the minimum value of a Float as opposed
to your suggested -Float.MAX_VALUE. Why the choice was made to use this
constant name for the precision of a Float and not having
Float.MIN_VALUE be defined to be - Float.MAX_VALUE, I do not know

--
____________________________________________________________
Sean McBride, B. Eng sean@rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada

Hello,

Thank you for reporting this issue. I had naively assumed that Float.MIN_VALUE would represent the minimum value of a Float as opposed to your suggested -Float.MAX_VALUE. Why the choice was made to use this constant name for the precision of a Float and not having Float.MIN_VALUE be defined to be - Float.MAX_VALUE, I do not know, but I will fix this in the HDFView source.

···

________________________________
From: Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org> on behalf of Jonathan JaraAlmonte <jjaraalm@pppl.gov>
Sent: Wednesday, November 22, 2017 9:31:54 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] Bug in hdfview table editor

Hi,

I am using hdfview 3.0 and found an issue with the table editor. For float datasets, you cannot enter and validate a negative number. The issue is in hdf.view.Tools.checkValidFloat where Float.MIN_VALUE is erroneously used instead of -Float.MAX_VALUE as the lower bound for floats. Thanks,

Jonathan Jara-Almonte