Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #3655
| Newsgroups | comp.programming |
|---|---|
| Date | 2013-08-14 10:35 -0700 |
| References | <f172a947-71c3-406b-8481-b73c8dbd8421@googlegroups.com> <0.f80b72e5b5ab6c2b75ca.20130814182335BST.878v04jieg.fsf@bsb.me.uk> |
| Message-ID | <f8fecc24-924e-4d12-b4d2-85c558ec3d2e@googlegroups.com> (permalink) |
| Subject | Re: Adding double-float values together |
| From | industrial_one@hotmail.com |
On Wednesday, August 14, 2013 5:23:35 PM UTC, Ben Bacarisse wrote: > industrial_one@hotmail.com writes: > > > > > I have two sets of network log files that store the amount of bytes > > > downloaded and uploaded each day in two 8-byte double-floats. > > > > > > I have two sets of them, one from 2 computers that I used over the > > > last couple years and I wanna combine them (add the values together) > > > but I haven't figured an automated way to do this and I have no coding > > > skills. I don't know know WHY the author of this program would store > > > integer data in a god damn FLOAT. It's so stupid. > > > > > > Here's a sample of the log file from 2008. > > > > > > 0000000000000000 0000000000000000 > > > 0000000000000000 0000000000000000 > > > 0000000000000000 0000000000000000 > > > 0000403F14AAD541 00000026DF35D041 > > > 000080D33CCAD141 000080C31144DA41 > > > 000000289E3BB241 0000001C498D9441 > > > 000000880375B041 000000E030108A41 > > > 000040913028D041 0000001A6682C541 > > > 000080783682C641 000000CDC930BF41 > > > 000080B1A3F6C441 0000002ED7E1B441 > > > 0000004849A4A841 00000098031B8141 > > > 0000008C815DA941 00000054650CA141 > > > 0000001799F2B641 00000032B93BA641 > > > 000000E2E486C541 000000C8D729B741 > > > 000080A0FBF1D241 0000800716D2C841 > > > 00000025674EB741 000000FEB7C8B541 > > > 000000FE14BAB541 000000DA1A12BA41 > > > 00000007F0D5C141 000000D7C3E5B641 > > > 000000B0410A9141 000000C0EA0C5A41 > > > > > > Left column is downloaded bytes, right column is uploaded. The first > > > 3 are empty because on January 1 2 and 3 I was absent and my computer > > > was off so 0 bytes transferred those days. > > > > Using some reasonable assumptions, those hex strings turn into these > > floating point values: > > > > 0 0 > > 0 0 > > 0 0 > > 1.45387e+09 1.08786e+09 > > 1.19387e+09 1.76267e+09 > > 3.05897e+08 8.62009e+07 > > 2.76104e+08 5.46586e+07 > > 1.08428e+09 7.21735e+08 > > 7.55265e+08 5.23291e+08 > > 7.03416e+08 3.50345e+08 > > 2.0671e+08 3.58729e+07 > > 2.12779e+08 1.43013e+08 > > 3.84998e+08 1.86506e+08 > > 7.22324e+08 3.88618e+08 > > 1.27139e+09 8.32843e+08 > > 3.91014e+08 3.65476e+08 > > 3.64517e+08 4.37394e+08 > > 5.98467e+08 3.84157e+08 > > 7.14712e+07 6.82897e+06 > > > > Does these numbers look about right? That is correct. The first non-zero number is 1.45 GiB. > > > > I don't have values to add for that month because I only had one > > > computer back then but starting mid-2008 there was internet activity > > > on both computers and since I use only one now I wanna add the values > > > together. > > > > > > Any way I can do this quickly? > > > > In what language, using what other tools? For example, it's a few > > lines of C to convert the files to ASCII floating point, and then Linux > > tools like paste and awk can do the adding up. > > > > (The code to do the conversion above available on request, but it's not > > really relevant unless you can use C, so I won't post it now). > > > > -- > > Ben. I'm using Windows, I have no problem running a CMD tool to add the floats up or compiling your code myself if it's compilable under MSV studio 6.0 (I hate the modern versions). You said your code just converts it to ASCII though, in that case as long as it can convert it back to its original form, I have no problem adding the values together in Excel.
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Adding double-float values together industrial_one@hotmail.com - 2013-08-14 09:40 -0700
Re: Adding double-float values together Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-14 18:23 +0100
Re: Adding double-float values together industrial_one@hotmail.com - 2013-08-14 10:35 -0700
Re: Adding double-float values together Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-14 19:22 +0100
Re: Adding double-float values together industrial_one@hotmail.com - 2013-08-14 12:20 -0700
Re: Adding double-float values together Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-15 02:05 +0100
Re: Adding double-float values together Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-15 02:36 +0100
Re: Adding double-float values together industrial_one@hotmail.com - 2013-08-14 18:42 -0700
Re: Adding double-float values together Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-15 03:04 +0100
Re: Adding double-float values together industrial_one@hotmail.com - 2013-08-14 21:17 -0700
Re: Adding double-float values together Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-08-15 08:39 -0700
Re: Adding double-float values together Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-15 17:02 +0100
Re: Adding double-float values together industrial_one@hotmail.com - 2013-08-16 02:25 -0700
Re: Adding double-float values together Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-08-16 12:45 +0100
Re: Adding double-float values together industrial_one@hotmail.com - 2013-08-20 01:55 -0700
Re: Adding double-float values together Jongware <jongware@no-spam.plz> - 2013-08-20 12:40 +0200
Re: Adding double-float values together "Julio Di Egidio" <julio@diegidio.name> - 2013-08-20 20:53 +0100
Re: Adding double-float values together Robert Miles <milesrf@Usenet-News.net> - 2013-08-24 09:22 -0500
Re: Adding double-float values together "Julio Di Egidio" <julio@diegidio.name> - 2013-08-24 15:49 +0100
csiph-web