Bug in hdfview table editor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in hdfview table editor

jjaraalm
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

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Bug in hdfview table editor

Jordan Henderson

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 <[hidden email]> on behalf of Jonathan JaraAlmonte <[hidden email]>
Sent: Wednesday, November 22, 2017 9:31:54 AM
To: [hidden email]
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

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|

Re: Bug in hdfview table editor

Sean McBride
In reply to this post by jjaraalm
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

It likely comes from C/C++:

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

Cheers,

--
____________________________________________________________
Sean McBride, B. Eng                 [hidden email]
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5