-
-
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
Infinity MathConst #6062
Infinity MathConst #6062
Conversation
|
Also, I agree with the exporting concern, though. My suggestion would be to have |
I have a serious objection to this PR, namely that the current mathematical semantics of ∞ are only well-defined for First, it is not possible to represent ∞ for The issue with Infinity is a limit, not a number. If we want to do this, we should do it cognizant of what we are really doing. |
I see what you're saying - this is obviously a topic that deserves some thought. That said, it's worth pointing out that where you've defined the complex infinities etc., you've consistently used the The nice thing about |
I thought I was being quite careful in drawing a distinction between the usage of ∞ in the real and complex settings, which are extremely different beasts. The fact that I wrote out real ∞s in the usual Cartesian and polar notations of complex numbers is irrelevant. There is a genuine problem with correctness in the
Packages that want to overload notions of ∞ for extended complex numbers or special matrices can easily define it within their own scope. In fact, the limited utility of ∞ for |
I'll relent slightly, in that everyone understands what real positive infinity is. Here are the pros and cons of defining real positive infinity as a MathConst, as I see it: Pros
Cons
|
Perhaps we can focus this discussion on whether ∞ should be defined as a On Thu, Mar 6, 2014 at 3:06 PM, Jiahao Chen [email protected]:
|
I'll point out that the intent of Strange idea: maybe |
@jiahao The thing is, your notation for the complex infinities is entirely relevant, because this about notation. And in notation - including yours - OTOH, perhaps I'm wrong and there is a use case where The issues you've mentioned with a |
@toivoh I'm happy to discuss this, but I believe @jiahao is against defining @JeffBezanson +1, that's a really neat idea. |
Also, not too related, but I think the functions |
@JeffBezanson: |
I think that cantor and all the set theorists since might disagree with you. |
Let me try to be clearer: the real case isn't that hard. The complex case is. That was exactly why I made a point of distinguishing between ordinary complex numbers and their compactification on the Riemann sphere. In the former, there are many infinities lying on a circle of infinite radius in the complex plane. In the latter, all these points are identified to be the same. Both of these notions are used in complex analysis, using whichever is convenient at the time. The consequence, however, is that ∞ has different semantics. @StefanKarpinski do you really want to discuss the semantics of transfinite cardinals? That might be a somewhat, erm, divisive issue. |
Until someone can explain to me why |
We give a meaning to @pao At that point I prefer to use |
I have no issue with |
In that case, we can simultaneously placate the complex analysts and unicode luddites by simply closing this issue :) |
Fair enough--still spending more time than not in MATLAB and forgot about that. |
We should not have infinite MathConsts. The reason that MathConsts exist is so that you can write expressions like julia> f(x) = π*x/2
f (generic function with 1 method)
julia> f(1)
1.5707963267948966
julia> f(1.0)
1.5707963267948966
julia> f(1.0f0)
1.5707964f0
julia> f(big(1))
1.570796326794896619231321691639751442098584699687552910487472296153908203143099e+00 with 256 bits of precision In each case, that's exactly what the type and value you want. Why doesn't the same rationale apply to having infinite MathConsts? Because you literally never write things like So when does one use infinity? You can use it in situations like this: minval = ∞
for x in v
if x < minval
minval = x
end
end
# what type is minval? In this kind of situation, having Currently In this post, I've been writing |
@jiahao I don't think we're going to agree on this, so don't take this as a counter argument as such, but this would be my approach. The ambiguity comes not from the meaning of Julia's complex numbers are standard, non-extended ones, so "real positive infinity" is simply From what you've said, extended complex numbers have different semantics, in which case they should have their own type, too. So it's not infinity's semantics which change here, it's the field's - but luckily Julia allows for that. As long as infinity behaves the same when used with reals, complexes, extended complexes etc. individually, there's no issue with defining it as a singleton type. |
@StefanKarpinski +1 for this line of reasoning. The thing is, if it's not a MathConst it loses the few benefits it had, so I think @JeffBezanson is right, and I should just close the issue. |
I've added
infinity
and its symbol∞
as a MathConst.Should be straightforward enough but let me know if I've missed anything.