Re: [PHP] Calculations

2006-07-06 Thread tedd
At 12:32 PM -0400 7/6/06, Robert Cummings wrote: >On Thu, 2006-07-06 at 08:45, John Nichel wrote: > > Jochem Maas wrote: > > > >> > I guess the chinese-straw-hat operator has had it's meaning >> > changed by general consensus since the days when you were >> > programming with rocks ;-) >> > >> >> P

Re: [PHP] Calculations

2006-07-06 Thread Robert Cummings
On Thu, 2006-07-06 at 08:45, John Nichel wrote: > Jochem Maas wrote: > > tedd wrote: > >> At 11:27 AM +0300 6/28/06, Robin Vickery wrote: > >>> On 28/06/06, tedd <[EMAIL PROTECTED]> wrote: > At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: > > http://www.php.net/manual/en/language.opera

Re: [PHP] Calculations

2006-07-06 Thread tedd
At 8:45 AM -0400 7/6/06, John Nichel wrote: >Jochem Maas wrote: >>tedd wrote: >>>At 11:27 AM +0300 6/28/06, Robin Vickery wrote: On 28/06/06, tedd <[EMAIL PROTECTED]> wrote: >At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: >>http://www.php.net/manual/en/language.operators.bitwise.ph

Re: [PHP] Calculations

2006-07-06 Thread tedd
At 2:36 PM +0200 7/6/06, Jochem Maas wrote: >tedd wrote: >> At 11:27 AM +0300 6/28/06, Robin Vickery wrote: >>> On 28/06/06, tedd <[EMAIL PROTECTED]> wrote: At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: > http://www.php.net/manual/en/language.operators.bitwise.php > I wonder

Re: [PHP] Calculations

2006-07-06 Thread tg-php
Best "proving I'm old" line ever had to have been "I *named* dirt!".. forget where I saw that. Had to share :) -TG "Top posting is for people who remember the conversation and don't care to see it again" :) = = = Original message = = = Jochem Maas wrote: > tedd wrote: >> At 11:27 AM +0300 6

Re: [PHP] Calculations

2006-07-06 Thread John Nichel
Jochem Maas wrote: tedd wrote: At 11:27 AM +0300 6/28/06, Robin Vickery wrote: On 28/06/06, tedd <[EMAIL PROTECTED]> wrote: At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: http://www.php.net/manual/en/language.operators.bitwise.php I wonder why that's true for php when it's common to us

Re: [PHP] Calculations

2006-07-06 Thread Jochem Maas
tedd wrote: > At 11:27 AM +0300 6/28/06, Robin Vickery wrote: >> On 28/06/06, tedd <[EMAIL PROTECTED]> wrote: >>> At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: http://www.php.net/manual/en/language.operators.bitwise.php >>> I wonder why that's true for php when it's common to use ^

Re: [PHP] Calculations and exponents in languages

2006-06-28 Thread John Gunther
Algol used ^ More common, historically, is the use of ** as the exponentiation operator: Fortran, PL/I, perl, python Curiously, many modern languages -- inexplicably -- don't have an exponentiation operator: C, Java, Javascript, PHP John Gunther Robin Vickery wrote: On 28/06/06, [EMAIL P

Re: [PHP] Calculations and exponents in languages

2006-06-28 Thread Robin Vickery
On 28/06/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Huh.. thanks for the illustration Robin. Can't say that I did much with exponents when I've played around with perl or python or C.. and never worked with Java. You've expanded my view. Ok, now what languages DO use ^ for exponents?

Re: [PHP] Calculations

2006-06-28 Thread tedd
At 11:27 AM +0300 6/28/06, Robin Vickery wrote: >On 28/06/06, tedd <[EMAIL PROTECTED]> wrote: >>At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: >>> >>>http://www.php.net/manual/en/language.operators.bitwise.php >>> >> >>I wonder why that's true for php when it's common to use ^ in many other >

Re: [PHP] Calculations and exponents in languages

2006-06-28 Thread tg-php
Huh.. thanks for the illustration Robin. Can't say that I did much with exponents when I've played around with perl or python or C.. and never worked with Java. You've expanded my view. Ok, now what languages DO use ^ for exponents? -TG = = = Original message = = = On 28/06/06, tedd <[EMAIL

Re: [PHP] Calculations

2006-06-28 Thread Robin Vickery
On 28/06/06, tedd <[EMAIL PROTECTED]> wrote: At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: > >http://www.php.net/manual/en/language.operators.bitwise.php > I wonder why that's true for php when it's common to use ^ in many other languages for powers? Perl: ^ is the bitwise xor operator

Re: [PHP] Calculations

2006-06-27 Thread Adam Zey
tedd wrote: At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 2:11 PM To: php-general@lists.php.net Subject: Re: [PHP] Calculations When my level of free time matches my level of

RE: [PHP] Calculations

2006-06-27 Thread tedd
At 2:30 PM -0400 6/27/06, Kristen G. Thorson wrote: > > -Original Message- >> From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] >> Sent: Tuesday, June 27, 2006 2:11 PM >> To: php-general@lists.php.net >> Subject: Re: [PHP] Calculations >> >> W

RE: [PHP] Calculations

2006-06-27 Thread tg-php
= = = Original message = = = > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 27, 2006 2:11 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Calculations > > When my level of free time matches my level of curiousity, I&

RE: [PHP] Calculations

2006-06-27 Thread Kristen G. Thorson
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 27, 2006 2:11 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Calculations > > When my level of free time matches my level of curiousity, I'll have to >

Re: [PHP] Calculations

2006-06-27 Thread tg-php
When my level of free time matches my level of curiousity, I'll have to research it further. For now, I'm ok with not knowing unless someone posts the answer here. hah -TG = = = Original message = = = At 1:45 PM -0400 6/27/06, <[EMAIL PROTECTED]> wrote: >Try: > >pow($base, $exp); > >http://us

Re: [PHP] Calculations

2006-06-27 Thread tedd
At 1:45 PM -0400 6/27/06, <[EMAIL PROTECTED]> wrote: >Try: > >pow($base, $exp); > >http://us2.php.net/manual/en/function.pow.php > >Not sure why PHP doesn't use the ^.. havn't looked to see if it's already used >for something else. > >-TG > Yes, I found that surprising myself. BUT, I did find the

RE: [PHP] Calculations

2006-06-27 Thread Jay Blanchard
[snip] Any ideas how I would go about changing my calculation, as php dosn't seem to recognise ^ meaning 'to the power of'. [/snip] The first thing I would do is read http://www.php.net/math and follow the link to http://www.php.net/manual/en/ref.bc.php which would have me arriving at http://www.p

Re: [PHP] Calculations

2006-06-27 Thread tg-php
Try: pow($base, $exp); http://us2.php.net/manual/en/function.pow.php Not sure why PHP doesn't use the ^.. havn't looked to see if it's already used for something else. -TG = = = Original message = = = Hi there list. Thanks for your help with my other questions. I was carrying on working th

Re: [PHP] Calculations

2006-06-27 Thread tedd
At 6:26 PM +0100 6/27/06, Alex Major wrote: >Hi there list. >Thanks for your help with my other questions. > >I was carrying on working through, and stumbled across a problem when trying >to times something by the 'power' of something. By this I mean..in maths you >can write 3 * (2 ^ 3), the answer

Re: [PHP] Calculations

2006-06-27 Thread Frank M. Kromann
Take a look at the pow() function http://php.net/pow - Frank > Hi there list. > Thanks for your help with my other questions. > > I was carrying on working through, and stumbled across a problem when trying > to times something by the 'power' of something. By this I mean..in maths you > can wr

[PHP] Calculations

2006-06-27 Thread Alex Major
Hi there list. Thanks for your help with my other questions. I was carrying on working through, and stumbled across a problem when trying to times something by the 'power' of something. By this I mean..in maths you can write 3 * (2 ^ 3), the answer to which would be 24. (as 2 ^ 3 = 8). The reaso