-
-
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
weird InexactError() #3728
Comments
Looking at the code in array.jl, This seems to occur due to
Defining A=Array(Complex{Float64},1) fixes the immediate issue, but I have no opinion on whether this issue should be considered a bug or not. |
@autozimu If you use a concrete type like |
I'm not sure that |
Oh no not this again. Using |
We could have |
That would lead to the undesirable situation of a complex number whose components are of different types. |
I also don't see how that solves the multiplying by Inf problem. Then |
One option is to change complex multiplication so that |
I vote that we solve the issue at hand first. Why not simply define:
|
Interestingly, trying your code (there is a typo in the last
|
Yes; putting |
Whoops, I was thinking of
|
Of course, one also has to audit whether any other functions fall down for |
This change requires giving multiplition by Bools special behavior. Approximately, `true * x = x` and `false * x = zero(x)`, but a bit complicated for the sake of promotion, the only non-trivial example of which is `Bool * MathConst`, which is promoted to Float64. Idea originally due to @GunnarFarneback: https://groups.google.com/forum/#!topic/julia-dev/VkGrqnrAdaY #2980 #3728
This change requires giving multiplition by Bools special behavior. Approximately, `true * x = x` and `false * x = zero(x)`, but a bit complicated for the sake of promotion, the only non-trivial example of which is `Bool * MathConst`, which is promoted to Float64. Idea originally due to @GunnarFarneback: https://groups.google.com/forum/#!topic/julia-dev/VkGrqnrAdaY #2980 #3728
OS: Mac OS X 10.8.4
Julia Version: Commit 05e64a1 2013-07-13 04:09:58
Am I doing something wrong, or is this a bug?
The text was updated successfully, but these errors were encountered: