> On Jun 4, 2022, at 9:25 AM, Linus Torvalds via subsurface
> <subsurface@subsurface-divelog.org> wrote:
>
> On Sat, Jun 4, 2022 at 6:24 AM Robert Helling via subsurface
> <subsurface@subsurface-divelog.org> wrote:
>>
>> I created a pull request that fixes this problem:
>> https://github.com/subsurface/subsurface/pull/3462
>
> Does it really make sense to show negative stop-times at all?
>
> Wouldn't it make more sense to just make analyzeVariations() return 0
> instead of negative values?
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...
/D
_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface