CMA-ES / moarchiving

A bi-objective nondominated archive class
Other
2 stars 3 forks source link

Warnings about precision loss although using floats #3

Open brockho opened 4 years ago

brockho commented 4 years ago

When using floats instead of the Fractions.Fraction as suggested in 32, I get a lot of the following warnings:

/home/labcmap/dimo.brockhoff/anaconda3/lib/python3.7/site-packages/moarchiving/moarchiving.py:699: UserWarning: _subtract_HV: -0.259157 + 39934256605.838646 loses many digits of precision
  % (dHV, self._hypervolume))
/home/labcmap/dimo.brockhoff/anaconda3/lib/python3.7/site-packages/moarchiving/moarchiving.py:731: UserWarning: _subtract_HV: 0.236798 + 39934256605.579491 loses many digits of precision
  % (dHV, self._hypervolume))

After checking quickly with @nikohansen, we agreed that these messages should not be issued when using float.

nikohansen commented 4 years ago

Looking at the code, the messages are actual warnings for the case when float is used.

They may be too restrictive though, but this needs some further investigation.