POV-Ray : Newsgroups : povray.off-topic : imperial vs metric Server Time
4 Sep 2024 01:17:08 EDT (-0400)
  imperial vs metric (Message 21 to 30 of 54)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Jim Henderson
Subject: Re: imperial vs metric
Date: 24 Aug 2010 15:33:19
Message: <4c741e7f$1@news.povray.org>
On Tue, 24 Aug 2010 17:18:01 +0100, Orchid XP v8 wrote:

>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>> things computers do couldn't be done easily without a shift operation
>>> :P
>> 
>> Binary shifts are multiplication and division as well. :P
> 
> What you want is binary rotations. ;-)

That depends on whether the bits actually get rotated.  From my 
recollection of x86 assembly, it's a shift, not a rotation. :)

Jim


Post a reply to this message

From: Jim Henderson
Subject: Re: imperial vs metric
Date: 24 Aug 2010 15:34:21
Message: <4c741ebd@news.povray.org>
On Tue, 24 Aug 2010 21:21:53 +0200, andrel wrote:

> On 24-8-2010 18:11, Jim Henderson wrote:
>> On Tue, 24 Aug 2010 08:41:13 -0500, Mike Raiford wrote:
>> 
>>> On 8/23/2010 10:53 PM, Jim Henderson wrote:
>>>> "Shifting the decimal point" isn't a recognised mathematical
>>>> operation, well, it wasn't when I took maths.  Multiplication and
>>>> division are. Just because one takes a shortcut doesn't mean it's a
>>>> different operation.
>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>> things computers do couldn't be done easily without a shift operation
>>> :P
>> 
>> Binary shifts are multiplication and division as well. :P
> 
> yes and no. Conceptually yes, in a hardware implementation on a chip no.
> That is why they are so much cheaper than real multiplicatons and
> division. The same goes for wetware. 

That still doesn't mean it isn't mathematically a multipilcation or 
division - the operation doesn't change just because you took a 
shortcut. ;-)

> But I appreciate your stubbornness.

I figured you - of all people - would. ;-)

Jim


Post a reply to this message

From: Darren New
Subject: Re: imperial vs metric
Date: 24 Aug 2010 16:33:26
Message: <4c742c96$1@news.povray.org>
andrel wrote:
> That is why they are so much cheaper than real multiplicatons and 
> division. 

If you're using a compiler where a shift by a constant is cheaper than a 
division by a constant, you're in trouble.

-- 
Darren New, San Diego CA, USA (PST)
    Quoth the raven:
        Need S'Mores!


Post a reply to this message

From: Jim Henderson
Subject: Re: imperial vs metric
Date: 24 Aug 2010 17:03:10
Message: <4c74338e$1@news.povray.org>
On Tue, 24 Aug 2010 15:33:19 -0400, Jim Henderson wrote:

> On Tue, 24 Aug 2010 17:18:01 +0100, Orchid XP v8 wrote:
> 
>>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>>> things computers do couldn't be done easily without a shift operation
>>>> :P
>>> 
>>> Binary shifts are multiplication and division as well. :P
>> 
>> What you want is binary rotations. ;-)
> 
> That depends on whether the bits actually get rotated.  From my
> recollection of x86 assembly, it's a shift, not a rotation. :)
> 
> Jim

My recollection, of course, has changed now that I re-read this, I 
remember ROR and ROL operators, which do in fact rotate.  I just remember 
using SHL and SHR more frequently.

Jim


Post a reply to this message

From: Orchid XP v8
Subject: Re: imperial vs metric
Date: 25 Aug 2010 05:28:26
Message: <4c74e23a$1@news.povray.org>
>>>> Binary shifts are multiplication and division as well. :P
>>> What you want is binary rotations. ;-)
>> That depends on whether the bits actually get rotated.  From my
>> recollection of x86 assembly, it's a shift, not a rotation. :)
>>
>> Jim
> 
> My recollection, of course, has changed now that I re-read this, I 
> remember ROR and ROL operators, which do in fact rotate.  I just remember 
> using SHL and SHR more frequently.

Whether your processor supports it or not, binary rotations exist. You 
can implement them the hard way if you must. I've seen a few block 
ciphers that use 'em too...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Stephen
Subject: Re: imperial vs metric
Date: 25 Aug 2010 05:32:06
Message: <4c74e316@news.povray.org>
On 24/08/2010 7:33 PM, Darren New wrote:
> Stephen wrote:
>> Here's a clue
>> http://tinyurl.com/6zz4l7
>
> Oh, it downloaded a MP3. OK. Nevermind. Very cute.
>

Cute, that's me :-)

-- 

Best Regards,
	Stephen


Post a reply to this message

From: Warp
Subject: Re: imperial vs metric
Date: 25 Aug 2010 09:16:56
Message: <4c7517c8@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> andrel wrote:
> > That is why they are so much cheaper than real multiplicatons and 
> > division. 

> If you're using a compiler where a shift by a constant is cheaper than a 
> division by a constant, you're in trouble.

  He was talking about hardware, not about compilers.

-- 
                                                          - Warp


Post a reply to this message

From: Darren New
Subject: Re: imperial vs metric
Date: 25 Aug 2010 11:28:26
Message: <4c75369a$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> andrel wrote:
>>> That is why they are so much cheaper than real multiplicatons and 
>>> division. 
> 
>> If you're using a compiler where a shift by a constant is cheaper than a 
>> division by a constant, you're in trouble.
> 
>   He was talking about hardware, not about compilers.

Yes, I knew that. :-)

-- 
Darren New, San Diego CA, USA (PST)
    Quoth the raven:
        Need S'Mores!


Post a reply to this message

From: andrel
Subject: Re: imperial vs metric
Date: 25 Aug 2010 16:26:21
Message: <4C757C80.6040403@gmail.com>
On 24-8-2010 21:34, Jim Henderson wrote:
> On Tue, 24 Aug 2010 21:21:53 +0200, andrel wrote:
> 
>> On 24-8-2010 18:11, Jim Henderson wrote:
>>> On Tue, 24 Aug 2010 08:41:13 -0500, Mike Raiford wrote:
>>>
>>>> On 8/23/2010 10:53 PM, Jim Henderson wrote:
>>>>> "Shifting the decimal point" isn't a recognised mathematical
>>>>> operation, well, it wasn't when I took maths.  Multiplication and
>>>>> division are. Just because one takes a shortcut doesn't mean it's a
>>>>> different operation.
>>>> Shifts are perfectly legitimate mathematical operations. Many of the
>>>> things computers do couldn't be done easily without a shift operation
>>>> :P
>>> Binary shifts are multiplication and division as well. :P
>> yes and no. Conceptually yes, in a hardware implementation on a chip no.
>> That is why they are so much cheaper than real multiplicatons and
>> division. The same goes for wetware. 
> 
> That still doesn't mean it isn't mathematically a multipilcation or 
> division - the operation doesn't change just because you took a 
> shortcut. ;-)

that is what I said, or at least tried to.

>> But I appreciate your stubbornness.
> 
> I figured you - of all people - would. ;-)

we aim to please


Post a reply to this message

From: andrel
Subject: Re: imperial vs metric
Date: 25 Aug 2010 16:28:29
Message: <4C757D00.9000105@gmail.com>
On 25-8-2010 17:28, Darren New wrote:
> Warp wrote:
>> Darren New <dne### [at] sanrrcom> wrote:
>>> andrel wrote:
>>>> That is why they are so much cheaper than real multiplicatons and 
>>>> division. 
>>
>>> If you're using a compiler where a shift by a constant is cheaper 
>>> than a division by a constant, you're in trouble.
>>
>>   He was talking about hardware, not about compilers.
> 
> Yes, I knew that. :-)
> 
Even so I do not understand the remark. Do you mean that a compiler 
should not be aware what is cheaper (in time) to do the same thing? Or 
that that is not the case anymore, in which case I beg to differ.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.