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 <[email protected]>:

>  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 <[email protected]>:
>
>>  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.
>> [email protected]
>>
>> 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 
> [email protected]http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
>
>
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
>
> 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/

<<inline: image/png>>

<<inline: maretec_logo.png>>

<<inline: image/jpeg>>

<<inline: tecnico_logo.png>>

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to