POV-Ray : Newsgroups : povray.general : unexpected rotation result Server Time
8 Aug 2024 18:15:18 EDT (-0400)
  unexpected rotation result (Message 41 to 48 of 48)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: David Fontaine
Subject: Re: unexpected rotation result
Date: 7 Feb 2001 17:31:51
Message: <3A81CCBB.635F3E91@faricy.net>
Tom Melly wrote:

> (a*(x^2)) + (b*x) + c - but this is not common sense, it is following a
> convention that exists because common sense is not available.

I don't know, it seems sensible to me. Addition versus multiplication: to me,
multiplying implies part of the same thing, like  width and height of a
rectangle, whereas addition is the sum multiple things, ie multiple rectangles.
Think of the problem of surface area of a 3d solid. Hence multiplication
operations should be "groups" when figuring out the order of operations. It
gets progressively more obscure, but I think a similar arument can be made for
all precedences.

Besides from which, mathematics and programming require strict rules and some
degree of consistency by their very nature.

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: David Fontaine
Subject: Re: unexpected rotation result
Date: 7 Feb 2001 17:49:10
Message: <3A81D0CA.309094A@faricy.net>
Tom Melly wrote:

> > NO!! 1+2*3-4 is three, only three, exactly three, no more, no less, and
> most
> > certainly not and NEVER five. If you meant (1+2)*3-4, that would be
> analagous to
> > me typing orange and meaning purple. Anyone who types 1+2*3-4 and expects
> 5 is
> > an idiot.
> >
>
> I disagree. Anyone who types 2*1.5 and expects 5 is an idiot. Typing 1+2*3-4
> and expecting 5 just means that they don't know the conventions. The
> conventions exist because intelligence alone cannot resolve the issue.

I still disagree. Mathematics REQUIRES conventionality. There can be NO
ambiguity in mathematics. It operates on the idea of proof through logic.

There are reasons for the order of operations. Every multiplication operation
takes parts of the same thing; length*width=area of *one* face on a cube, or
average_velocity*time=displacement. Addition and subtraction however take
multiples of something; you sum multiple faces to get the total surface area, et
al. Of course it is not always this simple, but that's why we use parentheses.
The parentheses show us clearly, visually and unambiguously that an operation is
being used as one piece in a larger operation.

If your calculator is giving you five it is merely a limitation of the
technology. The manual probably states clearly that five is techincally wrong,
and shows what the calculator is *really* doing. Any scientific calculator obeys
order of operations, and even the older ones will expect that you request the
result before the computation is complete. Instead the cheap calcs think you
want a result after every operation, then discard everything you typed in.


--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Tom Melly
Subject: Re: unexpected rotation result
Date: 8 Feb 2001 04:36:14
Message: <3a82688e$1@news.povray.org>
"David Fontaine" <dav### [at] faricynet> wrote in message
news:3A81CCBB.635F3E91@faricy.net...

> Think of the problem of surface area of a 3d solid. Hence multiplication
> operations should be "groups" when figuring out the order of operations.
It
> gets progressively more obscure, but I think a similar arument can be made
for
> all precedences.

Well, yes, but obscure is the important point. Okay, you might be able to
make a clear arguement for * over + but what about - and + or / and * ?
There maybe an arguement, but it isn't a clear one. However, any arguement
that says 2*3 is not 6 is plainly batty.


Post a reply to this message

From: Geoff Wedig
Subject: Re: unexpected rotation result
Date: 8 Feb 2001 08:21:07
Message: <3a829d42@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:

> "David Fontaine" <dav### [at] faricynet> wrote in message
> news:3A81CCBB.635F3E91@faricy.net...

>> Think of the problem of surface area of a 3d solid. Hence multiplication
>> operations should be "groups" when figuring out the order of operations.
> It
>> gets progressively more obscure, but I think a similar arument can be made
> for
>> all precedences.

> Well, yes, but obscure is the important point. Okay, you might be able to
> make a clear arguement for * over + but what about - and + or / and * ?
> There maybe an arguement, but it isn't a clear one. However, any arguement
> that says 2*3 is not 6 is plainly batty.

Actually, there are plenty of number systems where this is plainly *not*
true.  There are the simple systems where 6 is undefined (base 4, for
example, where 2+3 = 11, or the mod 5 number system, where 2*3 = 2) and then
there are more complex things, where the definitions which you use for the
multiplicative and additive operators get weird.  I can't give a good
example here, since A. It takes a lot of math, and B. It's been close to a
decade since I did discrete algebra.  How number systems behave is highly
dependant upon the assumptions you place upon them.

Now, if you're talking about the integer, rational, or real number lines,
then yes, 2*3 = 6.  However, those are not the only number system available
to us.  I use mod systems all the time in POV, for example.

Geoff


Post a reply to this message

From: Tom Melly
Subject: Re: unexpected rotation result
Date: 8 Feb 2001 09:11:22
Message: <3a82a90a$1@news.povray.org>
"Geoff Wedig" <wed### [at] darwinepbicwruedu> wrote in message
news:3a829d42@news.povray.org...
> Tom Melly <tom### [at] tomandlucouk> wrote:
> > There maybe an arguement, but it isn't a clear one. However, any
arguement
> > that says 2*3 is not 6 is plainly batty.
>
> Actually, there are plenty of number systems where this is plainly *not*
> true.  There are the simple systems where 6 is undefined (base 4, for
> example, where 2+3 = 11, or the mod 5 number system, where 2*3 = 2) and
then

Well, yes, obviously if you use any other system than decimal, then all bets
are off. However, even recognising the validity of some of the arguements
put forward, I still find it remarkably obtuse to argue that precedence is
no more arbitary than what 1+1 equals (base 3 upwards ;)


Post a reply to this message

From: Geoff Wedig
Subject: Re: unexpected rotation result
Date: 8 Feb 2001 09:22:54
Message: <3a82abbd@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:

> "Geoff Wedig" <wed### [at] darwinepbicwruedu> wrote in message
> news:3a829d42@news.povray.org...
>> Tom Melly <tom### [at] tomandlucouk> wrote:
>> > There maybe an arguement, but it isn't a clear one. However, any
> arguement
>> > that says 2*3 is not 6 is plainly batty.
>>
>> Actually, there are plenty of number systems where this is plainly *not*
>> true.  There are the simple systems where 6 is undefined (base 4, for
>> example, where 2+3 = 11, or the mod 5 number system, where 2*3 = 2) and
> then

> Well, yes, obviously if you use any other system than decimal, then all bets
> are off. However, even recognising the validity of some of the arguements
> put forward, I still find it remarkably obtuse to argue that precedence is
> no more arbitary than what 1+1 equals (base 3 upwards ;)

Oh, yes.  Precedence is a convention, not a base assumption of mathematics. 
Precedence involves how systems of equations are written down, how they're
represented, not the equations themselves.  The equations are what's really
relevant, not their representation.  Representations have changed over the
years (the way Newton wrote out equations was *very* different from anything
we'd see today), but the math that was represented, that is what's
importatn, and that hasn't changed (well, been improved, modified, etc, but
nothing in it has become incorrect within its sphere)

Geoff


Post a reply to this message

From: Peter J  Holzer
Subject: Re: unexpected rotation result
Date: 9 Feb 2001 16:02:18
Message: <slrn988lhg.85s.hjp-usenet@teal.h.hjp.at>
On 2001-02-07 17:23, Warp <war### [at] tagpovrayorg> wrote:
>Tom Melly <tom### [at] tomandlucouk> wrote:
>: I disagree - for example I am not offended/shocked/suprised/whatever
>: that entering 2+3*5 in a calculator gives me 25
>
>  If I enter that in my calculator it gives me 17. Why?
>
>  There are two (main) types of calculators Usually calculators only  .
>  calculate one operation at a time                                   .

I would debate the "usually" here. Every calculator I have ever bought
(starting with that TI-33 over 20 years ago) knew about precedence
rules. The cheap thingies built into mouse mats and rulers probably
don't but they don't have parentheses either (for the same reason -
parentheses require a deeper stack).

An interesting variation are some printing desk calculators, which use
infix operators for multiplication and division and postfix for addition
and subtraction. So to compute 2*3 - 4*5 you would type
CLR 2 * 3 + 4 * 5 -

>  Now, the most advanced calculators (mainly graphical ones, like mine)
>allow you to actually write long expressions (the whole expression is
>shown on the screen of the calculator) and the result is calculated
>only when you press '=' (or usually 'enter' in those calculators).

The TI-33 didn't. It calculated each subexpression as soon as possible.
So if you type 2+3* it would notice that * has higher precedence than +
and throw 2+ on the stack. If you continued typing 5-, it would first
complete the multiplication (giving 15) and further check the stack
for pending operations. Since + has the same precedence as -, it would
perform the addition, too.

The stack had a limited depth (6 entries, I think), but I rarely
exceeded it. That wasn't a high-end calculator at that time, either, it
costed only a few hundred ATS - an HP-42 was about 10 or 20 times as
expensive, IIRC.

	hp

-- 
   _  | Peter J. Holzer    | All Linux applications run on Solaris,
|_|_) | Sysadmin WSR       | which is our implementation of Linux.
| |   | hjp### [at] wsracat      | 
__/   | http://www.hjp.at/ |	-- Scott McNealy, Dec. 2000


Post a reply to this message

From: David Fontaine
Subject: Re: unexpected rotation result
Date: 9 Feb 2001 17:56:29
Message: <3A84756F.7892F9E8@faricy.net>
Tom Melly wrote:

> Well, yes, but obscure is the important point. Okay, you might be able to
> make a clear arguement for * over + but what about - and + or / and * ?
> There maybe an arguement, but it isn't a clear one. However, any arguement
> that says 2*3 is not 6 is plainly batty.

- and + are the same operation. / and * are the same operation. Well, they're
inverse, but to be inverse they must use the same stuff (ya know, like to be
opposites words must describe the same thing--hot and cold). -x = +(-x) and /x =
*(1/x). It wouldn't make any sense to do multiplaction then subtraction then
division then addition, or something like that.

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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