How do I convert a negative value to zero?

anynamewillbeok shared this question 2 years ago
Answered

I want to convert a number to zero if it is negative.

Is there a function in geogebra that does this?


e.g: mathfunction(-7) = 0


I have been stuck on this for hours, any help would be greatly appreciated.

Best Answer
photo

Try this

f(x)=(x+|x|)/2

Comments (2)

photo
1

Never mind, I though of an answer.

ln( |-7 |-7 + 1 )

photo
2

Try this

f(x)=(x+|x|)/2

© 2023 International GeoGebra Institute