Irony overload [was Re: off topic but please forgive me me and answer]

2010-04-04 Thread Steven D'Aprano
On Sun, 04 Apr 2010 08:00:41 -0700, rantingrick wrote:

> A while back i had wondered why Guido never posts to c.l.py anymore. Was
> it because he thinks himself better than us, no, it's because of the
> "low-brow-infantile-Jerry-Springer-ish-nature" that this list has
> imploded into. *puke*

Complaining about the infantile nature of the list immediately before 
throwing up. Methinks "rantingrick" is projecting just a little.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-04 Thread Lie Ryan
On 04/04/10 13:01, Patrick Maupin wrote:
> On Apr 3, 9:24 pm, Steven D'Aprano  cybersource.com.au> wrote:
>> To put it another way, even though there are an infinite number of
>> rationals, they are vanishingly rare compared to the irrationals. If you
>> could choose a random number from the real number line, it almost
>> certainly would be irrational.
> 
> Yet another correspondence between the set of numbers and the set of
> people ;-)

Not really. The set of all irrational numbers is not enumerable
(aleph-1) and thus uncountable, but the set of all irrational people is
a countable finite set (even though it may be very difficult to
enumerate them).
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-04 Thread Patrick Maupin
On Apr 4, 10:00 am, rantingrick  wrote:

> This is amazing, how can such an off topic post based completely on
> lunacy exist so long here? 54 posts and counting. I think i had this
> very argument in grade school. We have SD'A, Tim Chase, MSRB, and yes
> even Steve Holden again participating in the troll fest (even though
> some of their arguments are true). Of course i would expect mensenator
> to jump into this, but...

Excellent technique.  Pick a topic that is guaranteed in any universe
to generate a lot of posts (a short provocative question asked on
April Fool's Day), then stay above the fray, not posting until the
traffic dies down, and only then make a post expressly engineered to
try to start the traffic up again.  Rinse and repeat as necessary.

I bow at the feet of the master.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-04 Thread superpollo

rantingrick ha scritto:

On Apr 1, 3:44 pm, superpollo  wrote:

how much is one half times one half?


This is amazing, how can such an off topic post based completely on
lunacy exist so long here? 54 posts and counting. I think i had this
very argument in grade school. We have SD'A, Tim Chase, MSRB, and yes
even Steve Holden again participating in the troll fest (even though
some of their arguments are true). Of course i would expect mensenator
to jump into this, but...

A while back i had wondered why Guido never posts to c.l.py anymore.
Was it because he thinks himself better than us, no, it's because of
the "low-brow-infantile-Jerry-Springer-ish-nature" that this list has
imploded into. *puke*


relax mate.

--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-04 Thread rantingrick
On Apr 1, 3:44 pm, superpollo  wrote:
> how much is one half times one half?

This is amazing, how can such an off topic post based completely on
lunacy exist so long here? 54 posts and counting. I think i had this
very argument in grade school. We have SD'A, Tim Chase, MSRB, and yes
even Steve Holden again participating in the troll fest (even though
some of their arguments are true). Of course i would expect mensenator
to jump into this, but...

A while back i had wondered why Guido never posts to c.l.py anymore.
Was it because he thinks himself better than us, no, it's because of
the "low-brow-infantile-Jerry-Springer-ish-nature" that this list has
imploded into. *puke*
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-04 Thread Andreas Waldenburger
On Sun, 4 Apr 2010 13:59:57 +0200 Andreas Waldenburger
 wrote:

> Computers by themselves have as much a notion of Rationals as they
> have of Irrationals, or, for that matter, the cuteness puppies.

Strike that. Floats in computers are Rationals. So computers do know
them. However, they are still not "two numbers".

/W

-- 
INVALID? DE!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-04 Thread Andreas Waldenburger
On Sat, 3 Apr 2010 23:13:51 -0700 (PDT) Mensanator 
wrote:

> On Apr 3, 9:03 pm, Steven D'Aprano  cybersource.com.au> wrote:
> > On Sat, 03 Apr 2010 09:35:34 -0700, Mensanator wrote:
> > > On Apr 3, 10:17 am, Steven D'Aprano  > > cybersource.com.au> wrote:
> > >> But you're not multiplying four numbers,
> >
> > > You are if you're using Rationals.
> >
> > That is sheer unadulterated nonsense.
> 
> You obviously don't understand the workings of computers.
> 
Now this is what's wrong about internet discussions. Nobody actually
defines what they are talking about *until* it becomes a problem. And
then the retconning starts.

This discussion up to this point had not explicitly been about the
workings of computers. It had not really explicitly been about
mathematical numbers either (although to my understanding this had
been implicit, but that's personal).

Let this be a reminder that defining your terms is one of the best
ideas ever. Its the reason for the success of mathematics. I'd like it
to be a reason for the success of discussions as well.

/W

PS: Accusing someone publicly of "obviously" not understanding [some
topic] is pretty low by any standards. And especially so when the
argument for doing so is bogus: Computers by themselves have as much a
notion of Rationals as they have of Irrationals, or, for that matter,
the cuteness puppies. Software does.

-- 
INVALID? DE!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 9:03 pm, Steven D'Aprano  wrote:
> On Sat, 03 Apr 2010 09:35:34 -0700, Mensanator wrote:
> > On Apr 3, 10:17 am, Steven D'Aprano  > cybersource.com.au> wrote:
> >> On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote:
> >> > I am replying to this post not because I disagree but because it
> >> > postalogically  fits the best (I am by no means an expert either).
>
> >> > IMHO, the crackpot in this regard is actually partially right,
> >> > multiplication does mean that the number must get bigger, however for
> >> > fractions you multiply four numbers, two numerators and two
> >> > denominators. The resulting numerator and denominator by this
> >> > multiplication get indeed bigger.
>
> >> But you're not multiplying four numbers,
>
> > You are if you're using Rationals.
>
> That is sheer unadulterated nonsense.

You obviously don't understand the workings of computers.

>
> A rational number (element of Q) is not a pair of numbers,

Duh. Everybody knows that. But sometimes it is represented
by a pair of numbers such as 1/2 or mpq(1,2).

> it is a unique
> single point on the real number line R which does not depend on either
> the way you calculate it,

There are no "real number lines" inside my computer.

> or the representation you use to write it.

And if you want the computer to do a calculation, then you are
dependent on its representation.

>
> The single number 1/2 can be written as any of 1/2, 2/4, 5/10, 1234/2468
> or any of an infinite number of ratios representations. It can be written
> as a decimal expansion 0.5, or a binary expansion 0.1, or the negative-
> binary expansion 1.5, or as the base-eleven infinite expansion that
> starts as 0.5...

But we are only discussing those representations that are
a pair of numbers: numerator & denominator. Now look who's
talking nonsense, bringing up things like 0.5...

>
> Numbers can also be written as continued fractions. The continued
> fraction representation for 1/2 is unexciting and happens to include two
> digits: [0; 2]. But the continued fraction representation of (say) 5/7 is
> [0; 1, 2, 2]. 5/7 isn't four numbers, or three, or two. It is one number.

You're on a roll, aren't you?

>
> You might as well argue that 43/92 is "four numbers" -- you have a 4, and
> 3, and 9, and a 2, hence four numbers. The argument that 1/2 is two
> numbers is exactly as foolish as that.

Are you really that stupid?

>
> >> you're multiplying two numbers.
>
> > Because they're expressed as Decimals.
>
> No, the number of operands is independent of the types of the operands.
> Multiplication is a binary operator: it takes exactly two arguments. Not
> four, or six, or one. Regardless of whether I write:
>
> Fraction(1,2)*Fraction(7,14)
> Decimal('0.5')*Decimal('0.5')
> 0.5*0.5
> MyFraction.from_roman('I', 'II')*MyContinedFraction([0, 2, 0, 0, 0])
>
> I still have two numbers being multiplied.

And you claim that the internal workings of all the above are
the same?

>
> >> One-half is not "two numbers",
>
> > Sometimes it is.
>
> Only on Bizarro world.

I thought you were supposed to be a Python expert?
That you're supposed to understand the difference
between an object and its contents?

Is [1,2,3,4] one number? Of course not, it's four numbers
that are part of one object. A Rational is two numbers,
one object. Yes, squaring a Rational does mean multiplying
two objects, but you know damn well that it involves four
numbers.

>
> >> that would be a tuple
>
> > Like this?
>
>  gmpy.mpq('0.5')
> > mpq(1,2)
>
> No, that's not a pair of numbers.

Yes, it is. Two numbers, one object. Perhaps you need to
read the Tutorial?

> It is a single number, equal to:

The word you want here is "object". This is exactly the reason
these words were invented. They're probably spinning in their grave.

>
>   ∑(i=1,∞,9/10**i)
> --
>   (ln(e)+sin(5π/2))
>
> which is also a single number.

"Object".

>
> >> or a list or
> >> possibly a coordinate pair. One-half is a single number,
>
> > When dealing with crackpots, it does not help to use the wrong
> > arguments.
>
> And you think that telling the crackpot that he is right, multiplication
> always leads to bigger numbers, is somehow going to convince him that he
> is wrong about multiplication always leading to bigger numbers?

Of course not. But it may help the OP understand that's one of the
main fallacies that crackpots often engage in. Focusing on something
that's true but is a Non Sequitur.

>
> > When multiplying gmpy.mpq(2,3) by gmpy.mpq(2,3), the
> > numerator and denominator have both indeed gotten bigger.
>
> So what? "One quarter" is bigger (longer) than "one half". Your point is?

That in this case, multiplication did, in fact, make things larger.
It didn't make the object larger, but the numbers it contains are.
The crackpot focuses on the numbers while ignoring the object.
For you to say only the object matters and it's smaller makes you
just as wrong as the crackpot.

>
> And in 

Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 9:24 pm, Steven D'Aprano  wrote:
> To put it another way, even though there are an infinite number of
> rationals, they are vanishingly rare compared to the irrationals. If you
> could choose a random number from the real number line, it almost
> certainly would be irrational.

Yet another correspondence between the set of numbers and the set of
people ;-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 10:56:37 -0700, Patrick Maupin wrote:

>> The square root of 2 is irrational, but if you multiply it by itself
>> then the result isn't irrational, so not all operations involving
>> irrational numbers will result in an irrational result (unless that's
>> what you mean by "closely related irrational numbers").
> 
> Yes, I think I am closely related to myself.  But in addition to that
> particular disclaimer, I qualified the statement with "most" and I also
> mentioned that zero is special.  I stand by the assertion that if you
> take a random assortment of non-zero numbers, some irrational, some
> rational, and a random assortment of numeric operators, that most
> operations involving an irrational number will have an irrational
> result.


There are an infinite number of rational numbers. There are an infinite 
number of irrational numbers. But the infinity of the rationals is 
countable (1, 2, 3, 4, ... or aleph-0) while the infinity of the 
irrationals is uncountable (c or aleph-1), so there are infinitely more 
irrationals than rationals.

To put it another way, even though there are an infinite number of 
rationals, they are vanishingly rare compared to the irrationals. If you 
could choose a random number from the real number line, it almost 
certainly would be irrational.

(This is not to be confused with floats, which of course are all rational 
numbers.)


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 09:35:34 -0700, Mensanator wrote:

> On Apr 3, 10:17 am, Steven D'Aprano  cybersource.com.au> wrote:
>> On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote:
>> > I am replying to this post not because I disagree but because it
>> > postalogically  fits the best (I am by no means an expert either).
>>
>> > IMHO, the crackpot in this regard is actually partially right,
>> > multiplication does mean that the number must get bigger, however for
>> > fractions you multiply four numbers, two numerators and two
>> > denominators. The resulting numerator and denominator by this
>> > multiplication get indeed bigger.
>>
>> But you're not multiplying four numbers,
> 
> You are if you're using Rationals.

That is sheer unadulterated nonsense.

A rational number (element of Q) is not a pair of numbers, it is a unique 
single point on the real number line R which does not depend on either 
the way you calculate it, or the representation you use to write it.

The single number 1/2 can be written as any of 1/2, 2/4, 5/10, 1234/2468 
or any of an infinite number of ratios representations. It can be written 
as a decimal expansion 0.5, or a binary expansion 0.1, or the negative-
binary expansion 1.5, or as the base-eleven infinite expansion that 
starts as 0.5...

Numbers can also be written as continued fractions. The continued 
fraction representation for 1/2 is unexciting and happens to include two 
digits: [0; 2]. But the continued fraction representation of (say) 5/7 is 
[0; 1, 2, 2]. 5/7 isn't four numbers, or three, or two. It is one number.

You might as well argue that 43/92 is "four numbers" -- you have a 4, and 
3, and 9, and a 2, hence four numbers. The argument that 1/2 is two 
numbers is exactly as foolish as that.


>> you're multiplying two numbers.
> 
> Because they're expressed as Decimals.

No, the number of operands is independent of the types of the operands. 
Multiplication is a binary operator: it takes exactly two arguments. Not 
four, or six, or one. Regardless of whether I write:

Fraction(1,2)*Fraction(7,14)
Decimal('0.5')*Decimal('0.5')
0.5*0.5
MyFraction.from_roman('I', 'II')*MyContinedFraction([0, 2, 0, 0, 0])

I still have two numbers being multiplied.


>> One-half is not "two numbers",
> 
> Sometimes it is.

Only on Bizarro world.


>> that would be a tuple
> 
> Like this?
> 
 gmpy.mpq('0.5')
> mpq(1,2)

No, that's not a pair of numbers. It is a single number, equal to:

  ∑(i=1,∞,9/10**i)
--
  (ln(e)+sin(5π/2))

which is also a single number.


>> or a list or
>> possibly a coordinate pair. One-half is a single number,
> 
> When dealing with crackpots, it does not help to use the wrong
> arguments. 

And you think that telling the crackpot that he is right, multiplication 
always leads to bigger numbers, is somehow going to convince him that he 
is wrong about multiplication always leading to bigger numbers?



> When multiplying gmpy.mpq(2,3) by gmpy.mpq(2,3), the
> numerator and denominator have both indeed gotten bigger.

So what? "One quarter" is bigger (longer) than "one half". Your point is?

And in any case:

>>> Fraction(3, 4)*Fraction(2, 3)
Fraction(1, 2)

Would you still like to argue that the numerator and denominator always 
get bigger when you multiply two fractions?



> The trick is that when combined, the overall result is smaller.

 
>> the number which
>> if you double it gives one.
>>
>> Fortunately multiplication is consistent. Multiplying the two numbers
>> 0.5 and 0.5 is exactly the same as multiplying 1*1 and 2*2 then
>> dividing to get a single number. It's not the same as multiplying 1*1
>> and 2*2 to get two numbers, 1 and 4.
>>
>> You say that multiplication means that the number "must get bigger".
> 
> Yes, not in every case, but in many cases it does.

That makes no sense. It "must" get bigger, except for the cases where it 
doesn't? Or to put it another way: No, multiplication doesn't necessarily 
make numbers bigger.


>> 5*1 = 5
>> 5*0 = 0
>> 5*-2 = -10
>>
>> I hope you won't try to argue that 5, 0 and -10 are all bigger than 5.
> 
> Yes, but these special cases don't help. It needs to be pointed out that
> the argument is wrong even in cases like 2/3 * 2/3.

The argument is that multiplication ALWAYS makes numbers bigger. Martin, 
out of some misguided and confused sense that the representation of a 
number was somehow relevant, argued that this is correct. It's not 
correct, not even for integers, let alone rationals.

This is why I said that Martin should stop trying to justify the 
crackpot's belief that multiplication always makes numbers bigger, even a 
little bit. It's not even true for integers. It's not even true for 
positive (non-zero) integers. Arguments about numerators and denominators 
are just red-herrings.

If the crackpot claimed that dolphins were fish, does it help to say he's 
partly right because dolphins live in water and have fins and a tail and 
a head just like fish? No. He wou

Re: off topic but please forgive me me and answer

2010-04-03 Thread Martin P. Hellwig

On 04/03/10 16:46, Patrick Maupin wrote:

On Apr 3, 9:43 am, "Martin P. Hellwig">  IMHO, the crackpot in this
regard is actually partially right,

multiplication does mean that the number must get bigger, however for
fractions you multiply four numbers, two numerators and two
denominators. The resulting numerator and denominator by this
multiplication get indeed bigger.


That argument is great!  Just make sure that you've managed to leave
before the class has to learn about irrational numbers that don't
*have* numerators and denominators ;-)


Yeah but those numbers have their own problems anyway, one of them being 
that you are never sure how big/small they actually are, so by that 
logic you could argue that if you can not give an exact measure for a 
given number, bickering over it size after an operation is pretty 
pointless (pun intended) :-)


Beside the only number that really matters is 42 ;-)

--
mph
--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Andreas Waldenburger
On Sat, 03 Apr 2010 13:13:38 -0400 Steve Holden 
wrote:

> Correct. Unfortunately, it doesn't help  to use the right ones either.
> In fact, that could almost be a definition of "crackpot" (and alas now
> we approach territory where we risk offending the religious, so I will
> cease and desist).

Except that you didn't. ;)

/W

-- 
INVALID? DE!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 12:39 pm, MRAB  wrote:
> Patrick Maupin wrote:
> > On Apr 3, 11:59 am, Emile van Sebille  wrote:
> >> On 4/3/2010 8:46 AM Patrick Maupin said...
>
> >>> On Apr 3, 9:43 am, "Martin P. Hellwig">  IMHO, the crackpot in this
> >>> regard is actually partially right,
>  multiplication does mean that the number must get bigger, however for
>  fractions you multiply four numbers, two numerators and two
>  denominators. The resulting numerator and denominator by this
>  multiplication get indeed bigger.
> >>> That argument is great!  Just make sure that you've managed to leave
> >>> before the class has to learn about irrational numbers that don't
> >>> *have* numerators and denominators ;-)
> >> Ahh, but no ones arguing that irrational numbers don't get bigger --
> >> even before you multiply them!
>
> > True, but being an optimist, just as (-1 * -1 == +1) (which
> > admittedly, I had a hard time trying to explain to my father years
> > ago), and just as (not not True == True) and just as multiplying two
> > imaginary numbers can have a real result, I was hoping that it would
> > also be the case that having a discussion with an irrational person
> > about irrational numbers could have a rational result.  Of course,
> > that hope was incredibly naive of me, since most operations with
> > irrational numbers which do not involve either closely related
> > irrational numbers or zero will also result in irrational numbers.  I
> > think induction will show that this property (that an irrational
> > number can make any result that it is involved in irrational) can also
> > be applied to irrational people and discussions.  ;-)
>
> The square root of 2 is irrational, but if you multiply it by itself
> then the result isn't irrational, so not all operations involving
> irrational numbers will result in an irrational result (unless that's
> what you mean by "closely related irrational numbers").

Yes, I think I am closely related to myself.  But in addition to that
particular disclaimer, I qualified the statement with "most" and I
also mentioned that zero is special.  I stand by the assertion that if
you take a random assortment of non-zero numbers, some irrational,
some rational, and a random assortment of numeric operators, that most
operations involving an irrational number will have an irrational
result.

Regards,
Pat
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread MRAB

Patrick Maupin wrote:

On Apr 3, 11:59 am, Emile van Sebille  wrote:

On 4/3/2010 8:46 AM Patrick Maupin said...


On Apr 3, 9:43 am, "Martin P. Hellwig">  IMHO, the crackpot in this
regard is actually partially right,

multiplication does mean that the number must get bigger, however for
fractions you multiply four numbers, two numerators and two
denominators. The resulting numerator and denominator by this
multiplication get indeed bigger.

That argument is great!  Just make sure that you've managed to leave
before the class has to learn about irrational numbers that don't
*have* numerators and denominators ;-)

Ahh, but no ones arguing that irrational numbers don't get bigger --
even before you multiply them!


True, but being an optimist, just as (-1 * -1 == +1) (which
admittedly, I had a hard time trying to explain to my father years
ago), and just as (not not True == True) and just as multiplying two
imaginary numbers can have a real result, I was hoping that it would
also be the case that having a discussion with an irrational person
about irrational numbers could have a rational result.  Of course,
that hope was incredibly naive of me, since most operations with
irrational numbers which do not involve either closely related
irrational numbers or zero will also result in irrational numbers.  I
think induction will show that this property (that an irrational
number can make any result that it is involved in irrational) can also
be applied to irrational people and discussions.  ;-)


The square root of 2 is irrational, but if you multiply it by itself
then the result isn't irrational, so not all operations involving
irrational numbers will result in an irrational result (unless that's
what you mean by "closely related irrational numbers").
--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 11:59 am, Emile van Sebille  wrote:
> On 4/3/2010 8:46 AM Patrick Maupin said...
>
> > On Apr 3, 9:43 am, "Martin P. Hellwig">  IMHO, the crackpot in this
> > regard is actually partially right,
> >> multiplication does mean that the number must get bigger, however for
> >> fractions you multiply four numbers, two numerators and two
> >> denominators. The resulting numerator and denominator by this
> >> multiplication get indeed bigger.
>
> > That argument is great!  Just make sure that you've managed to leave
> > before the class has to learn about irrational numbers that don't
> > *have* numerators and denominators ;-)
>
> Ahh, but no ones arguing that irrational numbers don't get bigger --
> even before you multiply them!

True, but being an optimist, just as (-1 * -1 == +1) (which
admittedly, I had a hard time trying to explain to my father years
ago), and just as (not not True == True) and just as multiplying two
imaginary numbers can have a real result, I was hoping that it would
also be the case that having a discussion with an irrational person
about irrational numbers could have a rational result.  Of course,
that hope was incredibly naive of me, since most operations with
irrational numbers which do not involve either closely related
irrational numbers or zero will also result in irrational numbers.  I
think induction will show that this property (that an irrational
number can make any result that it is involved in irrational) can also
be applied to irrational people and discussions.  ;-)

Regards,
Pat
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Steve Holden
Mensanator wrote:
[...]
> When dealing with crackpots, it does not help to use the
> wrong arguments. [...]

Correct. Unfortunately, it doesn't help  to use the right ones either.
In fact, that could almost be a definition of "crackpot" (and alas now
we approach territory where we risk offending the religious, so I will
cease and desist).

regards
 Steve
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
See PyCon Talks from Atlanta 2010  http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS:http://holdenweb.eventbrite.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Emile van Sebille

On 4/3/2010 8:46 AM Patrick Maupin said...

On Apr 3, 9:43 am, "Martin P. Hellwig">  IMHO, the crackpot in this
regard is actually partially right,

multiplication does mean that the number must get bigger, however for
fractions you multiply four numbers, two numerators and two
denominators. The resulting numerator and denominator by this
multiplication get indeed bigger.


That argument is great!  Just make sure that you've managed to leave
before the class has to learn about irrational numbers that don't
*have* numerators and denominators ;-)


Ahh, but no ones arguing that irrational numbers don't get bigger -- 
even before you multiply them!


Emile

--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 10:17 am, Steven D'Aprano  wrote:
> On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote:
> > I am replying to this post not because I disagree but because it
> > postalogically  fits the best (I am by no means an expert either).
>
> > IMHO, the crackpot in this regard is actually partially right,
> > multiplication does mean that the number must get bigger, however for
> > fractions you multiply four numbers, two numerators and two
> > denominators. The resulting numerator and denominator by this
> > multiplication get indeed bigger.
>
> But you're not multiplying four numbers,

You are if you're using Rationals.

> you're multiplying two numbers.

Because they're expressed as Decimals.

> One-half is not "two numbers",

Sometimes it is.

> that would be a tuple

Like this?

>>> gmpy.mpq('0.5')
mpq(1,2)


> or a list or
> possibly a coordinate pair. One-half is a single number,

When dealing with crackpots, it does not help to use the
wrong arguments. When multiplying gmpy.mpq(2,3) by gmpy.mpq(2,3),
the numerator and denominator have both indeed gotten bigger.
The trick is that when combined, the overall result is smaller.

> the number which
> if you double it gives one.
>
> Fortunately multiplication is consistent. Multiplying the two numbers 0.5
> and 0.5 is exactly the same as multiplying 1*1 and 2*2 then dividing to
> get a single number. It's not the same as multiplying 1*1 and 2*2 to get
> two numbers, 1 and 4.
>
> You say that multiplication means that the number "must get bigger".

Yes, not in every case, but in many cases it does. You need to point
out that it is wrong EVEN IN THE CASES WHERE IT'S TRUE. It is a
Non Sequitur - it does not follow that a number must be bigger if
the numerator and denominator have each gotten larger.

>
> 5*1 = 5
> 5*0 = 0
> 5*-2 = -10
>
> I hope you won't try to argue that 5, 0 and -10 are all bigger than 5.

Yes, but these special cases don't help. It needs to be pointed out
that the argument is wrong even in cases like 2/3 * 2/3.

>
> There really is no point trying to dignify superpollo's friend's
> assertion on the basis of some technicality. His argument is no different
> from the argument that says that pythons are snakes, and therefore python
> can't be a programming language and this newsgroup can't possibly exist.
> Words can have multiple meanings, and meanings can shift. Multiply may be
> derived from a word which, once upon a time, meant to get bigger, but
> that's not what multiply means. I don't like to dismiss somebody I've
> never met, but on the basis of what superpollo says, yes, he's a crackpot.
>
> Either that or about age four. When I was four I strongly believed that
> "one hundred" and "a hundred" were different numbers. I argued (not very
> convincingly, but with great vehemence) to my teacher and my parents that
> you counted up to ninety-nine, then a hundred, a hundred and one, a
> hundred and two, ... a hundred and ninety-nine, *one* hundred.
>
> --
> Steven

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Martin P. Hellwig

On 04/03/10 16:17, Steven D'Aprano wrote:

On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote:


I am replying to this post not because I disagree but because it
postalogically  fits the best (I am by no means an expert either).

IMHO, the crackpot in this regard is actually partially right,
multiplication does mean that the number must get bigger, however for
fractions you multiply four numbers, two numerators and two
denominators. The resulting numerator and denominator by this
multiplication get indeed bigger.


But you're not multiplying four numbers, you're multiplying two numbers.
One-half is not "two numbers", that would be a tuple or a list or
possibly a coordinate pair. One-half is a single number, the number which
if you double it gives one.



I disagree with you there, but I only disagree with you on the 
definition of the syntax, not with the logic nor the explanation.
I am not going to argue about syntax, since I don't think I would make a 
great argument (being the devil's advocate) and also because I believe 
when argued correctly, agreeing on disagreement of syntax allows even 
the greatest untruth be true and false at the same time.


Excuse me please I need to feed Schroedinger's cat :-)

--
mph



--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo

Patrick Maupin ha scritto:

On Apr 3, 8:00 am, superpollo  wrote:

sorry if I misunderstood.

no no you understood prfectly *but* the thing is i am a regular in an
italian language math ng which is haunted by a crackpot who insists that
1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger",
so i took a semi-serious stance and made a few posts as a statistical
tentative to "convince" said crackpot that the world is not going crazy
(but maybe he is)


If I read correctly (using my non-existent Italian, and heavily
relying on my tiny bit of Spanish and a lot of google translate), it
appears that you are what I would call a high-school math/science
teacher, who takes students to competitions?


right -- almost! i don't take them to competitions (i am not an official 
trainer) but sometimes give some general advice to students who would be 
inclined to compete, if they ask me.


bye


--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 8:00 am, superpollo  wrote:
> > sorry if I misunderstood.
>
> no no you understood prfectly *but* the thing is i am a regular in an
> italian language math ng which is haunted by a crackpot who insists that
> 1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger",
> so i took a semi-serious stance and made a few posts as a statistical
> tentative to "convince" said crackpot that the world is not going crazy
> (but maybe he is)

If I read correctly (using my non-existent Italian, and heavily
relying on my tiny bit of Spanish and a lot of google translate), it
appears that you are what I would call a high-school math/science
teacher, who takes students to competitions?

Regards,
Pat
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Patrick Maupin
On Apr 3, 9:43 am, "Martin P. Hellwig" > IMHO, the crackpot in this
regard is actually partially right,
> multiplication does mean that the number must get bigger, however for
> fractions you multiply four numbers, two numerators and two
> denominators. The resulting numerator and denominator by this
> multiplication get indeed bigger.

That argument is great!  Just make sure that you've managed to leave
before the class has to learn about irrational numbers that don't
*have* numerators and denominators ;-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Steven D'Aprano
On Sat, 03 Apr 2010 15:43:41 +0100, Martin P. Hellwig wrote:

> I am replying to this post not because I disagree but because it
> postalogically  fits the best (I am by no means an expert either).
> 
> IMHO, the crackpot in this regard is actually partially right,
> multiplication does mean that the number must get bigger, however for
> fractions you multiply four numbers, two numerators and two
> denominators. The resulting numerator and denominator by this
> multiplication get indeed bigger.

But you're not multiplying four numbers, you're multiplying two numbers. 
One-half is not "two numbers", that would be a tuple or a list or 
possibly a coordinate pair. One-half is a single number, the number which 
if you double it gives one.

Fortunately multiplication is consistent. Multiplying the two numbers 0.5 
and 0.5 is exactly the same as multiplying 1*1 and 2*2 then dividing to 
get a single number. It's not the same as multiplying 1*1 and 2*2 to get 
two numbers, 1 and 4.

You say that multiplication means that the number "must get bigger". 

5*1 = 5
5*0 = 0
5*-2 = -10

I hope you won't try to argue that 5, 0 and -10 are all bigger than 5.

There really is no point trying to dignify superpollo's friend's 
assertion on the basis of some technicality. His argument is no different 
from the argument that says that pythons are snakes, and therefore python 
can't be a programming language and this newsgroup can't possibly exist. 
Words can have multiple meanings, and meanings can shift. Multiply may be 
derived from a word which, once upon a time, meant to get bigger, but 
that's not what multiply means. I don't like to dismiss somebody I've 
never met, but on the basis of what superpollo says, yes, he's a crackpot.

Either that or about age four. When I was four I strongly believed that 
"one hundred" and "a hundred" were different numbers. I argued (not very 
convincingly, but with great vehemence) to my teacher and my parents that 
you counted up to ninety-nine, then a hundred, a hundred and one, a 
hundred and two, ... a hundred and ninety-nine, *one* hundred.


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Matthew Barnett

superpollo wrote:

Steve Holden ha scritto:

superpollo wrote:

Patrick Maupin ha scritto:

On Apr 2, 2:41 pm, Andreas Waldenburger 
wrote:

While everyone else is mocking you: Can you please elaborate on why 
you
want to know and what kind of problem you're trying to solve with 
this?

Also, don't you think you should have picked a maths forum for this
kind of question?

Methinks the OP is fluent in the way of choosing newsgroups.
According to google, he has posted 6855 messages in 213 groups.

http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Yxp-liP3Vw9uApbyajUBv9M9XLUB2gqkZmQ 




And I can't speak for anybody else, but I just assumed it was an April
Fool's question.  I meant to be laughing with the OP, not at him, so
sorry if I misunderstood.

no no you understood prfectly *but* the thing is i am a regular in an
italian language math ng which is haunted by a crackpot who insists that
1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger",
so i took a semi-serious stance and made a few posts as a statistical
tentative to "convince" said crackpot that the world is not going crazy
(but maybe he is)

thanks

ps: note that my nickname is not unique, and there are a few people
whith the same one... and i didn't ever post using googlegroups


If you think you will persuade a crackpot to drop his lunacy by logical
argument you are clearly an optimist of the first water. But since I
like a challenge (and bearing in mind this is OT so I don't claim to be
an expert) you might try first of all persuading him to agree to the
commutativity of multiplication (i.e. x * y == y * x for any x and y).

If he agrees to that, then get him to agree that x * 1 == x for any x.

If he agrees to that


he does not, since "you cannot multiply something, and not getting some 
more of it" ... he is stuck with the latin etimology of "multiply" 
("multiplicare" means "increase quantity", like in the fish and bread 
miracle)



Do he also think that division always makes it smaller? What about
division by a half?
--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Martin P. Hellwig

On 04/03/10 14:38, Steve Holden wrote:



If you think you will persuade a crackpot to drop his lunacy by logical
argument you are clearly an optimist of the first water. But since I
like a challenge (and bearing in mind this is OT so I don't claim to be
an expert) you might try first of all persuading him to agree to the
commutativity of multiplication (i.e. x * y == y * x for any x and y).

If he agrees to that, then get him to agree that x * 1 == x for any x.

If he agrees to that, then set x = 1/2 and see if he'll agree that 1/2 *
1 == 1/2.

If he does, then surely he must also agree that 1 * 1/2 == 1/2, i.e.
multiplication can indeed "make things smaller".

Good luck, though. Crackpots aren't generally responsive to appeals to
rational thinking.



I am replying to this post not because I disagree but because it 
postalogically  fits the best (I am by no means an expert either).


IMHO, the crackpot in this regard is actually partially right, 
multiplication does mean that the number must get bigger, however for 
fractions you multiply four numbers, two numerators and two 
denominators. The resulting numerator and denominator by this 
multiplication get indeed bigger.


--
mph

--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Steve Holden
superpollo wrote:
> Steve Holden ha scritto:
[...]
>> If he agrees to that, then get him to agree that x * 1 == x for any x.
>>
>> If he agrees to that
> 
> he does not, since "you cannot multiply something, and not getting some
> more of it" ... he is stuck with the latin etimology of "multiply"
> ("multiplicare" means "increase quantity", like in the fish and bread
> miracle)
> 
Ah, so he's talking semantics, not mathematics. Absolutely no point
expecting agreement on a common sense basis, then. Particularly when he
takes such a narrow-minded view.

In short, he has his head up his ass.

Would he agree that two halves make a whole? If so, he appears to deny
the commutativity of multiplication. Such people are amusing for the
first ten minutes, but I am sure he has managed to bore everyone to
death by now.

regards
 Steve
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
See PyCon Talks from Atlanta 2010  http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS:http://holdenweb.eventbrite.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo

Mensanator ha scritto:

On Apr 3, 8:00 am, superpollo  wrote:

Patrick Maupin ha scritto:






On Apr 2, 2:41 pm, Andreas Waldenburger 
wrote:

While everyone else is mocking you: Can you please elaborate on why you
want to know and what kind of problem you're trying to solve with this?
Also, don't you think you should have picked a maths forum for this
kind of question?

Methinks the OP is fluent in the way of choosing newsgroups.
According to google, he has posted 6855 messages in 213 groups.
http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Y...
And I can't speak for anybody else, but I just assumed it was an April
Fool's question.  I meant to be laughing with the OP, not at him, so
sorry if I misunderstood.

no no you understood prfectly *but* the thing is i am a regular in an
italian language math ng which is haunted by a crackpot who insists that
1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger",
so i took a semi-serious stance and made a few posts as a statistical
tentative to "convince" said crackpot that the world is not going crazy
(but maybe he is)


I seriously doubt your crackpot friend actually believes that.
Probably more troll than crackpot. Showing him articles and
programs that prove your premise will accomplish nothing.


probably so, but you cannot imagine the traffic he generates...


However, if you personally wanted information on programming
with rational numbers, you came to the right place.


thanks

ps: note that my nickname is not unique, and there are a few people
whith the same one... and i didn't ever post using googlegroups


What does it mean, "super chicken?


yea!

http://www.renegadechickens.com/chickens/Toons/superchicken.gif
--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo

Steve Holden ha scritto:

superpollo wrote:

Patrick Maupin ha scritto:

On Apr 2, 2:41 pm, Andreas Waldenburger 
wrote:


While everyone else is mocking you: Can you please elaborate on why you
want to know and what kind of problem you're trying to solve with this?
Also, don't you think you should have picked a maths forum for this
kind of question?

Methinks the OP is fluent in the way of choosing newsgroups.
According to google, he has posted 6855 messages in 213 groups.

http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Yxp-liP3Vw9uApbyajUBv9M9XLUB2gqkZmQ


And I can't speak for anybody else, but I just assumed it was an April
Fool's question.  I meant to be laughing with the OP, not at him, so
sorry if I misunderstood.

no no you understood prfectly *but* the thing is i am a regular in an
italian language math ng which is haunted by a crackpot who insists that
1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger",
so i took a semi-serious stance and made a few posts as a statistical
tentative to "convince" said crackpot that the world is not going crazy
(but maybe he is)

thanks

ps: note that my nickname is not unique, and there are a few people
whith the same one... and i didn't ever post using googlegroups


If you think you will persuade a crackpot to drop his lunacy by logical
argument you are clearly an optimist of the first water. But since I
like a challenge (and bearing in mind this is OT so I don't claim to be
an expert) you might try first of all persuading him to agree to the
commutativity of multiplication (i.e. x * y == y * x for any x and y).

If he agrees to that, then get him to agree that x * 1 == x for any x.

If he agrees to that


he does not, since "you cannot multiply something, and not getting some 
more of it" ... he is stuck with the latin etimology of "multiply" 
("multiplicare" means "increase quantity", like in the fish and bread 
miracle)


--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Mensanator
On Apr 3, 8:00 am, superpollo  wrote:
> Patrick Maupin ha scritto:
>
>
>
>
>
> > On Apr 2, 2:41 pm, Andreas Waldenburger 
> > wrote:
>
> >> While everyone else is mocking you: Can you please elaborate on why you
> >> want to know and what kind of problem you're trying to solve with this?
> >> Also, don't you think you should have picked a maths forum for this
> >> kind of question?
>
> > Methinks the OP is fluent in the way of choosing newsgroups.
> > According to google, he has posted 6855 messages in 213 groups.
>
> >http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Y...
>
> > And I can't speak for anybody else, but I just assumed it was an April
> > Fool's question.  I meant to be laughing with the OP, not at him, so
> > sorry if I misunderstood.
>
> no no you understood prfectly *but* the thing is i am a regular in an
> italian language math ng which is haunted by a crackpot who insists that
> 1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger",
> so i took a semi-serious stance and made a few posts as a statistical
> tentative to "convince" said crackpot that the world is not going crazy
> (but maybe he is)

I seriously doubt your crackpot friend actually believes that.
Probably more troll than crackpot. Showing him articles and
programs that prove your premise will accomplish nothing.

However, if you personally wanted information on programming
with rational numbers, you came to the right place.

>
> thanks
>
> ps: note that my nickname is not unique, and there are a few people
> whith the same one... and i didn't ever post using googlegroups

What does it mean, "super chicken?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread Steve Holden
superpollo wrote:
> Patrick Maupin ha scritto:
>> On Apr 2, 2:41 pm, Andreas Waldenburger 
>> wrote:
>>
>>> While everyone else is mocking you: Can you please elaborate on why you
>>> want to know and what kind of problem you're trying to solve with this?
>>> Also, don't you think you should have picked a maths forum for this
>>> kind of question?
>>
>> Methinks the OP is fluent in the way of choosing newsgroups.
>> According to google, he has posted 6855 messages in 213 groups.
>>
>> http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Yxp-liP3Vw9uApbyajUBv9M9XLUB2gqkZmQ
>>
>>
>> And I can't speak for anybody else, but I just assumed it was an April
>> Fool's question.  I meant to be laughing with the OP, not at him, so
>> sorry if I misunderstood.
> 
> no no you understood prfectly *but* the thing is i am a regular in an
> italian language math ng which is haunted by a crackpot who insists that
> 1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger",
> so i took a semi-serious stance and made a few posts as a statistical
> tentative to "convince" said crackpot that the world is not going crazy
> (but maybe he is)
> 
> thanks
> 
> ps: note that my nickname is not unique, and there are a few people
> whith the same one... and i didn't ever post using googlegroups

If you think you will persuade a crackpot to drop his lunacy by logical
argument you are clearly an optimist of the first water. But since I
like a challenge (and bearing in mind this is OT so I don't claim to be
an expert) you might try first of all persuading him to agree to the
commutativity of multiplication (i.e. x * y == y * x for any x and y).

If he agrees to that, then get him to agree that x * 1 == x for any x.

If he agrees to that, then set x = 1/2 and see if he'll agree that 1/2 *
1 == 1/2.

If he does, then surely he must also agree that 1 * 1/2 == 1/2, i.e.
multiplication can indeed "make things smaller".

Good luck, though. Crackpots aren't generally responsive to appeals to
rational thinking.

regards
 Steve
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
See PyCon Talks from Atlanta 2010  http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS:http://holdenweb.eventbrite.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-03 Thread superpollo

Patrick Maupin ha scritto:

On Apr 2, 2:41 pm, Andreas Waldenburger 
wrote:


While everyone else is mocking you: Can you please elaborate on why you
want to know and what kind of problem you're trying to solve with this?
Also, don't you think you should have picked a maths forum for this
kind of question?


Methinks the OP is fluent in the way of choosing newsgroups.
According to google, he has posted 6855 messages in 213 groups.

http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Yxp-liP3Vw9uApbyajUBv9M9XLUB2gqkZmQ

And I can't speak for anybody else, but I just assumed it was an April
Fool's question.  I meant to be laughing with the OP, not at him, so
sorry if I misunderstood.


no no you understood prfectly *but* the thing is i am a regular in an 
italian language math ng which is haunted by a crackpot who insists that 
1/2 * 1/2 cannot be 1/4, "because multiplication means getting bigger", 
so i took a semi-serious stance and made a few posts as a statistical 
tentative to "convince" said crackpot that the world is not going crazy 
(but maybe he is)


thanks

ps: note that my nickname is not unique, and there are a few people 
whith the same one... and i didn't ever post using googlegroups

--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Patrick Maupin
On Apr 2, 8:29 pm, Mensanator  wrote:

> Don't you know how Usenet works?

No, but my cat does.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 2, 7:32 pm, Patrick Maupin  wrote:
> On Apr 2, 6:50 pm, Mensanator  wrote:
>
> > On Apr 2, 2:34 pm, Patrick Maupin  wrote:
>
> > > Methinks the OP is fluent in the way of choosing newsgroups.
> > > According to google, he has posted 6855 messages in 213 groups.
>
> > Does that really mean anything? Hell, I have 12765 messages
> > posted to 332 groups, but I only use 10 regularly.
>
> Well, I have been very wrong in my assumptions before, but yes, I do
> assume it means something:

Yes, you are, in fact, all wet.

>
> - I assume that the OP knows of the existence of more than one
> newsgroup.

"More than one", that's fair. 213, unlikely.

>
> - I assume the OP knows how to locate different newsgroups, either via
> search or some directory like yahoo, and is able to think about which
> one he wants to post to and why.

And most of those probably involved no thought at all, probably
due to cross-posting from a relatively small number of sources
(certainly in my case). So, no, this stat proves nothing about
the OP's ability to find newsgroups or think about their
appropriateness.

>
> - I assume that he is comfortable with the process of posting.  In
> fact, looking at the stats, about half as comfortable as mensanator,
> and over 18 times as comfortable as me ;-)

Well, _I've_ been here on Usenet for 10 years. But despite the stats,
I know little about most to the groups I've "posted to".

>
> Of course, I could be all wet in my assumptions, and it may just be
> that the OP has a cat constantly walking back and forth across his
> keyboard...

Don't you know how Usenet works?

>
> Regards,
> Pat

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Patrick Maupin
On Apr 2, 6:50 pm, Mensanator  wrote:
> On Apr 2, 2:34 pm, Patrick Maupin  wrote:
>
> > Methinks the OP is fluent in the way of choosing newsgroups.
> > According to google, he has posted 6855 messages in 213 groups.
>
> Does that really mean anything? Hell, I have 12765 messages
> posted to 332 groups, but I only use 10 regularly.

Well, I have been very wrong in my assumptions before, but yes, I do
assume it means something:

- I assume that the OP knows of the existence of more than one
newsgroup.

- I assume the OP knows how to locate different newsgroups, either via
search or some directory like yahoo, and is able to think about which
one he wants to post to and why.

- I assume that he is comfortable with the process of posting.  In
fact, looking at the stats, about half as comfortable as mensanator,
and over 18 times as comfortable as me ;-)

Of course, I could be all wet in my assumptions, and it may just be
that the OP has a cat constantly walking back and forth across his
keyboard...

Regards,
Pat
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 2, 2:34 pm, Patrick Maupin  wrote:
> On Apr 2, 2:41 pm, Andreas Waldenburger 
> wrote:
>
> > While everyone else is mocking you: Can you please elaborate on why you
> > want to know and what kind of problem you're trying to solve with this?
> > Also, don't you think you should have picked a maths forum for this
> > kind of question?
>
> Methinks the OP is fluent in the way of choosing newsgroups.
> According to google, he has posted 6855 messages in 213 groups.

Does that really mean anything? Hell, I have 12765 messages
posted to 332 groups, but I only use 10 regularly.

>
> http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Y...
>
> And I can't speak for anybody else, but I just assumed it was an April
> Fool's question.  I meant to be laughing with the OP, not at him, so
> sorry if I misunderstood.
>
> Regards,
> Pat

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 2, 6:07 pm, Steven D'Aprano  wrote:
> On Fri, 02 Apr 2010 12:35:55 -0700, Mensanator wrote:
> >> If you want an exact result when multiplying arbitrary fractions, you
> >> need to avoid floats and decimals and use Fractions:
>
> >> >>> Fraction(1, 2)**2
>
> >> Fraction(1, 4)
>
> > Where do you get that from?
>
> Where do I get what from? Fraction? Oops, sorry about that.
>
> In Python2.6:
>
> >>> from fractions import Fraction

Ok, thanks. I've been using gmpy to do rational arithmetic:

>>> import gmpy
>>> gmpy.mpq(1,2)**2
mpq(1,4)

But I don't have a lot of call for it.

>
> In older Pythons, there was a demo module Demo/classes/Rat.py but it may
> not be installed on your system. Seehttp://bugs.python.org/issue1682
>
> If you meant, where did I get the statement about exact results from,
> both float and Decimal are fixed precision numbers. float precision is
> fixed by the operating system and/or hardware; Decimal precision can be
> arbitrarily chosen by the caller, but having made that choice,
> calculations are rounded to that precision. Only Fraction gives exact
> results for any arbitrary rational number.

Yes, rationals are handy sometimes.

>
> --
> Steven

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Steven D'Aprano
On Fri, 02 Apr 2010 12:35:55 -0700, Mensanator wrote:

>> If you want an exact result when multiplying arbitrary fractions, you
>> need to avoid floats and decimals and use Fractions:
>>
>> >>> Fraction(1, 2)**2
>>
>> Fraction(1, 4)
> 
> Where do you get that from?

Where do I get what from? Fraction? Oops, sorry about that.

In Python2.6:

>>> from fractions import Fraction

In older Pythons, there was a demo module Demo/classes/Rat.py but it may 
not be installed on your system. See http://bugs.python.org/issue1682

If you meant, where did I get the statement about exact results from, 
both float and Decimal are fixed precision numbers. float precision is 
fixed by the operating system and/or hardware; Decimal precision can be 
arbitrarily chosen by the caller, but having made that choice, 
calculations are rounded to that precision. Only Fraction gives exact 
results for any arbitrary rational number.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Dave Angel



Mensanator wrote:

On Apr 1, 9:44 pm, Steven D'Aprano  wrote:
  



1/2.0
  

0.25

If you want an exact result when multiplying arbitrary fractions, you
need to avoid floats and decimals and use Fractions:



Fraction(1, 2)**2
  

Fraction(1, 4)



Where do you get that from?

  

In Python2.6,

from fractions import Fraction

And Fraction is now a class which supports fractional arithmetic.

--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Mensanator
On Apr 1, 9:44 pm, Steven D'Aprano  wrote:
> On Thu, 01 Apr 2010 19:49:43 -0500, Tim Chase wrote:
> > David Robinow wrote:
> >> $ python -c "print 1/2 * 1/2"
> >> 0
>
> >>  But that's not what I learned in grade school.
> >> (Maybe I should upgrade to 3.1?)
>
> > That's because you need to promote one of them to a float so you get a
> > floating-point result:
>
> >    >>> 1/2 * 1/2
> >    0
> >    >>> 1/2 * 1/2.0
> >    0.0
>
> > Oh...wait ;-)
>
> Tim, I'm sure you know the answer to this, but for the benefit of the
> Original Poster, the problem is that you need to promote *both* divisions
> to floating point. Otherwise one of them will give int 0, which gives 0.0
> when multiplied by 0.5.
>
> >>> 1.0/2 * 1/2.0
>
> 0.25
>
> If you want an exact result when multiplying arbitrary fractions, you
> need to avoid floats and decimals and use Fractions:
>
> >>> Fraction(1, 2)**2
>
> Fraction(1, 4)

Where do you get that from?

>
> --
> Steven- Hide quoted text -
>
> - Show quoted text -

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Patrick Maupin
On Apr 2, 2:41 pm, Andreas Waldenburger 
wrote:

> While everyone else is mocking you: Can you please elaborate on why you
> want to know and what kind of problem you're trying to solve with this?
> Also, don't you think you should have picked a maths forum for this
> kind of question?

Methinks the OP is fluent in the way of choosing newsgroups.
According to google, he has posted 6855 messages in 213 groups.

http://groups.google.com/groups/profile?enc_user=ul3SQhIYmLD0Oj5Yxp-liP3Vw9uApbyajUBv9M9XLUB2gqkZmQ

And I can't speak for anybody else, but I just assumed it was an April
Fool's question.  I meant to be laughing with the OP, not at him, so
sorry if I misunderstood.

Regards,
Pat
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Andreas Waldenburger
On Thu, 01 Apr 2010 22:44:51 +0200 superpollo 
wrote:

> how much is one half times one half?

While everyone else is mocking you: Can you please elaborate on why you
want to know and what kind of problem you're trying to solve with this?
Also, don't you think you should have picked a maths forum for this
kind of question?

Meanwhile:
http://en.wikipedia.org/wiki/Fractions#Multiplying_by_a_fraction

And in Italian:
http://it.wikipedia.org/wiki/Frazione_(matematica)#Moltiplicazione_e_division

/W
(Yes, I have nothing to do right now.)

-- 
INVALID? DE!

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Stefan Behnel

Patrick Maupin, 02.04.2010 07:25:

On Apr 1, 11:52 pm, Dennis Lee Bieber wrote:

On Thu, 01 Apr 2010 22:44:51 +0200, superpollo
declaimed the following in gmane.comp.python.general:


how much is one half times one half?


import math
print math.exp((math.log(1) - math.log(2))
  + (math.log(1) - math.log(2)))


That's all well and good, but base 'e' is kind of complicated.  Some
of us were using base 10, and others took Tim's lead and were using
base 2:

>>> print math.exp(((math.log(1)/math.log(2) - math.log(2)/math.log(2)) + 
(math.log(1)/math.log(2) - math.log(2)/math.log(2)))*math.log(2))
0.25


The above can be rewritten as

print('0.25')

which is much faster and also a lot more readable.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-02 Thread Wanderer
On Apr 1, 7:34 pm, Patrick Maupin  wrote:
> On Apr 1, 4:42 pm, Tim Chase  wrote:

> > Uh, did you try it at the python prompt?  


When I try it at the IPython prompt, I get

Object 'how much is one half times one half' not found.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Steven D'Aprano
On Thu, 01 Apr 2010 22:34:46 -0500, Tim Chase wrote:

>> Tim, I'm sure you know the answer to this, but for the benefit of the
>> Original Poster, the problem is that you need to promote *both*
>> divisions to floating point. Otherwise one of them will give int 0,
>> which gives 0.0 when multiplied by 0.5.
>> 
> 1.0/2 * 1/2.0
>> 0.25
> 
> You can get away with just promoting one of them...you just have to
> promote the _correct_ one

Doh!

Of course you do. I knew that!



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Patrick Maupin
On Apr 1, 11:52 pm, Dennis Lee Bieber  wrote:
> On Thu, 01 Apr 2010 22:44:51 +0200, superpollo 
> declaimed the following in gmane.comp.python.general:
>
> > how much is one half times one half?
>
> import math
> print math.exp((math.log(1) - math.log(2))
>                                  + (math.log(1) - math.log(2)))

That's all well and good, but base 'e' is kind of complicated.  Some
of us were using base 10, and others took Tim's lead and were using
base 2:

>>> print math.exp(((math.log(1)/math.log(2) - math.log(2)/math.log(2)) + 
>>> (math.log(1)/math.log(2) - math.log(2)/math.log(2)))*math.log(2))
0.25
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Tim Chase

Steven D'Aprano wrote:

That's because you need to promote one of them to a float so you get a
floating-point result:

   >>> 1/2 * 1/2
   0
   >>> 1/2 * 1/2.0
   0.0

Oh...wait ;-)


Tim, I'm sure you know the answer to this, but for the benefit of the 
Original Poster, the problem is that you need to promote *both* divisions 
to floating point. Otherwise one of them will give int 0, which gives 0.0 
when multiplied by 0.5.



1.0/2 * 1/2.0

0.25


You can get away with just promoting one of them...you just have 
to promote the _correct_ one (one involved in the first division) 
so that its promotion-of-subresult-to-float carries into all 
subsequent operations/operators:


  >>> 1/2 * 1/2 # (((1/2)*1)/2)==(((0)*1)/2) in 2.x
  0
  >>> 1/2 * 1/2.0 # (((1/2)*1)/2.0)==(((0)*1)/2.0) in 2.x
  0.0
  >>> 1/2 * 1.0/2 # (((1/2)*1.0)/2)==(((0)*1.0)/2) in 2.x
  0.0
  >>> 1/2.0 * 1/2 # (((1/2.0)*1)/2)
  0.25
  >>> 1.0/2 * 1/2 # (((1.0/2)*1)/2)
  0.25

I'd rather be explicit in *real* code that I'd write and 
explicitly float'ify constants or float() integer variables. The 
OP's question was both OT and pretty basic middle-school math 
that google would have nicely answered[1] so IMHO warranted a bit 
of fun. :)


-tkc

[1]
http://www.google.com/search?q=1%2F2+*+1%2F2



--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread David Robinow
On Thu, Apr 1, 2010 at 10:44 PM, Steven D'Aprano
 wrote:
> On Thu, 01 Apr 2010 19:49:43 -0500, Tim Chase wrote:
>
>> David Robinow wrote:
>>> $ python -c "print 1/2 * 1/2"
>>> 0
>>>
>>>  But that's not what I learned in grade school.
>>> (Maybe I should upgrade to 3.1?)
>>
>> That's because you need to promote one of them to a float so you get a
>> floating-point result:
>>
>>    >>> 1/2 * 1/2
>>    0
>>    >>> 1/2 * 1/2.0
>>    0.0
>>
>> Oh...wait ;-)
>
> Tim, I'm sure you know the answer to this, but for the benefit of the
> Original Poster, the problem is that you need to promote *both* divisions
> to floating point. Otherwise one of them will give int 0, which gives 0.0
> when multiplied by 0.5.
>
 1.0/2 * 1/2.0
> 0.25
>
>
> If you want an exact result when multiplying arbitrary fractions, you
> need to avoid floats and decimals and use Fractions:
>
 Fraction(1, 2)**2
> Fraction(1, 4)

I should have known he wouldn't get it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Patrick Maupin
On Apr 1, 9:50 pm, Lie Ryan  wrote:
> On 04/02/10 13:01, Patrick Maupin wrote:
>
>
>
> > On Apr 1, 7:49 pm, Tim Chase  wrote:
> >> David Robinow wrote:
> >>> $ python -c "print 1/2 * 1/2"
> >>> 0
>
> >>>  But that's not what I learned in grade school.
> >>> (Maybe I should upgrade to 3.1?)
>
> >> That's because you need to promote one of them to a float so you
> >> get a floating-point result:
>
> >>    >>> 1/2 * 1/2
> >>    0
> >>    >>> 1/2 * 1/2.0
> >>    0.0
>
> >> Oh...wait ;-)
>
> >> -tkc
>
> > Hmmm, I think I'm starting to see why we need math.fsum() to take care
> > of those rounding errors...
>
> hmm?
>
> >>> import math
> >>> math.fsum([1/2, 1/2])
>
> 0.0
>
> it doesn't appear to take care of those rounding errors, not in this
> case at least.

you're right!  I mis-read the problem.  What we REALLY need is a good
math.fmul()   ;-)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Lie Ryan
On 04/02/10 13:01, Patrick Maupin wrote:
> On Apr 1, 7:49 pm, Tim Chase  wrote:
>> David Robinow wrote:
>>> $ python -c "print 1/2 * 1/2"
>>> 0
>>
>>>  But that's not what I learned in grade school.
>>> (Maybe I should upgrade to 3.1?)
>>
>> That's because you need to promote one of them to a float so you
>> get a floating-point result:
>>
>>>>> 1/2 * 1/2
>>0
>>>>> 1/2 * 1/2.0
>>0.0
>>
>> Oh...wait ;-)
>>
>> -tkc
> 
> Hmmm, I think I'm starting to see why we need math.fsum() to take care
> of those rounding errors...

hmm?

>>> import math
>>> math.fsum([1/2, 1/2])
0.0

it doesn't appear to take care of those rounding errors, not in this
case at least.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Steven D'Aprano
On Thu, 01 Apr 2010 19:49:43 -0500, Tim Chase wrote:

> David Robinow wrote:
>> $ python -c "print 1/2 * 1/2"
>> 0
>> 
>>  But that's not what I learned in grade school.
>> (Maybe I should upgrade to 3.1?)
> 
> That's because you need to promote one of them to a float so you get a
> floating-point result:
> 
>>>> 1/2 * 1/2
>0
>>>> 1/2 * 1/2.0
>0.0
> 
> Oh...wait ;-)

Tim, I'm sure you know the answer to this, but for the benefit of the 
Original Poster, the problem is that you need to promote *both* divisions 
to floating point. Otherwise one of them will give int 0, which gives 0.0 
when multiplied by 0.5.

>>> 1.0/2 * 1/2.0
0.25


If you want an exact result when multiplying arbitrary fractions, you 
need to avoid floats and decimals and use Fractions:

>>> Fraction(1, 2)**2
Fraction(1, 4)



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Steven D'Aprano
On Thu, 01 Apr 2010 19:55:27 -0400, David Robinow wrote:

>>> superpollo wrote:
>>> > how much is one half times one half?
[...]
>  Well, my python says:
> 
> $ python -c "print 1/2 * 1/2"
> 0
> 
>  But that's not what I learned in grade school.
> (Maybe I should upgrade to 3.1?)

Python 2.x defaults to integer division, a design error which has been 
rectified in 3.x.

One can do any of these:

[st...@sylar ~]$ python3.1 -c "print(1/2 * 1/2)"
0.25
[st...@sylar ~]$ python2.6 -c "from __future__ import division; print 1/2 
* 1/2"
0.25
[st...@sylar ~]$ python2.6 -Q new -c "print 1/2 * 1/2"
0.25
[st...@sylar ~]$ python2.6 -c "print 0.5 * 0.5"
0.25


and probably many others as well.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Patrick Maupin
On Apr 1, 7:49 pm, Tim Chase  wrote:
> David Robinow wrote:
> > $ python -c "print 1/2 * 1/2"
> > 0
>
> >  But that's not what I learned in grade school.
> > (Maybe I should upgrade to 3.1?)
>
> That's because you need to promote one of them to a float so you
> get a floating-point result:
>
>    >>> 1/2 * 1/2
>    0
>    >>> 1/2 * 1/2.0
>    0.0
>
> Oh...wait ;-)
>
> -tkc

Hmmm, I think I'm starting to see why we need math.fsum() to take care
of those rounding errors...
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Tim Chase

David Robinow wrote:

$ python -c "print 1/2 * 1/2"
0

 But that's not what I learned in grade school.
(Maybe I should upgrade to 3.1?)


That's because you need to promote one of them to a float so you 
get a floating-point result:


  >>> 1/2 * 1/2
  0
  >>> 1/2 * 1/2.0
  0.0

Oh...wait ;-)

-tkc



--
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread David Robinow
On Thu, Apr 1, 2010 at 7:34 PM, Patrick Maupin  wrote:
> On Apr 1, 4:42 pm, Tim Chase  wrote:
>> superpollo wrote:
>> > how much is one half times one half?
>>
>> Uh, did you try it at the python prompt?  If not, here's the answer:
>>
>>   0.1b * 0.1b = 0.01b
>>
>> Now all you need is to find the recent thread that converts
>> binary floats to decimal floats ;-)
>>
>> -tkc
>
> I thought it was 0b0.1 * 0b0.1 == 0b0.01
>
> Otherwise, you might get it confused with hexadecimal floats :D
 Well, my python says:

$ python -c "print 1/2 * 1/2"
0

 But that's not what I learned in grade school.
(Maybe I should upgrade to 3.1?)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Patrick Maupin
On Apr 1, 4:42 pm, Tim Chase  wrote:
> superpollo wrote:
> > how much is one half times one half?
>
> Uh, did you try it at the python prompt?  If not, here's the answer:
>
>   0.1b * 0.1b = 0.01b
>
> Now all you need is to find the recent thread that converts
> binary floats to decimal floats ;-)
>
> -tkc

I thought it was 0b0.1 * 0b0.1 == 0b0.01

Otherwise, you might get it confused with hexadecimal floats :D
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: off topic but please forgive me me and answer

2010-04-01 Thread Tim Chase

superpollo wrote:

how much is one half times one half?



Uh, did you try it at the python prompt?  If not, here's the answer:

 0.1b * 0.1b = 0.01b

Now all you need is to find the recent thread that converts 
binary floats to decimal floats ;-)


-tkc


--
http://mail.python.org/mailman/listinfo/python-list


off topic but please forgive me me and answer

2010-04-01 Thread superpollo

how much is one half times one half?
--
http://mail.python.org/mailman/listinfo/python-list