Warnings (was: Subsurface libdivecomputer branch merged with upstream..)

Lubomir I. Ivanov neolit123 at gmail.com
Fri Dec 15 06:04:49 PST 2017


On 15 December 2017 at 11:24, Berthold Stoeger
<bstoeger at mail.tuwien.ac.at> wrote:
> On Mittwoch, 13. Dezember 2017 23:34:32 CET Dirk Hohndel wrote:
>> > On Dec 13, 2017, at 11:31 AM, Berthold Stoeger
>
> Concerning the float warning, I have a patch that turns all float calculations
> into double calculations sitting around for a few weeks. I think float is like
> short: only to be used in very specific circumstances. But I'll let the pros
> decide.
>

i would post the patch as a PR.
'float' is more like 'int' (32bit), so it's good to have a small data
type with less precision and not always rely on 'double' or (64bit
long).

as a rule of thumb on the "double vs float" topic:
- the compiler *should* SSE-optimize a range of floats more easily
- in terms of speed and the x87, it shouldn't matter that much
- floats take less space in memory

lubomir
--


More information about the subsurface mailing list