In article , John Nagle
wrote:
> Then upgrade to 3D. You can represent latitude and longitude
> as a 3-element unit vector. (GPS systems do this; latitude and
> longitude are only generated at the end, for output.)
And annoyingly so. Somebody I know was building a tracking system based
on a
On 10/10/2013 6:27 PM, Steven D'Aprano wrote:
> For what it's worth, there is no three-dimensional extension to complex
> numbers, but there is a four-dimensional one, the quaternions or
> hypercomplex numbers. They look like 1 + 2i + 3j + 4k, where i, j and k
> are all distinct but i**2 == j**2
On Friday 11 October 2013 12:49:40 Roy Smith did opine:
> In article ,
>
> Oscar Benjamin wrote:
> > If someone tried to explain why their field couldn't use ً for the
> > circumference of a unit circle I would suggest that they adjust the
> > other parts of their notation not ً (there are othe
On Fri, 11 Oct 2013 10:05:03 -0400, Roy Smith wrote:
> In article ,
> Oscar Benjamin wrote:
>
>> If someone tried to explain why their field couldn't use ð for the
>> circumference of a unit circle I would suggest that they adjust the
>> other parts of their notation not ð (there are other uses
On 11 October 2013 10:11, Steven D'Aprano
wrote:
> On Fri, 11 Oct 2013 09:17:37 +0100, Joshua Landau wrote:
>
>> On 11 October 2013 03:08, Steven D'Aprano
>> wrote:
>>>
>>> Given:
>>>
>>> x ∈ ℝ, x = 2 (reals)
>>> y ∈ ℕ, y = 2 (natural numbers)
>>>
>>> we have x = y, but since 1/y is undefined (
In article ,
Oscar Benjamin wrote:
> If someone tried to explain why their field couldn't use ð for the
> circumference of a unit circle I would suggest that they adjust the
> other parts of their notation not ð (there are other uses of ð.
Pi is wrong:
http://www.youtube.com/watch?v=jG7vhMMX
On 2013-10-11, Steven D'Aprano wrote:
> On Thu, 10 Oct 2013 17:48:16 +, Neil Cerutti wrote:
>
>> >>> 5.0 == abs(3 + 4j)
>> False
>
> Did you maybe accidentally rebind abs? If not, what version of
> Python are you using?
Honestly, I think I got my Python term and my Vim term mixed up.
I Shall
Oscar Benjamin writes:
> tried to explain why their field couldn't use π for the
> circumference of a unit circle I would suggest that they adjust the
> other parts of their notation not π (there are other uses of π.
There's τ for the full circle; π is used for half the circumference.
--
https
On 11 October 2013 10:35, David wrote:
> On 11 October 2013 12:27, Steven D'Aprano
> wrote:
>> On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:
>>
>>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
BTW, one of the earliest things that turned me on to Python was when I
disc
On Thu, 10 Oct 2013 14:12:36 +, Grant Edwards wrote:
> Nope. "i" is electical current (though it's more customary to use upper
> case).
"I" is steady-state current (either AC or DC), "i" is small-signal
current.
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Oct 11, 2013 at 8:11 PM, Steven D'Aprano
wrote:
> If you implicitly decide to promote entities, then of course you can
> promote y to a real then take the invoice.
Either you're channelling Bugs Bunny or you're trying to sell me
something... you mean "take the inverse", I assume, here :)
On 11 October 2013 12:27, Steven D'Aprano
wrote:
> On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:
>
>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
>>> BTW, one of the earliest things that turned me on to Python was when I
>>> discovered that it uses j as the imaginary unit, not
On Fri, 11 Oct 2013 09:17:37 +0100, Joshua Landau wrote:
> On 11 October 2013 03:08, Steven D'Aprano
> wrote:
>> Your mistake here seems to be that you're assuming that if two numbers
>> are equal, they must be in the same domain, but that's not the case.
>> (Perhaps you think that 0.0 == 0+0j sh
On 11 October 2013 03:08, Steven D'Aprano
wrote:
> Your mistake here seems to be that you're assuming that if two numbers
> are equal, they must be in the same domain, but that's not the case.
> (Perhaps you think that 0.0 == 0+0j should return False?) It's certainly
> not the case when it comes t
On Fri, Oct 11, 2013 at 11:13 AM, Dennis Lee Bieber
wrote:
> On Fri, 11 Oct 2013 01:20:01 +1100, Chris Angelico
> declaimed the following:
>
>>
>>This belongs in the Izzet League, I think.
>>
> Was that an MtG reference?
It most assuredly was. The Ravnican guild known as the Izzet League
On Thu, 10 Oct 2013 17:48:16 +, Neil Cerutti wrote:
> >>> 5.0 == abs(3 + 4j)
> False
Did you maybe accidentally rebind abs? If not, what version of Python are
you using?
[steve@ando ~]$ for a in 2.4 2.5 2.6 2.7 3.2 3.3 ; do
> python$a -c "print( 5.0 == abs(3 + 4j) )" ;
> done
True
True
Tr
On Thu, 10 Oct 2013 09:09:42 -0400, Roy Smith wrote:
> BTW, here's a Python equality oddity:
>
r = 0.0
c = 0 + 0j
r == c
> True
Mathematically, this is only to be expected.
int(r) == int(c)
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: can't con
On Fri, 11 Oct 2013 00:25:27 +1100, Chris Angelico wrote:
> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
>> BTW, one of the earliest things that turned me on to Python was when I
>> discovered that it uses j as the imaginary unit, not i. All
>> right-thinking people will agree with me on t
In article ,
Neil Cerutti wrote:
> >>> 5.0 == abs(3 + 4j)
> False
I'd like an argument, please.
--
https://mail.python.org/mailman/listinfo/python-list
On 11 October 2013 06:29, Oscar Benjamin wrote:
>
> I learned to use i for sqrt(-1) while studying theoretical physics.
> When I later found myself teaching maths to engineers I asked why j
> was used and was given this explanation. I'm still unconvinced by it
> though.
Please don't be. We need d
On 10Oct2013 17:48, Neil Cerutti wrote:
> On 2013-10-10, MRAB wrote:
> > If r is real (float) and c is complex:
> > r == c means r == c.real and c.imag == 0.0
>
> Woah. I thought I was going by what the docs say:
>
> Python fully supports mixed arithmetic: when a binary
> arithmetic op
On 2013-10-10, Oscar Benjamin wrote:
> On 10 October 2013 18:48, Neil Cerutti wrote:
>> I guess the "if appropriate" part eluded my eye. When *is* it
>> appropriate? Apparently not during an equal test.
>>
> 5.0 == abs(3 + 4j)
>> False
>
> If the above is genuine output then it's most likely
On 10 October 2013 18:48, Neil Cerutti wrote:
> I guess the "if appropriate" part eluded my eye. When *is* it
> appropriate? Apparently not during an equal test.
>
5.0 == abs(3 + 4j)
> False
If the above is genuine output then it's most likely floating point
error. I wouldn't expect any erro
On 10 October 2013 15:34, David wrote:
> On 11 October 2013 00:25, Chris Angelico wrote:
>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
>>
>> I've never been well-up on complex numbers; can you elaborate on this,
>> please? All I know is that I was taught that the square root of -1 is
>>
Am 10.10.13 18:54, schrieb Grant Edwards:
On 2013-10-10, Chris Angelico wrote:
On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards wrote:
Nope. "i" is electical current (though it's more customary to use
upper case). "j" is the square root of -1.
and that hypercomplex numbers include i, j, k,
On 2013-10-10, Ian Kelly wrote:
> On Thu, Oct 10, 2013 at 11:48 AM, Neil Cerutti wrote:
>> Woah. I thought I was going by what the docs say:
>>
>> Python fully supports mixed arithmetic: when a binary
>> arithmetic operator has operands of different numeric types,
>> the operand with the ?n
On Thu, Oct 10, 2013 at 11:48 AM, Neil Cerutti wrote:
> On 2013-10-10, MRAB wrote:
>> On 10/10/2013 16:57, Rotwang wrote:
>>> On 10/10/2013 16:51, Neil Cerutti wrote:
[...]
Mixed arithmetic always promotes to the wider type (except in
the case of complex numbers (Ha!)).
>
On 10/10/2013 07:20 AM, Chris Angelico wrote:
On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards wrote:
Nope. "i" is electical current (though it's more customary to use
upper case). "j" is the square root of -1.
and that hypercomplex numbers include i, j, k, and maybe even other
terms, and I n
On 2013-10-10, MRAB wrote:
> On 10/10/2013 16:57, Rotwang wrote:
>> On 10/10/2013 16:51, Neil Cerutti wrote:
>>> [...]
>>>
>>> Mixed arithmetic always promotes to the wider type (except in
>>> the case of complex numbers (Ha!)).
>>>
>>> r == c is equivalent to r == abs(c), which returns the magint
On 2013-10-10, Chris Angelico wrote:
> On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards
> wrote:
>> Nope. "i" is electical current (though it's more customary to use
>> upper case). "j" is the square root of -1.
>>
>>> and that hypercomplex numbers include i, j, k, and maybe even other
>>> terms
On Oct 10, 2013, at 10:12 AM, Grant Edwards wrote:
> On 2013-10-10, Chris Angelico wrote:
>> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
>>> BTW, one of the earliest things that turned me on to Python was when I
>>> discovered that it uses j as the imaginary unit, not i. All
>>> right-t
On 10/10/2013 16:57, Rotwang wrote:
On 10/10/2013 16:51, Neil Cerutti wrote:
[...]
Mixed arithmetic always promotes to the wider type (except in
the case of complex numbers (Ha!)).
r == c is equivalent to r == abs(c), which returns the magintude
of the complex number.
What?
>>> -1 == -1 +
On 10/10/2013 16:51, Neil Cerutti wrote:
[...]
Mixed arithmetic always promotes to the wider type (except in
the case of complex numbers (Ha!)).
r == c is equivalent to r == abs(c), which returns the magintude
of the complex number.
What?
>>> -1 == -1 + 0j
True
>>> -1 == abs(-1 + 0j)
False
>
;> => evaluates as true
>>
>> http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
>>
>> I swear, I am never going to complain about Python again.
>
> I've just finished reading JavaScript: The Good Parts, by Douglas
> Crockford (now I'm
On Thursday, October 10, 2013 8:04:00 PM UTC+5:30, David wrote:
> I have never heard the term "hypercomplex" numbers. I guess you
> are referring to vectors with more dimensions than two. A three
A generalization of quaternions :
http://en.wikipedia.org/wiki/Hypercomplex_number
http://en.wikipedia
On 11 October 2013 00:25, Chris Angelico wrote:
> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
>
> I've never been well-up on complex numbers; can you elaborate on this,
> please? All I know is that I was taught that the square root of -1 is
> called i, and that hypercomplex numbers include
On Fri, Oct 11, 2013 at 1:12 AM, Grant Edwards wrote:
> Nope. "i" is electical current (though it's more customary to use
> upper case). "j" is the square root of -1.
>
>> and that hypercomplex numbers include i, j, k, and maybe even other
>> terms, and I never understood where j comes from. Why
On 2013-10-10, Chris Angelico wrote:
> On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
>> BTW, one of the earliest things that turned me on to Python was when I
>> discovered that it uses j as the imaginary unit, not i. All
>> right-thinking people will agree with me on this.
>
> I've never b
On 10/10/2013 14:25, Chris Angelico wrote:
On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
BTW, one of the earliest things that turned me on to Python was when I
discovered that it uses j as the imaginary unit, not i. All
right-thinking people will agree with me on this.
I've never been w
On Fri, Oct 11, 2013 at 12:09 AM, Roy Smith wrote:
> BTW, one of the earliest things that turned me on to Python was when I
> discovered that it uses j as the imaginary unit, not i. All
> right-thinking people will agree with me on this.
I've never been well-up on complex numbers; can you elabor
/11/all-your-commas-are-belong-to-Array
>
> I swear, I am never going to complain about Python again.
I've just finished reading JavaScript: The Good Parts, by Douglas
Crockford (now I'm working on the harder part of re-reading it slowly,
to make sure I really understand it). Anyb
his little Javascript gem:
>>>
>>> ",,," == Array((null,'cool',false,NaN,4));
>>>
>>> => evaluates as true
>>>
>>> http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
>>>
>>> I swear, I am
On 2013-10-10 12:10, MRAB wrote:
> Re "==", this page:
>
> http://php.net/manual/en/language.operators.comparison.php
>
> states:
>
> """If you compare a number with a string or the *comparison involves
> numerical strings*, then each string is converted to a number and
> the comparison per
//wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
I swear, I am never going to complain about Python again.
I am sure you know this, but for the record, Javascript has two equality
operators, '==' and '==='.
The double form attempts to coerce the left and ri
11/02/11/all-your-commas-are-belong-to-Array
>
> I swear, I am never going to complain about Python again.
>
I am sure you know this, but for the record, Javascript has two equality
operators, '==' and '==='.
The double form attempts to coerce the left and right side
Am 10.10.13 06:36, schrieb Steven D'Aprano:
Just came across this little Javascript gem:
",,," == Array((null,'cool',false,NaN,4));
=> evaluates as true
http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
I swear, I am never going to complain about
>
> > http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
> >
> > I swear, I am never going to complain about Python again.
>
> *blank look*
> Wow.
>
> Now, is there a situation in which this problem can actually crop up
> in production code?
O
On 10/10/2013 05:36, Steven D'Aprano wrote:
Just came across this little Javascript gem:
",,," == Array((null,'cool',false,NaN,4));
=> evaluates as true
http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
I swear, I am never going to complain about
On Wed, Oct 9, 2013 at 9:36 PM, Steven D'Aprano wrote:
> Just came across this little Javascript gem:
>
> ",,," == Array((null,'cool',false,NaN,4));
>
> => evaluates as true
>
> http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
>
On Thu, Oct 10, 2013 at 3:36 PM, Steven D'Aprano wrote:
> Just came across this little Javascript gem:
>
> ",,," == Array((null,'cool',false,NaN,4));
>
> => evaluates as true
>
> http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
>
Just came across this little Javascript gem:
",,," == Array((null,'cool',false,NaN,4));
=> evaluates as true
http://wtfjs.com/2011/02/11/all-your-commas-are-belong-to-Array
I swear, I am never going to complain about Python again.
--
Steven
--
https://mail.pyth
51 matches
Mail list logo