New config feature - time1 can declare GPS wraparound compensation

Sanjeev Gupta ghane0 at gmail.com
Fri Aug 16 21:27:17 UTC 2019


Gary,

On my 32 bit x86, gcc 8

Size of int: 4 bytesSize of long int: 4 bytesSize of long long int: 8
bytesSize of float: 4 bytesSize of double: 8 bytesSize of long double:
12 bytesSize of char: 1 byte

I have cast explicitly to (long double), please review:

https://gitlab.com/NTPsec/ntpsec/merge_requests/1015
-- 
Sanjeev Gupta
+65 98551208     http://www.linkedin.com/in/ghane


On Sat, Aug 17, 2019 at 5:05 AM Gary E. Miller via devel <devel at ntpsec.org>
wrote:

> Yo Eric!
>
> On Fri, 16 Aug 2019 17:01:02 -0400
> "Eric S. Raymond via devel" <devel at ntpsec.org> wrote:
>
> > Sanjeev Gupta <ghane0 at gmail.com>:
> > > Eric,
> > >
> > > sizeof(double) seems to be 8 bytes.  The 8192 * No of Secs per week
> > > overflows this.
> >
> > Huh. If "long double" isn't 16 bytes, we're foing to have a problem.
>
> How about "long long int"?
>
> RGDS
> GARY
> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
>         gem at rellim.com  Tel:+1 541 382 8588
>
>             Veritas liberabit vos. -- Quid est veritas?
>     "If you can't measure it, you can't improve it." - Lord Kelvin
> _______________________________________________
> devel mailing list
> devel at ntpsec.org
> http://lists.ntpsec.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20190817/35762f36/attachment.htm>


More information about the devel mailing list