very simple math question

coder1

Senior member
Jul 29, 2000
433
0
0
In math when you see an operation that like |10-15|-|20-40|
Do you treat the vertical lines like parenthesis? Does it follow the same order of operations. If so then this should equate to -15. Am I correct in understanding this?
 

Darien

Platinum Member
Feb 27, 2002
2,817
1
0
Originally posted by: coder1
In math when you see an operation that like |10-15|-|20-40|
Do you treat the vertical lines like parenthesis? Does it follow the same order of operations. If so then this should equate to -15. Am I correct in understanding this?



absolute value..take whatever is in it first.

so

|10-15|-|20-40|
|-5| - |-20|
5 - 20
-15
 

RaynorWolfcastle

Diamond Member
Feb 8, 2001
8,968
16
81
they're absolute values and they are not quite the same as parentheses. For example, if you have

(12 - 10) + (4 - 5) then that is the same as 12 + (-10 +4 ) - 5 = 1
whereas |12 - 10| + |4 - 5| is not 12 + |-10 + 4| - 5

since |12 - 10| + |4 - 5| = |2| + |-1| = 2 + 1 = 3
and 12 + |-10 + 4| - 5 = 12 + |-6| - 5 = 12 + 6 - 5 = 13

I hope that helps :)

Oh FYI, |-x| = |x| = x for any positive real number x
 

fr

Diamond Member
Oct 10, 1999
6,408
2
81
Absolute value just means it cannot be negative.

15-20 = -5
|15-20| = 5