On Thu, Sep 1, 2011 at 6:18 PM, Wes Hardaker <harda...@users.sourceforge.net> wrote: >>>>>> On Thu, 1 Sep 2011 16:35:39 +0100, Dave Shield >>>>>> <d.t.shi...@liverpool.ac.uk> said: > > DS> - return (int)( value * 100 / total ); > DS> + return (int)( value / (total/100) ); > DS> } > > DS> I'd like to see this included in 5.7.1 > DS> Votes please.... > > +1. Though it's subject to rounding errors that way. Either way you > loose something.
The loss of precision for small values of "value" and "total" can be avoided by using the new formula only if these values are large. Bart. ------------------------------------------------------------------------------ Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free "Love Thy Logs" t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders