Just want to point out that 0.0 or -0.0 can give vastly different floating point results, such as in 1/x. But it's probably not relevant for this case.
On Fri, Feb 21, 2014 at 2:47 PM, Eduardo Jauch > <eduardo.jauch@ist.utl.pt <mailto:eduardo.jauch@ist.utl.pt>> wrote:
聽聽聽聽Hello Matthieu,
聽聽聽聽I think you're right.
聽聽聽聽After inspecting the code, it fails not because of the -0.0, but
聽聽聽聽because of a problem associated with an "access violation", and
聽聽聽聽HDF's with only "positive" zeroes also causes the program to crash-
聽聽聽聽Strangely the error happens only when I read HDF's in 32 bit
聽聽聽聽compiled programs.
聽聽聽聽But there is a lot o things that can be causing this.
聽聽聽聽But most probably is something associated with compilation options
聽聽聽聽or exxternal libraries used. The code used to work in 32 bits and
聽聽聽聽recently we changed the compiler.
聽聽聽聽I'll update it (the compiler) and see if it fix this issue with
聽聽聽聽the 32 bit version.
聽聽聽聽Thanks!
聽聽聽聽Eduardo
聽聽聽聽聽聽聽聽聽聽TECNICO Lisboa - MARETEC
聽聽聽聽Sec锟斤拷o de Ambiente e Energia
聽聽聽聽Av. Rovisco Pais
聽聽聽聽1049-001 Lisboa
聽聽聽聽Tel.:+351 21 8419425 <tel:%2B351%2021%208419425>
聽聽聽聽Fax:+351 21 8417365 <tel:%2B351%2021%208417365>
聽聽聽聽URL:www.mohid.com <http://www.mohid.com>
聽聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽<http://www.ist.utl.pt>
聽聽聽聽<http://www.mohid.com>
聽聽聽聽Em 21-02-2014 13 <tel:21-02-2014%2013>:24, Matthieu Brucher escreveu:
聽聽聽聽If your code fails with those values, then something is
聽聽聽聽definitely wrong in your code. 0.0 and -0.0 behaves the same in
聽聽聽聽floating point computations.
聽聽聽聽You can check the binary representation of the data, just to
聽聽聽聽check that it really is 0, and not some other small negative value.
聽聽聽聽Cheers,
聽聽聽聽Matthieu
聽聽聽聽2014-02-21 13:16 GMT+00:00 Eduardo Jauch
聽聽聽聽<eduardo.jauch@ist.utl.pt <mailto:eduardo.jauch@ist.utl.pt>>:
聽聽聽聽聽聽聽聽Hello Matthieu,
聽聽聽聽聽聽聽聽The problem is that if I set the values of an array to 0.0,
聽聽聽聽聽聽聽聽how is it possible that it to be interpreted as -0.0?
聽聽聽聽聽聽聽聽And unfortunatelly, it seems it matter. The code that uses
聽聽聽聽聽聽聽聽this data works if compiled to 64 bits, but fails if compiled
聽聽聽聽聽聽聽聽to 32 bits...
聽聽聽聽聽聽聽聽Cheers,
聽聽聽聽聽聽聽聽Eduardo.
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽TECNICO Lisboa - MARETEC
聽聽聽聽聽聽聽聽Sec锟斤拷o de Ambiente e Energia
聽聽聽聽聽聽聽聽Av. Rovisco Pais
聽聽聽聽聽聽聽聽1049-001 Lisboa
聽聽聽聽聽聽聽聽Tel.:+351 21 8419425 <tel:%2B351%2021%208419425>
聽聽聽聽聽聽聽聽Fax:+351 21 8417365 <tel:%2B351%2021%208417365>
聽聽聽聽聽聽聽聽URL:www.mohid.com <http://www.mohid.com>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽<http://www.ist.utl.pt>
聽聽聽聽聽聽聽聽<http://www.mohid.com>
聽聽聽聽聽聽聽聽Em 21-02-2014 12 <tel:21-02-2014%2012>:37, Matthieu Brucher >> escreveu:
聽聽聽聽聽聽聽聽Hi,
聽聽聽聽聽聽聽聽0 can be represented as 0.0 and -0.0 in floating point
聽聽聽聽聽聽聽聽representation. Your actual data has both, that's all. It
聽聽聽聽聽聽聽聽doesn't matter.
聽聽聽聽聽聽聽聽Cheers,
聽聽聽聽聽聽聽聽Matthieu
聽聽聽聽聽聽聽聽2014-02-21 12:22 GMT+00:00 Eduardo Jauch
聽聽聽聽聽聽聽聽<eduardo.jauch@ist.utl.pt <mailto:eduardo.jauch@ist.utl.pt>>:
聽聽聽聽聽聽聽聽聽聽聽聽Hello
聽聽聽聽聽聽聽聽聽聽聽聽I'm generating some HDF files and in many datasets, when
聽聽聽聽聽聽聽聽聽聽聽聽I open with HDFView, some of the values are set to -0.0,
聽聽聽聽聽聽聽聽聽聽聽聽but they should be 0.0.
聽聽聽聽聽聽聽聽聽聽聽聽Anyone found this already?
聽聽聽聽聽聽聽聽聽聽聽聽Some hint on what can be?
聽聽聽聽聽聽聽聽聽聽聽聽Best regards,
聽聽聽聽聽聽聽聽聽聽聽聽Eduardo Jauch
聽聽聽聽聽聽聽聽聽聽聽聽--
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽TECNICO Lisboa - MARETEC
聽聽聽聽聽聽聽聽聽聽聽聽Sec锟斤拷o de Ambiente e Energia
聽聽聽聽聽聽聽聽聽聽聽聽Av. Rovisco Pais
聽聽聽聽聽聽聽聽聽聽聽聽1049-001 Lisboa
聽聽聽聽聽聽聽聽聽聽聽聽Tel.:+351 21 8419425 <tel:%2B351%2021%208419425>
聽聽聽聽聽聽聽聽聽聽聽聽Fax:+351 21 8417365 <tel:%2B351%2021%208417365>
聽聽聽聽聽聽聽聽聽聽聽聽URL:www.mohid.com <http://www.mohid.com>
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽聽聽聽聽聽<http://www.ist.utl.pt>
聽聽聽聽聽聽聽聽聽聽聽聽<http://www.mohid.com>
聽聽聽聽聽聽聽聽聽聽聽聽_______________________________________________
聽聽聽聽聽聽聽聽聽聽聽聽Hdf-forum is for HDF software users discussion.
聽聽聽聽聽聽聽聽聽聽聽聽Hdf-forum@lists.hdfgroup.org
聽聽聽聽聽聽聽聽聽聽聽聽<mailto:Hdf-forum@lists.hdfgroup.org>
聽聽聽聽聽聽聽聽聽聽聽聽http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
聽聽聽聽聽聽聽聽-- Information System Engineer, Ph.D.
聽聽聽聽聽聽聽聽Blog: http://matt.eifelle.com
聽聽聽聽聽聽聽聽LinkedIn: http://www.linkedin.com/in/matthieubrucher
聽聽聽聽聽聽聽聽Music band: http://liliejay.com/
聽聽聽聽聽聽聽聽_______________________________________________
聽聽聽聽聽聽聽聽Hdf-forum is for HDF software users discussion.
聽聽聽聽聽聽聽聽Hdf-forum@lists.hdfgroup.org <mailto:Hdf-forum@lists.hdfgroup.org>
聽聽聽聽聽聽聽聽http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
聽聽聽聽聽聽聽聽_______________________________________________
聽聽聽聽聽聽聽聽Hdf-forum is for HDF software users discussion.
聽聽聽聽聽聽聽聽Hdf-forum@lists.hdfgroup.org
聽聽聽聽聽聽聽聽<mailto:Hdf-forum@lists.hdfgroup.org>
聽聽聽聽聽聽聽聽http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
聽聽聽聽-- Information System Engineer, Ph.D.
聽聽聽聽Blog: http://matt.eifelle.com
聽聽聽聽LinkedIn: http://www.linkedin.com/in/matthieubrucher
聽聽聽聽Music band: http://liliejay.com/
聽聽聽聽_______________________________________________
聽聽聽聽Hdf-forum is for HDF software users discussion.
聽聽聽聽Hdf-forum@lists.hdfgroup.org <mailto:Hdf-forum@lists.hdfgroup.org>
聽聽聽聽http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
聽聽聽聽_______________________________________________
聽聽聽聽Hdf-forum is for HDF software users discussion.
聽聽聽聽Hdf-forum@lists.hdfgroup.org <mailto:Hdf-forum@lists.hdfgroup.org>
聽聽聽聽http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org