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
Fax: +351 21 8417365
URL: www.mohid.com
<http://www.ist.utl.pt>
<http://www.mohid.com>
Em 21-02-2014 13: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>:
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
Fax: +351 21 8417365
URL: www.mohid.com
<http://www.ist.utl.pt>
<http://www.mohid.com>
Em 21-02-2014 12: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>:
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
Fax: +351 21 8417365
URL: 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
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
--
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: Matthieu Brucher - Squarepoint Capital | LinkedIn
Music band: http://liliejay.com/
_______________________________________________
Hdf-forum is for HDF software users discussion.Hdf-forum@lists.hdfgroup.orghttp://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
--
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: Matthieu Brucher - Squarepoint Capital | LinkedIn
Music band: http://liliejay.com/
_______________________________________________
Hdf-forum is for HDF software users discussion.Hdf-forum@lists.hdfgroup.orghttp://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