MESSAGE
DATE | 2012-02-24 |
FROM | Paul Robert Marino
|
SUBJECT | Subject: [NYLXS - HANGOUT] Re: c++ question about decimals
|
From owner-hangout-outgoing-at-mrbrklyn.com Fri Feb 24 13:38:21 2012 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id E2AFA100BD4; Fri, 24 Feb 2012 13:38:20 -0500 (EST) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id D1BA8100BEB; Fri, 24 Feb 2012 13:38:20 -0500 (EST) Delivered-To: hangout-at-nylxs.com Received: from mail-tul01m020-f175.google.com (mail-tul01m020-f175.google.com [209.85.214.175]) by www2.mrbrklyn.com (Postfix) with ESMTP id 50158100BD4 for ; Fri, 24 Feb 2012 13:38:20 -0500 (EST) Received: by obhx4 with SMTP id x4so4399711obh.34 for ; Fri, 24 Feb 2012 10:36:50 -0800 (PST) Received-SPF: pass (google.com: domain of prmarino1-at-gmail.com designates 10.182.36.106 as permitted sender) client-ip=10.182.36.106; Authentication-Results: mr.google.com; spf=pass (google.com: domain of prmarino1-at-gmail.com designates 10.182.36.106 as permitted sender) smtp.mail=prmarino1-at-gmail.com; dkim=pass header.i=prmarino1-at-gmail.com Received: from mr.google.com ([10.182.36.106]) by 10.182.36.106 with SMTP id p10mr1258813obj.55.1330108610318 (num_hops = 1); Fri, 24 Feb 2012 10:36:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=aTrbj/uLC9vlr9AUQ9Av4a4DuWCrfc07v8G9legX+YA=; b=qHEPY6haGqKFBnDykiox01eLvJWtWj0FkXCm43p1ibRPf3SE7D/1UL2cRuKWmUgUjG r/ANZYbUzmjCU9OoSz5Vu20bm7DvL3Z226zYh7MHQrXP/z+uEucHKVJBoWoD7pWvnmOY qsu2MsY0jOty3ykS5n36EwmUcnhOcXeVBvl3w= MIME-Version: 1.0 Received: by 10.182.36.106 with SMTP id p10mr1086392obj.55.1330108610263; Fri, 24 Feb 2012 10:36:50 -0800 (PST) Received: by 10.182.72.135 with HTTP; Fri, 24 Feb 2012 10:36:50 -0800 (PST) Received: by 10.182.72.135 with HTTP; Fri, 24 Feb 2012 10:36:50 -0800 (PST) In-Reply-To: References: Date: Fri, 24 Feb 2012 13:36:50 -0500 Message-ID: Subject: [NYLXS - HANGOUT] Re: c++ question about decimals From: Paul Robert Marino To: hangout-at-nylxs.com Content-Type: multipart/alternative; boundary=f46d04447eeb3a3c1304b9ba0b05 Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: hangout-at-mrbrklyn.com
--f46d04447eeb3a3c1304b9ba0b05 Content-Type: text/plain; charset=ISO-8859-1
In case any one wants to know it worked and my code has been tested and the patch has been submitted to the keepalived-devel mailing list with my employer blessing I love working for places that understand the importance contibuting to the gpl code they use :) On Feb 24, 2012 9:33 AM, "Paul Robert Marino" wrote:
> actually after looking into this further what i really need to do is > grab just the remainder of the result of dividing 2 numbers I think > fmod is the answer im looking for > > > On Fri, Feb 24, 2012 at 12:48 AM, Paul Robert Marino > wrote: > > my C programmings a little rusty and i could use some help > > im working on a patch for keepalived i have to modify a portion of the > > code that type casts several variables as a unsigned long however I > > need to change it to an equivalent the will store it with a decimal > > with 2 points of precision, and if possible wont change how other > > parts of the code use the same functions with whole numbers does any > > one have any suggestions. > > > > by the way in case any one is wondering im working on implementing > > centisecond (hundredth) of a second intervals for VRRP per the RFC for > > VRRPv3 http://tools.ietf.org/html/rfc5798 > > so far its going well but there are a few points in the code that are > > doing crazy things like setting a sleep timer to 0 seconds which is > > what I'm trying to fix now. that being said the rest of the patch > > works great i was able to cut my interface failover times in nearly > > down from 8 to less than 3 seconds total. >
--f46d04447eeb3a3c1304b9ba0b05 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
In case any one wants to know it worked and my code has been tested and = the patch has been submitted to the keepalived-devel mailing list with my e= mployer blessing
I love working for places that understand the importance contibuting to the= gpl code they use :)
On Feb 24, 2012 9:33 AM, "Paul Robert Marin= o" < prmarino1-at-gmail.com&= gt; wrote: =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> actually after looking into this further what i really need to do is
grab just the remainder of the result of dividing 2 numbers I think
fmod is the answer im looking for
On Fri, Feb 24, 2012 at 12:48 AM, Paul Robert Marino
<prmarino1-at-gmail.com> wrot= e:
> my C programmings a little rusty and i could use some help
> im working on a patch for keepalived i have to modify a portion of the=
> code that type casts several variables as a unsigned long however I > > need to change it to an equivalent the will store it with a decimal > > with 2 points of precision, and if possible wont change how other
> parts of the code use the same functions with whole numbers does anyr> > one have any suggestions.
>
> by the way in case any one is wondering im working on implementing
> centisecond (hundredth) of a second intervals for VRRP per the RFC for=
> VRRPv3 ">http://tools.ietf.org/html/rfc5798
> so far its going well but there are a few points in the code that are<= br> > doing crazy things like setting a sleep timer to 0 seconds which is > > what I'm trying to fix now. that being said the rest of the patch<= br> > works great i was able to cut my interface failover times in nearly > > down from 8 to less than 3 seconds total.
--f46d04447eeb3a3c1304b9ba0b05--
--f46d04447eeb3a3c1304b9ba0b05 Content-Type: text/plain; charset=ISO-8859-1
In case any one wants to know it worked and my code has been tested and the patch has been submitted to the keepalived-devel mailing list with my employer blessing I love working for places that understand the importance contibuting to the gpl code they use :) On Feb 24, 2012 9:33 AM, "Paul Robert Marino" wrote:
> actually after looking into this further what i really need to do is > grab just the remainder of the result of dividing 2 numbers I think > fmod is the answer im looking for > > > On Fri, Feb 24, 2012 at 12:48 AM, Paul Robert Marino > wrote: > > my C programmings a little rusty and i could use some help > > im working on a patch for keepalived i have to modify a portion of the > > code that type casts several variables as a unsigned long however I > > need to change it to an equivalent the will store it with a decimal > > with 2 points of precision, and if possible wont change how other > > parts of the code use the same functions with whole numbers does any > > one have any suggestions. > > > > by the way in case any one is wondering im working on implementing > > centisecond (hundredth) of a second intervals for VRRP per the RFC for > > VRRPv3 http://tools.ietf.org/html/rfc5798 > > so far its going well but there are a few points in the code that are > > doing crazy things like setting a sleep timer to 0 seconds which is > > what I'm trying to fix now. that being said the rest of the patch > > works great i was able to cut my interface failover times in nearly > > down from 8 to less than 3 seconds total. >
--f46d04447eeb3a3c1304b9ba0b05 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
In case any one wants to know it worked and my code has been tested and = the patch has been submitted to the keepalived-devel mailing list with my e= mployer blessing
I love working for places that understand the importance contibuting to the= gpl code they use :)
On Feb 24, 2012 9:33 AM, "Paul Robert Marin= o" < prmarino1-at-gmail.com&= gt; wrote: =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> actually after looking into this further what i really need to do is
grab just the remainder of the result of dividing 2 numbers I think
fmod is the answer im looking for
On Fri, Feb 24, 2012 at 12:48 AM, Paul Robert Marino
<prmarino1-at-gmail.com> wrot= e:
> my C programmings a little rusty and i could use some help
> im working on a patch for keepalived i have to modify a portion of the=
> code that type casts several variables as a unsigned long however I > > need to change it to an equivalent the will store it with a decimal > > with 2 points of precision, and if possible wont change how other
> parts of the code use the same functions with whole numbers does anyr> > one have any suggestions.
>
> by the way in case any one is wondering im working on implementing
> centisecond (hundredth) of a second intervals for VRRP per the RFC for=
> VRRPv3 ">http://tools.ietf.org/html/rfc5798
> so far its going well but there are a few points in the code that are<= br> > doing crazy things like setting a sleep timer to 0 seconds which is > > what I'm trying to fix now. that being said the rest of the patch<= br> > works great i was able to cut my interface failover times in nearly > > down from 8 to less than 3 seconds total.
--f46d04447eeb3a3c1304b9ba0b05--
|
|