-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pcre unknown error #1221
Comments
That's weird. I wonder if you don't have to do a |
For the record, I'm on the same setup and see normal behavior: julia> sin(1:10)
10-element Float64 Array:
0.841471
0.909297
0.14112
-0.756802
-0.958924
-0.279415
0.656987
0.989358
0.412118
-0.544021 |
Homebrew starts out with a fresh copy of the git repo every time you The test suite comes up clean, and I get #undefs in the readline, basic and |
That is super weird. The strangest part is that you can't even actually have #undefs in arrays of floats since they aren't heap-allocated and therefore every possible value means something (possibly NaN). For performance reasons, uninitialized int, float arrays are just filled with whatever's in memory: julia> Array(Float64,25)
25-element Float64 Array:
2.14294e-314
2.17901e-314
2.12944e-314
2.12943e-314
2.12943e-314
2.17668e-314
2.12948e-314
2.12948e-314
2.17902e-314
2.17901e-314
2.17842e-314
2.17821e-314
2.12943e-314
2.12944e-314
2.1765e-314
2.17833e-314
2.17842e-314
2.14376e-314
2.17904e-314
2.17644e-314
2.12943e-314
2.12944e-314
2.12952e-314
2.14309e-314
2.17821e-314 That's why I suspected recent representation changes as a culprit. |
Is this printing done in Julia, or in C? If it's in Julia, where does it On Mon, Aug 27, 2012 at 2:18 PM, Stefan Karpinski
|
It's in base/show.jl. Search for "#undef" and follow the breadcrumbs. |
Alright, I've figured out that it has something to do with the Essentially, in your makefile, you have the line:
I patch that to be:
This allows Julia to be installed into To accomodate this, I change the I've confirmed that the Thanks! On Mon, Aug 27, 2012 at 2:25 PM, Stefan Karpinski
|
The |
Is it normal for an Array of type Float to be filled with
As opposed to:
|
This is actually normal since Array{Float} is an array of pointers to heap-allocated objects which happen to be of type Float. |
Come to think of it, we should probably rename |
Especially given that the analogy with Int no longer holds. FloatingPoint On Tue, Aug 28, 2012 at 3:38 PM, Jeff Bezanson notifications@github.comwrote:
|
If the big difference between Perhaps something like Also, @JeffBezanson; you said that the |
No, that's not really the difference — any Julia object can be heap or stack allocated. The difference is that So the point of |
Ah, I see. That makes sense, and I agree that most people would get On Tue, Aug 28, 2012 at 2:06 PM, Stefan Karpinski
|
True, it would simplify things to have only |
Makes sense. I think for the few things like exponent or mantissa extraction we can do duck typing. There seems to be a a slippery slope between floating-point and other real abstractions anyway. |
Actually one thing |
Right, but |
Using the word "fixed" could create confusion with fixed point. I looked up a couple definitions of "floating point" and it seems agreed that it refers to a representation with a fixed number of digits and an exponent. So BigFloat is the misnamed thing; if it can really have any number of digits it doesn't need the exponent and isn't floating point. |
And yet there's a nice analogy of BigFloat to BigInt, and I'm pretty sure On Tue, Aug 28, 2012 at 3:05 PM, Jeff Bezanson notifications@github.comwrote:
|
Jeff's point suggests that BigFloat is probably better named BigReal or something of that sort. |
I think BigFloat could refer to a type with a particular number of digits, but as many as you want. Thus each BigFloat number has an associated number of digits, and thus can implement |
Quoting wikipedia:
So you could very well have an arbitrary precision floating-point type. I'm not sure if this is how
Obviously, wikipedia is not definitive, but I think it does generally reflect a pretty reasonable consensus. Maybe we should move this discussion over to the issue I created for it: #1231. |
I don't think this is standard nomenclature at all. |
I believe if we switch to MPFR, then BigFloat will behave as Jeff described. |
Ah, interesting. So there are two possible very distinct behaviors: what MPFR provides, which is variable-precision floating point, which could be written as something like |
I'm not sure there are reasonable alternatives to what MPFR provides; if you try to keep results exact the number of digits can keep growing forever, giving unreasonable performance. So it may very well be that a number that is Real but not Integer, Rational, etc. is de-facto floating point. But then you need a way to check for that; checking for Real doesn't work since the number could be an exact integer. |
I believe @nolta fixed the masking of the real error; can you get better information about the exception now? |
Well, hopefully we're moving in the right direction:
|
Looks like that might be coming out of |
Just wanted to ping people on this and say that I'm still having this issue. I've managed to narrow it down to a difference between my Homebrew-compiled I'm having difficulty coming up with ways to compare the two dylibs, (I've even tried stuff like diffing the output of |
Could you pull the latest version, and tell us what the error code is? |
|
@nolta; I've managed to narrow it down to line
I figured out it was that call to
|
Hmm. Error -28 means "a pattern that was compiled by the 8-bit library is passed to a 16-bit library function, or vice versa." Can you post base/pcre_h.jl to gist? |
I'm actually not certain that this is a |
I tried installing julia w/ homebrew, but i got the following error:
which was preceding by this unrelated warning:
|
The Can you post the output of the following commands for me? I have the feeling that you have conflicting fortran compilers:
Thanks! |
|
EDIT: I don't get why markdown doesn't get applied to replies from emails sometimes. Can you post the full output of |
I can post the entire 16,898 line output of
|
Excellent, this is actually the same error as reported here, by samueljohn. I should have fixed it up, just |
Ok, thanks. I've successfully installed julia w/ homebrew, and all the tests pass. However, i cannot reproduce your problem:
|
Faaaaantastic. My next question would be if the homebrew Julia executable is linking against the libraries compiled by Homebrew, or other libraries. You can check via
|
|
Well, I am officially out of ideas. Next free moment I have, I'll try to do some more digging; last time I tried this, I was able to narrow it down to some operation that was happening in the "install" step where the julia executable is no longer linking to things within its |
I think I've finally fixed this particular issue, it just so happens that it was due to the fact that I have a This error would only manifest itself with someone compiling from Homebrew, with a non-standard Homebrew installation directory. Should be fixed for all cases now, so I'm closing it. Good to finally figure this out! |
Nice sleuthing. That's a nasty situation to figure out. |
There seems to be some weirdness with printing arrays of floats:
This is on OSX 10.8, although I wonder if that can possibly have anything to do with it. :P
The text was updated successfully, but these errors were encountered: