X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fdocuments.git;a=blobdiff_plain;f=irc%2F%23ipdf.log;h=7f30435a2d5ebc74466e6a13b53804a456fd1197;hp=38672d1dd1c36e7044814f89b0082391e90d4729;hb=c1fd71ca56efe37b9e00ade51c7a65c433e8371f;hpb=a3d38cdb2f17d3dabd134d59a27bd475e097cfc2 diff --git a/irc/#ipdf.log b/irc/#ipdf.log index 38672d1..7f30435 100644 --- a/irc/#ipdf.log +++ b/irc/#ipdf.log @@ -4461,3 +4461,66 @@ 23:14 < matches> And now I am basically adding random lines of code and running the tester and seeing if it still works :S --- Day changed Fri Sep 12 2014 00:15 < matches> This reminds me of the James Micken comment about addition and multiplication basically being the same thing... +01:19 < matches> Oh my goodness +01:19 < matches> I think ParanoidNumber just worked for one very specific case! +01:19 < matches> ParanoidNumber: 0.3 + 0.3 + 0.3 = 9/10, ToDouble() -> 0.9000000000000000222044604925031308084726 +01:20 < matches> double: 0.3 + 0.3 + 0.3 = 0.9000000000000001332267629550187848508358 +01:20 < matches> And strtod("0.9") = 0.9000000000000000222044604925031308084726 +01:23 < matches> For 0.2+0.2+0.3 = 7/10 it has an error of 1e-16 compared to doubles which apparently have no error +01:24 < matches> But as floats it has an error of 1e-8 compared to 4e-8 +01:24 < matches> Hmm, why does 7.0 / 10.0 give a bigger error than 0.2 + 0.2 + 0.3 +01:24 < matches> Oh +01:24 < matches> It'll be denormals probably +01:25 < matches> That is... quiet irritating +01:27 < matches> So... it is sometimes better than a float but only if there is a full moon and you sacrifice thrice the number of one tenth of unity goats three times +01:28 < matches> The other times it breaks because subtraction is totally FITH +01:29 < matches> Oh, it should be able to do 1/3 + 1/3 + 1/3 except my calculator tester doesn't allow me to enter non decimal numbers +01:32 < matches> I think 0.3+0.3+0.3 is the only thing it can do better than regular floats +01:32 < matches> Woo +01:40 < matches> Ah it is better at beating doubles when it is using doubles as the digit type +01:40 < matches> But it still is sometimes worse if you have a small number of operations +01:40 < matches> Probably because one division is less precise than several additions +01:42 < matches> I'm going to keep telling myself that this is useful +01:42 < matches> After I sleep +01:51 < Pommers> It isn't currently a full moon... +01:51 < Pommers> Also +01:51 < Pommers> Go to bed +11:27 < matches> It was a full moon after I sacrificed the goats +11:40 < Pommers> Stop toying with space matches +--- Day changed Sat Sep 13 2014 +09:25 < unmercifulfish> I feel that the logs for this chat should just be added to qdb +09:25 < unmercifulfish> < matches> It was a full moon after I sacrificed the goats +12:36 < Pommers> Should make a QDB bot for submitting them +16:20 < matches> When sulix is awarded the nobel prize for his work on quad trees, I will be proud to be a part of this channel +16:21 < Pommers> Until then you won't be? +16:23 < matches> I've been thinking of adding a "grep -v matches" before the automatic log commit +17:45 < matches> I am a horrible person +17:45 < matches> I am exploiting that "delete" acting on a NULL pointer has no effect +17:46 < matches> "delete Operation(new ParanoidNumber(a), ADD)" +17:47 < matches> Where Operation will either return the first argument or NULL +17:50 < matches> At the moment I'm very pleased with how cleverly I am about to shoot myself in the foot +17:50 < matches> We'll see how I feel after I pull the trigger +17:53 < matches> I have either written an extremely elegant or an extremely segfaulting function +17:57 < matches> The latter is looking more and more likely +17:57 < matches> But I'm sure there is beauty underneath +17:57 < matches> Like the ugly duckling! +17:59 < matches> There's still hope, it turns out I'm segfaulting way before I even get to that +18:01 < matches> Apparently 2+1 is 6, but doubles think 2+1 is 5 +18:02 < matches> "Freedom is the freedom to say 2+2=4, if that is granted, all else follows" +18:06 < matches> Ok, 1 + 1 is 2 +18:06 < matches> I think we can call that a result +18:06 < matches> Write the thesis and we're done here +22:18 < matches> 1 + 0.3 = 13/10 and 13/10 + 0.2 = Segfault +22:18 < matches> Getting close +22:19 < matches> Now I'm doomed to not sleep until it works because I'm never going to remember how this works +22:20 < Pommers> Got a whiteboard? +22:20 < matches> I do actually but it's in the other room +22:20 < matches> And it does not have space for this +22:22 < matches> I don't think I've ever used so many delete operators... +22:23 < matches> Also constructing a 4 diretional list on the stack then stealing one of the branches +22:23 < matches> It's a game of "dodge the double delete!" +22:24 < matches> Which reminds me, we have copious memory leaks in an external library +22:24 < matches> 'ld' ? +22:25 < matches> /lib/x86_64-linux-gnu/ld-2.19.so +22:25 < matches> Not sure if that's something I'm doing wrong +22:26 < matches> Turns out you can't pipe valgrind's output to less