|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
From the documentation:
"abs(A) Absolute value of A. If A is negative, returns -A otherwise
returns A."
er...that isn't what absolute value is. absolute value of A is +A, if A
is negative, the absolute value is +A, not -A. is the behaviour of POV
or the documentation incorrect?
--
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> "abs(A) Absolute value of A. If A is negative, returns -A otherwise
> returns A."
>
> er...that isn't what absolute value is. absolute value of A is +A, if
> A is negative, the absolute value is +A, not -A. is the behaviour of
> POV or the documentation incorrect?
You understanding of unary plus is incorrect.
+A = A. (A < 0) implies (-A > 0).
--
There once was a teacher of great renown, Gather your goods
Whose words were like the tablets of stone, and follow me
Because it's easier to learn than unlearn, Or you will surely die
Because we've passed the point of no return. Paul Simon, 'The Teacher'
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Daniel Hulme wrote:
> You understanding of unary plus is incorrect.
> +A = A. (A < 0) implies (-A > 0).
er...huh? *looks horribly confused* wait. that's true.
-(-1) == 1, which > 0.
--
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tim Cook wrote:
> From the documentation:
>
> "abs(A) Absolute value of A. If A is negative, returns -A otherwise
> returns A."
>
> er...that isn't what absolute value is. absolute value of A is +A, if A
> is negative, the absolute value is +A, not -A. is the behaviour of POV
> or the documentation incorrect?
>
Sounds right to me...
If A is negative, -A is negating a negative number, making it positive.
Right? ;-)
-=- Larry -=-
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tim Cook wrote:
> From the documentation:
>
> "abs(A) Absolute value of A. If A is negative, returns -A otherwise
> returns A."
>
> er...that isn't what absolute value is. absolute value of A is +A, if A
> is negative, the absolute value is +A, not -A. is the behaviour of POV
> or the documentation incorrect?
>
The definition of absolute value is as follows:
|x| is the distance between a given number (x) and 0 on a number line.
Thus:
abs(x) returns the MAGNITUDE of x, such that |x|=|-x|. This value is
always positive.
ADB
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Anthony D. Baye wrote:
>> "abs(A) Absolute value of A. If A is negative, returns -A otherwise
>> returns A."
> Thus:
> abs(x) returns the MAGNITUDE of x, such that |x|=|-x|. This value is
> always positive.
Ahhhh ok, I just stumbled on the minus sign in confusion, as if you're
not paying close attention it looks redundant and as though it returns a
negative number. Isn't there a better way of wording the docs there?
--
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tim Cook" <z99### [at] bellsouthnet> wrote
> Isn't there a better way of wording the docs there?
>
> --
> Tim Cook
>
If you can think of one you could propose it on
povray.documentation.inbuilt.
Chris B.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tim Cook" <z99### [at] bellsouthnet> wrote in message
news:437b1f79$1@news.povray.org...
>
> Ahhhh ok, I just stumbled on the minus sign in confusion, as if you're not
> paying close attention it looks redundant and as though it returns a
> negative number. Isn't there a better way of wording the docs there?
>
Dunno - but IMHO it is a basic, albeit slippery, principle.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tim Cook <z99### [at] bellsouthnet> wrote:
> Isn't there a better way of wording the docs there?
Mathematicians understand it perfectly. Programmers understand it
perfectly.
How can you explain it to someone who is neither? You would have to
start from number theory principles...
What is curious is that people get confused but they don't try to think
about it at all. How would you understand "if A is negative, returns -A"?
If it said "if A is negative, returns A" then that would obviously mean
that it doesn't change it. If it, however, returns "-A" then it has to
change it somehow because "A" is not the same as "-A".
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp wrote:
> What is curious is that people get confused but they don't try to think
> about it at all. How would you understand "if A is negative, returns -A"?
I see "if A is negative" and parse "-A", then the -A following that
makes me think "-A, returns -A", instead of "if the number is negative,
the sign is dropped".
--
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |