« first day (1283 days earlier)      last day (3389 days later) » 

2:37 AM
Call for help. MemberQ[{1.9000000000000001`, 1.0}, 1.9]
MemberQ[{3.6999999999999997`, 4.0} , 3.7] give False and True respectively. Why?
2:51 AM
@novice Are you trying to do an interval check, or truly test if 1.9, or 4.0 are one of those two values in the sets?
To put it short: relying on equality comparisons between reals (binary floating point numbers) is usually a bad idea.
This troubles me when I am trying to check whether 3.7 is in Table[nx, {nx, 1, 5, 0.3}]. Should I use fraction ?
If possible, don't use reals (inexact numbers, that is, anything with decimal point).
But if you need to, you probably have to control the tolerance for acceptance yourself.
I tried this MemberQ[Round[#,0.01]&@Table[nx, {nx, 1, 5, 0.3}],3.7], but still failed.
3:06 AM
Something more like
`With[{relativeTest = Abs[#1 - #2]/#2 < 1/1000 &},
FirstCase[Table[nx, {nx, 1, 5, 0.3}], x_ /; relativeTest[1.9000000000000001`, x]]]`
In general, playing with inexact numbers and performing exact equality is nasty business.
Or, more correctly:
Yes, thanks. But I thought Table[nx, {nx, 1, 5, 0.3}] were all exact numbers. There are no irrationals.
With[{relativeTest = Abs[(#1 - #2)/#2] < 1/1000 &},
 FirstCase[Table[nx, {nx, 1, 5, 0.3}], x_ /; relativeTest[1.9000000000000001`, x]]]
Anything with a decimal point is eventually going to be converted to a base-two floating point number of some limited precision. There are multiple issues there, decimal human-readable representation and binary machine representation having rounding issues when cast from one to another just one of them.
You mean 0.3 and 3/10 are represented differently in Computers(in Mathematica)?
In Mathematica, specifically.
3/10 is a precise rational number in Mathematica.
0.3 is a finite-precision binary floating point number approximation.
And things like Sqrt[2] or Pi are actually precise numeric quantities in Mathematica.
A problem with "reals" (finite-precision numbers) in mathematica is that their internal representation is fiddly. They can be compared efficiently, but meaning of that result is not necessarily intuitive. ...
3:24 AM
Since I am dealing with numeric computations constantly, I have to give up on MemberQ. Is it true? For example:
Manipulate[
{x, y} = Floor[({pick[[1]], pick[[2]]} - bias)/{dx, dy}];
surrpts =
Plus[#, bias] & /@ (#*{dx, dy} & /@ (Plus[#, {x, y}] & /@
Tuples[{0, 1}, 2]));
Show[Graphics[
GraphicsComplex[
pts, {Line[(*edges*)edgelist], PointSize[Large], Point[pts], Red,
Point[surrpts]}]]],
{{pick, {1.7, 1.7}}, Locator},
"Highlight chose point", TrackedSymbols :> True,
Initialization :> {dx = dy = 0.3;
pts = Flatten[Table[{nx, ny}, {nx, 1, 5, dx}, {ny, 1, 4, dy}], 1];
bias = pts[[1]];
edgelist = {};
Do[
If[MemberQ[pts, pts[[i]] + {0, dy}],
The edges are incomplete.
You could do something like MemberQ[list, x_ /; x == 1.9], though.
When in contrast, comparisons between precise numeric quantities are technically always intuitive, but can't necessarily be always computed in finite amount of time (you can write numeric quantities belonging to algebraic set in multiple ways whose equivalence is not mechanically verifiable on a pre-bounded amount of time).
@Guesswhoitis. Hmm, MemberQ uses SameQ instead of Equal?
Equal (==) provides some rounding error margin, yes.
Nonetheless, equality comparisons between reals... at some point your rounding errors are going to grow too big and you are going to shoot your own foot if you are not very careful.
@kirma, if memory serves, it just checks if anything in the list matches the pattern given in the second argument. So, MatchQ[], effectively.
Hmmh.
I'm despairing over my Metropolis-Hastings algorithm having a magic tunable parameter for which picking a good value doesn't seem obvious at all.
…and of course, different systems may have a different internal representation of 0.3 so it is definitely a no go to do exact matching with inexact numbers.
3:32 AM
Sometimes it's 100, sometimes 10^11, and it affects vastly the rate of convergence.
Don't most MCMC methods have some amount of ad hoc-ness to them anyway? :)
I guess so...
Most people are just happy they work, despite the number of things that need to be tuned per problem.
I guess I could formalize an initial guess and it would involve something like the mean or standard deviation of the mean of the distance matrix in my problem... but this far, I'm not all that certain of it.
 
1 hour later…
4:41 AM
@ArnoudBuzing This is my take on how to get a clean list of bugs that haven't been fixed, the way you and @Szabolcs discussed: example and source.
5
5:23 AM
groan
My Mma v10.2 seems to do random crashes ("corrupted internal state" or something) quite often when I do some random swipes (to change desktop) on top of it. This happens on OSX 10.11 beta...
5:35 AM
Might be really just bad interaction with beta OS.
6:09 AM
My algorithm apparently thinks that's a reasonably good land mover similarity sort minimizing direct neighbor differences... I'm not certain if I'd agree or not.
Clearly there's no "good" solution for this.
Earth mover similarity, even.
6:46 AM
@Pickett Looks very cool! (Haven't looked at the source yet.) It needs to handle capitalized "Fixed" as well: mathematica.stackexchange.com/q/68893/12
7:21 AM
@kirma, saw your question on surfaces in the transcript. You'd need to solve a bunch of differential equations satisfied by the geodesics on your surface through your given points. Conceptually simple, but it can be numerically messy.
 
1 hour later…
8:24 AM
@Guesswhoitis. In this case doing it over discretized boundary consisting of triangles is quite good enough...
But of course, finding the shortest path between two points is not quite the same problem as finding a point at specific distance from two other points...
I suspect TriangulateMesh might actually be a starting point for me, though. Maximal mesh quality goal attempts to spread triangles quite evenly, and angles should be reasonable.
Hmm… are you considering the surface analog of an ellipse in the plane?
That is, the sum of the distances of any point of the ellipse from its foci is constant.
More like measuring angles and distances, and solving problems like "point at distance r1 from point p1, and distance r2 from point p2"
Ah, I see what you mean, not that.
But rather circle intersections and similar things on non-euclidean surfaces. Mostly for fun...
In general, as in the plane, you'd end up with a curve consisting of all the points that satisfy your constraints.
Hmm, on second thought, you will have two solutions at the very least.
But you'd still need a way to calculate geodesic distances. For surfaces, as I said, you'd need to solve a few DEs. I'm not familiar with how one proceeds for discrete meshes, tho.
8:42 AM
I am interested of not-so-trivial real-world shapes that can be defined by combination of regions, but probably symbolic computation over those surfaces is going to be next to impossible on Mma...
Good-quality triangulation solves one problem I want to look at automagically, though.
(lunch)
 
4 hours later…
12:27 PM
@Szabolcs Well spotted, I updated the source code and the example.
 
2 hours later…
2:20 PM
I have simply avoided using Illustrator with Mathematica-exported files for a long time, but recently I had a need for it. The font problem makes editing very time-consuming. Has anyone solved this?
0
Q: Custom fonts show as boxes when opening Mathematica-made PDFs with Illustrator

SzabolcsIf I export a PDF from Mathematica, then open it with Illustrator, the fonts glyphs will sometimes appear as boxes. Why does this happen? Is there a workaround? I experimented with several fonts in Graphics[{Text[Style["text", FontFamily -> "Arial"]]}]. Helvetica, Times, Helvetica Neue, Zapfi...

 
2 hours later…
4:13 PM
Anyone attending WTC 2015 in Champaign?
 
3 hours later…
6:58 PM
@Szabolcs Perhaps we should add a sentence to the top of the question at the same time that we are adding the bug tag? For example: "Bug found in version 1.0.0. Most recently confirmed in version 10.2.0." What do you think?
@Pickett Yes, I think we should, and also propose a template for it to encourage people to keep things regular. Of course that template won't be fully respected but it's still better to have something to refer back to.
@Szabolcs Maybe if we add the templates to halirutan's toolbar it will be respected due to sheer convenience?
I agree with you that there should be templates, and with keywords so the information can be extracted programmatically.
7:19 PM
Hrmm... blue ones are ok, but the red ones...
7:52 PM
Well, here it goes @ArnoudBuzing @Pickett and everyone else
0
Q: Standard header for bugs-tagged posts, for easy searching

SzabolcsThe consensus for handling posts about fixed bugs was to include a line stating in which version the bug went away. I would like to propose taking this one step further, and standardizing the header of bug-posts. This will serve the purpose of making it easier to search for bugs based on status...

8:04 PM
0
Q: Standard header for bugs-tagged posts, for easy searching

SzabolcsThe consensus for handling posts about fixed bugs was to include a line stating in which version the bug went away. I would like to propose taking this one step further, and standardizing the header of bug-posts. This will serve the purpose of making it easier to search for bugs based on status...


« first day (1283 days earlier)      last day (3389 days later) »