Planner-Bug-Candidate: Stop-Times

Robert Helling helling at atdotde.de
Sat Jun 4 14:15:56 PDT 2022


Good evening,

> On 4. Jun 2022, at 22:38, Dirk Hohndel <dirk at hohndel.org> wrote:
> 
> Yes. Negative time makes me twitchy...
> 
>> And yes, the reason 'FRACTION()' does that explicit unsigned thing is
>> because negative values don't have sane well-defined behavior wrt
>> division and modulus in C (ie the division rounding towards zero will
>> then cause a negative fractional value).
>> 
>> Your SIGNED_FRACTION() avoids that problem, but it does seem a bit
>> questionable to ever show negative values in things that want
>> fractions (which are generally physical units: time, depth, things
>> like that).
> 
> I think I have to agree with that. This is mathematically sane, but I question the practicality…


please note it’s not negative stop times but negative time differences: In those particular circumstances, you have to do 13 seconds less decompression stops for every minute you further spend at 10m. This totally makes sense to me (I admit it’s a rare situation that deco stops get shorter for extended bottom time) and also displaying the 13 seconds as 0:13 (which is the output of FRACTION or  SIGNED_FRAC in that case) seems the natural way to me.

Best
Robert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20220604/1d48ec87/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20220604/1d48ec87/attachment.sig>


More information about the subsurface mailing list