so how do i solve... (4)

1 Name: Anonymous Techie : 2024-06-19 07:14 ID:s77YUVUT

basically i need something like abs(x)+abs(y) in my code, like |x|+|y|
to divide a certain vector/x y values i have
but i dont wanna use || or abs or sign, log,exp, so on,(even >< or >=!) only +-/ to model a similar amount

like x+y, but x+y will cause 0 when x is +2 and y is -2, and i need x+y=0 when x,y is 0,0 because of reasons,
so, it basically an |x|+|y| but built some other way simpler.

how do i do that?

2 Name: Anonymous Techie : 2024-06-19 09:24 ID:Heaven

Has anyone really been far even as decided to use even go want to do look more like?

3 Name: Anonymous Techie : 2024-07-07 11:09 ID:lEDNmbsq

pseudocode that works:

function easyAbsolute(x,y):

if x<0: x=x+(-x)+(-x)
if y<0: y=y+(-y)+(-y)
return x+y

easyAbsolute(x=5,y=-2)
# returns 5+2=7

easyAbsolute(x=-10,y=-5)
# returns 10+5=15

easyAbsolute(x=5,y=7)
# returns 5+7=12

easyAbsolute(x=0,y=0)
# returns 0+0=0

4 Name: Anonymous Techie : 2024-07-12 10:06 ID:Heaven

why not...

if x < 0: x = 0 - x

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: