POV-Ray : Newsgroups : povray.general : Function: Making negative numbers positive : Re: Function: Making negative numbers positive Server Time
24 Jun 2024 09:29:56 EDT (-0400)
  Re: Function: Making negative numbers positive  
From: Jérôme M. Berger
Date: 29 Nov 2015 07:13:20
Message: <565aebe0$1@news.povray.org>
On 11/29/2015 09:48 AM, Kenneth wrote:
> Put more simply: It seems perfectly 'obvious' that +3 X +2 = +6 (as a
ny child
> discovers, when making two sets of three toy blocks, for example.) Like
wise, -2
> X +3 should 'obviously' produce -6 ... although I can't think of a good

> 'child's' example to illustrate that ;-) But when it comes to -2 X -3, 
it just
> doesn't seem 'intuitive' that it should produce a positive value. (Alth
ough,
> what *else* it should produce is certainly a mystery!) HOWEVER... I'm n
ot about
> to question centuries (millennia??) of mathematical thought-- I'll just
 accept
> it. ;-)
> 
    Here's a logical explanation: it also seems 'obvious' that:
(a + b) × c = (a × c) + (b × c) and it is pretty easy to
 validate with
numbers: (1 + 2) × 2 = (3) × 2 = 6 = 2 + 4 = (1 × 
2) + (2 × 2). From a
theoretical standpoint, this is actually one of the ground rules that
define the multiplication (called distributivity). Now, apply this rule
with a = -b and c < 0, for example with your numbers: a = +2, b = -
2 and
c = -3. You get:

(+2 + -2) × -3 = (+2 × -3) + (-2 × -3)

which transforms into:

0 × -3 = (+2 × -3) + (-2 × -3)        by definition of -
2
0 = -6 + (-2 × -3)                    you said yourself it was 'ob
vious'
6 = (-2 × -3)                         by definition of -6

    Note: the 'ovbious' second step derives from the same ground rule by
taking c > 0: 0 = (+2 + -2) × +3 = (+2 × +3) + (-2 × +
3).

        Jerome
-- 
mailto:jeb### [at] freefr
http://jeberger.free.fr
Jabber: jeb### [at] jabberfr


Post a reply to this message


Attachments:
Download 'us-ascii' (1 KB)

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