« first day (251 days earlier)      last day (4250 days later) » 

12:18 AM
@ℛ.ℳ Block[{Internal`$EqualTolerance = -Infinity}, (1.1 + 1.1 + 1.1) > 3.3]
Interesting. I did not know this tolerance was applied for relational operators other than == and ===
Though I suppose it makes sense. Having it both equal and greater would not be good.
 
My "reputation" is approaching a nice round number. I expect you all to throw me a party. ;^)
 
12:34 AM
@Mr.Wizard As far as I can tell you're nowhere near 2^2^2^2, but if you come out for the conference we can go to Jarlings.
You now need to have at least 4K rep to be on the first page of users.
 
1:00 AM
@halirutan Here, the space in between + and 1.1 matters. ;)
@OleksandrR. There's also Internal`$SameQTolerance...
 
@J.M. yup. But no Internal`$LessTolerance...
 
Yeah, I suppose it's all a matter of checking "are they the same? if not, what's the sign of their difference?"
 
1:12 AM
@J.M. do you know any convenient identity for Log[Cosh[x]] that doesn't give numerical problems for very large x? I was thinking of this, specifically.
To tell the truth I am getting discouraged over it. He started from completely the wrong place in asking about parallelization whereas checking the function is well enough behaved would have IMO been more preferable.
 
@OleksandrR. Oh joy, hyperbolics within logs are a pain... let me think.
On the other hand, since $\cosh\,x \asymp \frac12\exp\,x$, there's a convenient approximation in the large...
 
@J.M. well, I figured that already, and a Padé approximant is okay for small arguments. The problem is joining the two up.
I was hoping you might have an idea for an identity that doesn't involve piecewise approximations. :)
 
@OleksandrR. ...and you've hit on the usual problem of people who write routines for special functions. :)
 
@OleksandrR. What do you think they are doing internally, when they don't use the machine > for comparison?
 
In any event, the problem could be reduced to implementing $\log(\exp\,x\pm 1)$ sans overflow and/or cancellation.
 
1:28 AM
How do they manage to make 1.1+1.1+1.1>3.3 return false?
 
@halirutan I'd guess the same machinery behind N[]...
 
@halirutan an unfortunate consequence of having 1.1 + 1.1 + 1.1 == 3.3 return True.
 
"adaptive precision" and such, if we are to believe the docs on this.
Well, (1.1 + 1.1 + 1.1) - 3.3 is "sufficiently tiny", whatever that means...
 
@J.M. no, adaptive precision and significance arithmetic are not that bad. It is a quasi-analytic first order approximation of the error, which works surprisingly well provided you add a few extra digits of working precision for luck.
 
@OleksandrR. Ok, but in compiled functions they use double
 
1:31 AM
@OleksandrR. I didn't say it was bad; halirutan was asking how Less[] might work, and if my reading of the docs is correct, the relational operators use the same machinery as N[].
 
@J.M. yes, the actual function has Log[Exp[-x] + Exp[x]] but I felt Cosh was easier to deal with.
@J.M. okay. Well, AIUI, that's not correct. I think the documentation is very unclear on how numerics work in general.
 
@OleksandrR. Not that much simpler, except maybe the writing is shorter. :)
 
@J.M. easier to look up identities on Wolfram Functions, anyway. :) (Didn't find any.)
 
@OleksandrR. Yes, I wish the precision handling could be made less mysterious...
@OleksandrR. Heh. Yeah, I think patching up the asymptotics and the Padé approximant is the best you can do at the moment... I'm drawing a blank on the sets of identities I'm aware of.
 
@J.M. what really irks me is that they removed useful information in more recent versions in favor of a more black-box approach.
 
1:36 AM
@OleksandrR. Ah, I miss that. IIRC Paul Abbott wrote something nice as well. Too bad it was no longer applicable starting with version 5. Architecture changes, I guess.
@halirutan: still running my stuff; I'll get back to you later on the FTP bit.
 
@OleksandrR. @J.M. Let me clear my point. Maybe I have too less experience in this: When you compile a function down to "C" the data-type they are using is a simple double or float. What they do is to call a special comparison function. Lets say I compute 1.1+1.1+1.1 and look at the bit pattern and I want to compare it with the bitpattern of 3.3: it is obviously not the same, because the calculation and the roundoff error happened before. So how can they return False?
This here:
g = Compile[{{a, _Real, 0}, {b, _Real, 0}},
 (a + a + a) > b,
  CompilationTarget -> "C"]
<< CCodeGenerator`
CCodeStringGenerate[g, "fun"]
 
@halirutan I don't think it's any different than just calling Less or Equal at the top level, is it?
 
@OleksandrR. No, I don't think so but in "C" we really see that there happens no special thing except of the comparison itself
mbool B0_ 0;
mreal R0_ 0;
mreal R0_ 1;
mreal R0_ 2;
R0_ 0 = A1;
R0_ 1 = A2;
R0_ 2 = R0_ 0 + R0_ 0 + R0_ 0;
{
mreal S0[2];
S0[0] = R0_ 2;
S0[1] = R0_ 1;
B0_ 0 = funStructCompile->Compare_R(7, R0_ 3, 2, S0);
}
 
@halirutan yes, sure. Well, I think that makes sense. Not sure what the 7 and the 2 mean.
 
Yes, I'd say Mathematica and your favorite compiler would treat relational operators differently...
 
1:44 AM
@J.M. Yes, because, as expected, if you substitute a normal > there, you get True ;-)
As I said, at the point of the comparison they have only the different binary representations of R0_ and S0_.
 
@halirutan personally I'm not keen on this behavior being carried over to compiled code. But, it is what it is, I suppose.
 
Compare_R() is in the WolframCompileLibrary header file, right?
 
So how they can possibly decide wether R0 and So should be equal?
 
@halirutan mask off the last 7 bits of the significand, see if they match... if they do, it's good enough for government work!
I suppose the 7 means 7 bits? Though not necessarily, of course.
 
@OleksandrR. Cool, I was afraid of that.
Yes, maybe..
Maybe it just means, return false no matter what.
 
1:49 AM
Anyway, the tolerance is 7 bits. Log[10] Internal`$EqualTolerance/Log[2] == 7
 
@J.M. No, to the functions they use when you compile something down you don't have direct access.
You don't know what the parameters mean.
 
Tsk, tsk. Black box.
 
Okay, Looking at CCodeGenerator.m, the 7 is the tolerance.
 
@OleksandrR. Thanks, that helps. I've always assumed that machine precision numbers would behave exactly as a double in other systems, but never came across a case where the output differed... it's all the more confusing that the tolerance used is that of a single
@halirutan I tried compiling it to C, but still gave me false... I don't know C, so the output from CompiledPrint didn't make much sense :P
(I only use it to check if there's a MainEvaluate hanging around :D)
 
@ℛ.ℳ hm? Doubles have a 53-bit significand; minus 7 gives 46 bits. A single has a 23-bit significand.
 
2:01 AM
@ℛ.ℳ Yes, because they use there special comparison even in compiled C code.
Try the following:
 
@OleksandrR. Oh, 7 bits... sorry, was reading quickly. I thought 7 decimal digits
 
src = "
  #include \"WolframLibrary.h\"

  DLLEXPORT mint WolframLibrary_getVersion(){
    return WolframLibraryVersion;
  }

  DLLEXPORT int WolframLibrary_initialize( WolframLibraryData
libData) {
  	return 0;
  }

  DLLEXPORT void WolframLibrary_uninitialize( WolframLibraryData
libData) {
  	return;
  }

  DLLEXPORT int cmp(WolframLibraryData libData,
  			mint Argc, MArgument *Args, MArgument Res) {
  	mreal I0;
  	mreal I1;
  	I0 = MArgument_getReal(Args[0]);
  	I1 = MArgument_getReal(Args[1]);
@ℛ.ℳ Note the (I0+I0+I0)>I1 where I use the machine comparison.
 
@halirutan Neat! Thanks for the help @halirutan @OleksandrR. @J.M. :)
 
Error in Sin@Log[x^2]. Points: Monte Carlo. Yellow: analytic 1st-order. Green: analytic 2nd-order. Red: significance arithmetic.
 
@OleksandrR. It's the error compared to the true Sin[Log[x^2]]?
 
2:16 AM
@halirutan the error assuming an uncertain x, sorry.
Sorry again... I do significance arithmetic a disservice here by using a WorkingPrecision of 1. It should look like this:
 
@OleksandrR. I'm definitely too less experienced in this area; meaning I have really no plan about error calculation of approximations. Maybe you should write a blog post one day.
 
@halirutan yeah, may be a good idea. It is really easy. Just Taylor-expand the covariance matrix.
Actually, it's a very nice demonstration of Mathematica's support for tensors of any order as well. Otherwise it would be more tricky.
Okay, time for me to go. Goodnight!
 
@OleksandrR. Ah, better. I was scratching my head on why the red curve was so rough...
 
@OleksandrR. Good night.
 
Good night!
Hmm, I had no idea there was a lot of research on reassembling shredded documents with image processing. I wonder if anybody's ever used Mathematica for this...
 
2:42 AM
@J.M. If you have shredded paper.. who turns, de-folds and scans the small parts? I mean, that must be a lot of work anyway. You could just start puzzling by yourself then.
Ok, 4:49:36 am. Time for me too to collect my wife from the couch and carry her to bed. Good night all.
 
3:00 AM
@halirutan I don't really have shredded docs; I was reading an old article that brought up the idea of reassembling shredded documents. I suppose the tedium of scanning in the shreds would be better spent actually doing the jigsaw puzzle, though. :)
 
3:13 AM
@J.M. I once saw how the police do it!
they don't scan the threads :)
but I can't say more ... it's confidential :D
unless...
 
 
8 hours later…
11:20 AM
0
A: What should our FAQ contain?

halirutanWhen new visitors arrive to this site and post a question it's very often the case that the question looks like this one Everyone knows what now usually happens: The question is rarely upvoted and it is heavily commented that question should contain a description what the OP has tried so f...

 
 
1 hour later…
12:42 PM
@halirutan, the -cleanstart works in Ubuntu and Fedora. :)
Import[]-ing with FTP worked, but I wonder why a clean start's needed...
 
 
1 hour later…
2:05 PM
@J.M. Lets hope that it works with the ftp-server of the OP too. I have no idea what settings they delete, that afterwards an ftp transfer works.. Wolfram magic.
 
2:39 PM
@halirutan The peculiar thing is that I am well aware than on the two machines I tried, I never tweaked the settings...
Magic indeed.
 
 
2 hours later…
4:22 PM
 
 
2 hours later…
F'x
6:29 PM
hi there
it looks like my first paper with Mathematica 3D graphs will be accepted for publication
but there's noöne home so I had to tell someone… hope you don't mind :)
 
@F'x congrats :)
Care to share the graphics?
I like your avatar @SjoerdC.deVries!
 
@ℛ.ℳ ;-P
new line for bigger avatar
new line for bigger avatar
still small
 
F'x
6:44 PM
@ℛ.ℳ yeah, it's not that extraordinary…
but for some reason, I love this shape… it's the elastic properties for some crystal, so it's highly unusual
it looks like some sort of star wars fighter (which I didn't comment on in the article)
 
@F'x looks nice! Yes, it's a funny (in a nice way) shape
Probably could've done with a few more PlotPoints for the final version, I think...
(or MaxRecursion or both)
 
F'x
@ℛ.ℳ the mesh is plotted not so fine (otherwise it's really dark), but there are an awful lot of points in there
the “spikes” are really sharp
 
@F'x Oh, the spikes should be there? Ok then :) I thought it's an artifact of fewer points
 
F'x
that's how it projects onto the axis-aligned planes
I even made a rotatable 3D version to include in the supporting information PDF, but I'm not sure that's a good idea after all
 
ha, might probably blow up the size... my journals heavily downsample the figures I submit so that it ends up being a small download for the user
 
F'x
6:53 PM
@ℛ.ℳ what's your field?
for me, most journal rasterize and downsample, and some just include high-res or vector graphics
 
@F'x broadly speaking, it's a mix of electrical engineering, seismology, acoustics and physics... for now.
 
F'x
@ℛ.ℳ keeping your options open :)
I work in theoretical chemistry
 
Very much. I started out by designing ships, so... :)
 
F'x
@ℛ.ℳ cool!
 
7:30 PM
 
@belisarius Are the results visible instantly?
Or do they need to count the votes?
 
@halirutan I guess it's automated
that's the only possible way in SO
damn ... I'm writing four nested For[] loops. Nasty.
 
15
Q: Can this be written well, without loops?

Mr.WizardInspired by this question I would like to know if the following code can be written without explicit loops (For, While, etc.) in a clean, efficient and non-contrived way. I have been unable to do so. max = 5000; a = ConstantArray[0, max]; x = y = z = n = 1; val := 2 (2 n^2+(y-2) (z-2)+x (y+z-2)...

 
@ℛ.ℳ oh ... thanks ... I never imagined that
:p
 
7:58 PM
sweaty palms time ;-)
 
> Winners are ℛ.ℳ, J. M., and Mr.Wizard.
3
Congratulations!
shakes head at OpenSTV
 
@TimStone Who is ℛ.ℳ?
 
Where are you seeing that? I'm looking but I cannot find it. (R.M I suppose.)
 
@ℛ.ℳ I fixed it, OpenSTV doesn't like you ;)
 
@Mr.Wizard Oh, probably... it's some crazy unicode
 
8:02 PM
In that case, welcome to the team R.M! :-)
 
Thanks :) and thanks to all who voted!
 
@Mr.Wizard I ran the ballot file
 
Thanks Tim. I was staying around just long enough to see the results. I'm out of here!
 
Sure thing. Good bye!
 
@ℛ.ℳ Don't look at me. I'd never vote an amphibian
congrats!
 
8:04 PM
@ℛ.ℳ See, I told you. Get rid of the unicode. Congrats!
 
@Mr.Wizard Also of course for the "old" ones!
 
And congrats to @J.M. and @Mr.Wizard too, of course.
 
@belisarius @halirutan thanks :)
 
@ℛ.ℳ congrats! (I think...)
How is one supposed to interpret the vote file?
 
F'x
congrats to our new mods!
 
8:09 PM
@OleksandrR. You can't. It's full of toads
 
F'x
> 339 voters were eligible, 213 visited the site during the election, 151 visited the election page, and 79 voted
and why didn't we have a Mathematica STV implementation ready for this occasion? :)
 
@F'x Hehe ... post a question
 
F'x
@belisarius I'd have to “show some effort”, and I really am incapable of any effort at the current time
(insert picture of F’x in rocking chair, music is on, laptop on his lap, kids asleep…)
 
@F'x Nope. The question is "why didn't we have a Mathematica STV implementation ready for this occasion?" :D
The answer is
[F’x is in the rocking chair, music is on, laptop on his lap, kids asleep[
ERRRRRRRRRRR
FRAUD
 
@TimStone Apparently, it is Mr.Wiz, Verbeia and myself... I too got JM after running the ballot.
 
8:16 PM
1
Q: 2012 Community Moderator Election Results

Shog9Well, Mathematica's very first moderator election has come to an end. Our winners are: Please give them a warm welcome, and hearty thanks and congratulations for volunteering! Also, a sincere thank you to the rest of our Moderators Pro Tempore, who (along with Mr.Wizard) helped shepherd the...

 
@ℛ.ℳ Hmm
 
F'x
@ℛ.ℳ same here, I got JM
 
@TimStone Shog9 is rioting
 
@F'x I got @J.M. too.
 
Wow, I wake up and there is a diamond next to my name. Congratulations R.M and Mr.Wizard and thanks also to the other candidates.
 
8:19 PM
@Verbeia There is still some confusion
 
Wait, is there a problem with the results?
 
rebels are raising a revolt
 
F'x
@Verbeia no, I think a few of us most probably mishandled the OpenSTV software
 
Winners are RM, Verbeia, and Mr.Wizard.
 
8:20 PM
the last sentence on the STV board
@Verbeia congrats, milady
 
F'x
@Verbeia ahead of JM by one vote, it appears…
congrats again to the new mods, whoever they may be!
 
We actually have 5 mods! :D
 
@ℛ.ℳ Four mods and a toad
 
@F'x This is really close together..
 
@F'x There seems to be some disagreement with the counting method used, trying to get clarification. Not to make any one worried or anything. :P
 
8:26 PM
@TimStone We had similar problems discussed in the chat these days... precision is a bitch.
 
The solution is obviously diamonds for everyone!
2
 
I see this as a win-win.
 
Given the closeness of the result and that J.M was ahead on first votes, perhaps we should appoint four mods? I am going to be away Nov dec anyway so it would spread the load.
4
 
F'x
@ℛ.ℳ five mods, because diamonds are forever!
 
@F'x So it's like the title "mr. president".
 
8:30 PM
@F'x Only if you're with Lucy in the sky
 
@F'x that link's no good, it's using the instant runoff method. SE uses MeekSTV
The single transferable vote (STV) is a voting system based on proportional representation and ranked voting. Under STV, an elector's vote is initially allocated to his or her most-preferred candidate. After candidates have been either elected (winners) by reaching quota or eliminated (losers), surplus votes are transferred from winners to remaining candidates (hopefuls) according to the surplus ballots' ordered preferences. The system minimizes "wasted" votes, provides approximately proportional representation, and enables votes to be explicitly cast for individual candidates rather tha...
 
Yeah, I prodded Shog about the discrepancy
Speak of the devil ;)
 
We are being invaded
 
yeah, this is crap.
Sorry guys, I was in too much of a rush on this one
 
8:36 PM
I'm getting Mr.Wizard, then RM, then Verbeia
 
Hah, so everyone except the SE folks used the STV model that SE uses to count the ballots?
 
I used MeekSTV, which is what we use
 
@ℛ.ℳ You should be more careful with your sayings. Diamonds are hard to digest
 
@belisarius Toads' stomachs are lined with diamonds
 
@GraceNote I'm getting Mr.Wizard, then RM, then JM
 
8:39 PM
Am I in the right place? I heard there was a train wreck somewhere
 
12 mins ago, by Tim Stone
The solution is obviously diamonds for everyone!
 
Even looking at the ballot file. No one voted 6 (Eiyriou) first choice, and no one who voted 5 (F'x) first voted 2 (JM) second. There are, however, votes of 5 then 3 (Verbeia)
 
It's getting a little crowdy in here.
 
Diamonds and Toads or Toads and Diamonds is a French fairy tale by Charles Perrault, and titled by him "Les Fées" or "The Fairies." Andrew Lang included it in The Blue Fairy Book. In his source, as in Mother Hulda, the kind girl was the stepdaughter, not the other daughter. The change was apparently to decrease the similarity to Cinderella. It is Aarne-Thompson tale 480, the kind and the unkind girls. Others of this type include Shita-kiri Suzume, Mother Hulda, The Three Heads in the Well, Father Frost, The Three Little Men in the Wood, The Enchanted Wreath, The Old Witch, and The Two Ca...
 
Ok, so first off: my apologies to @Verbeia and @J.M. - I jumped the gun on this one and didn't do the sanity checking that I'm supposed to.
Second, it should have been RM, JM, and Mr. Wizard - so I'm correcting that now.
 
8:41 PM
@GraceNote beware, it's difficult to estimate meek STV without doing the actual, tedious computations
 
@Gilles It is, yeah, I'm just remotely finger-tracing what my STV breakdown is telling me what happened when running Meek STV
Hm. Not sure where it's breaking. Probably on the threshold?
Threshold is weird because by having someone so significantly in the lead, a portion of their votes convert or something like that
I should consider running on a different machine
 
So the issue is Mr.Wizard's votes. We have preferential voting in Australia, so I feel like Julia Gillard just now.
 
methinks ballot counting should be a little easier ...
 
3
Q: 2012 Community Moderator Election Results

Shog9Well, Mathematica's very first moderator election has come to an end. Our winners are: Please give them a warm welcome, and hearty thanks and congratulations for volunteering! Also, a sincere thank you our other Moderator Pro Tempore, Sjoerd C. de Vries, who (along with J. M. and Mr.Wizard)...

0
Q: Who should set flags?

George WolfeI just read the discussion on Area 51 on flagging. It seems like a pretty agressive thing to set a flag, and I have trouble imagining that someone would post something offensive on Mathematica SE. On the other hand you get reputation points for flags. Is this something better left to longer time...

 
<gets popcorn>
 
8:48 PM
@StackExchange You don't get reputation points for flags
 
F'x
@mmyers hey, I just said that :)
 
23 mins ago, by Verbeia
Given the closeness of the result and that J.M was ahead on first votes, perhaps we should appoint four mods? I am going to be away Nov dec anyway so it would spread the load.
 
F'x
all the blue, it's like TL-outside-of-TL tonight :)
 
@mmyers ssh... setting a flag is an aggressive thing now. It's our chance to conduct an in house online Milgram experiment
 
Well that was interesting! If I had gotten up half an hour later I would have missed the fun. Seriously I am not disappointed. A little relieved if anything. I was worried that my absence would have been a strain on everyone else.
I'm going to change my handle to Ruby for a while, I think
 
8:58 PM
After talking this over, we're putting @Verbeia in as the 4th winner - my mistake, not hers, and it can't hurt to have a fill-in
10
It was extremely close
 
\o/!
 
Clap!
@Verbeia Congrats again, so
 
@Shog9 that is very kind of you. It was funny, my name has actually gained, lost, and regained a diamond next to it in the last half hour.
 
F'x
@Verbeia you're all blue now
congrats to verbeia and the rest of the new team, and I'm off to bed!
 
@F'x nights!
 
9:02 PM
@Verbeia Had to throw a bit of drama in here, right? Wouldn't want WebApps getting all the attention... ;-)
 
@Shog9 Nice one! Thanks.
 
I am assuming I don't have to sign the mod agreement again ;)
 
@Shog9 Yeah, the ballot file for web apps made me raise a brow, heh.
 
@Verbeia Well, check. You'd be the first to have to do it twice if y'were
 
9:07 PM
On the bright side: this is why election data is public.
 
@GraceNote I am in the mod tools without signing again.
 
Then you are good to go.
 
Sep 12 at 20:17, by belisarius
@SjoerdC.deVries I think there is no need to get stressed. If three mods are needed to run the site, we should have four
 
@belisarius So what you're really saying is that you drugged @Shog9 in order to fulfill your prophecy, gotcha.
 
@TimStone Nope. Just blackmailed him
 
9:10 PM
Oh, that shows even more dedication. Nicely done.
 
You're welcome
 
Now, about those negatives...
 
@TimStone expect nothing less from the Argentinian mafia
of course, all their illicit money is now worthless ever since I pegged it to the infix
 
@ℛ.ℳ I'll raise mod flags to death when you're the only mod around.
Starting with all your pejorative comments about my homeland. You'll be the first suspended mod ever
 
@belisarius Can you even afford to raise a flag now?
 
9:20 PM
@ℛ.ℳ And now menacing me. This will end in The Hague
 
Anyway gotta go to work now. See you all later.
 
 
2 hours later…
11:38 PM
It seems I'm due for a molt again. Anyway, congrats to Verbeia, ℛ.ℳ, and the Wizard!
Anyway: could somebody be a dear and maybe paste the output of OpenSTV on our election results into Pastebin? I've no place to install OpenSTV in...
@F'x 'grats. Those don't involve spherical harmonics, by any chance?
 
@TimStone Thanks Tim! :D
 
No problem :)
 
Neck-and-neck, eh? I figured the other choices were more popular... :D
 
11:54 PM
@TimStone Now that there are 4, if you run it with 4 seats, it converges in 2 rounds
Also, very interesting... everyone had a different order in which they picked their choices. No two voters voted alike
 

« first day (251 days earlier)      last day (4250 days later) »