POV-Ray : Newsgroups : povray.general : Function: Making negative numbers positive : Re: Function: Making negative numbers positive Server Time
24 Jun 2024 09:37:58 EDT (-0400)
  Re: Function: Making negative numbers positive  
From: clipka
Date: 29 Nov 2015 11:18:22
Message: <565b254e$1@news.povray.org>
Am 29.11.2015 um 09:48 schrieb Kenneth:

> Put more simply: It seems perfectly 'obvious' that +3 X +2 = +6 (as any child
> discovers, when making two sets of three toy blocks, for example.) Likewise, -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. (Although,
> what *else* it should produce is certainly a mystery!)

Here's my attempt:


Suppose you have some salts dissolved in water, i.e. the water contains
ions of arbitrary elements; depending on the type of element, each ion
is either negatively or positively charged, and the magnitude of its
charge may be 1, 2, 3 or maybe even 4. The whole solution is in
electrostatic equilibrium, i.e. its net charge is 0.

Now suppose you do an experiment in which you know that this solution
exchanges ions of a single element type with the outside world, and you
want to figure out the resulting total charge. You don't know the
element type, nor the direction of the exchange; however, you have a
measurement device that will give you the change in the number of ions
in the solution (a positive value indicating a gain, a negative
indicating a loss), and another measurement device that will give you
the charge of the individual ions.

Now you measure that the gain was -100 (i.e. you actually lost ions),
and the individual ions' charge was -2 (i.e. each ion was doubly
negatively charged).

Obviously the solution's charge now has a magnitude of 100*2 = 200. But
how about the sign?

You lost some negatively charged ions, so your positively charged ions
now have the upper hand: The solution is now positively charged.

Thus, it would make sense in this context if the operation of
multiplying two negative numbers would give a positive result.


Note how this example uses a "magnitude-and-direction" style definition
of a signed number. I guess /any/ "natural" example for multiplication
of two negative values needs to be based on this style of definition.
(After all, how would a signed number fit in a magnitude-only numerical
system anyway?)


Post a reply to this message

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