Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm a software developer and do very little with math but I have been called upon to incorporate a math function into my app I'm developing.

I'm stumped as to how to figure $x$ where $x = \max \{ \operatorname{round}(7),0 \}$.

Apologies if this is too rudimentary a question for math.stackexchange.

Janie

share|improve this question
1  
If round(7)==7, as I suspect, since 7 > 0... you get the idea. ;) –  J. M. Sep 15 '11 at 15:12
1  
Your question is welcome here. This site is for math questions of all levels, @Jane. –  Srivatsan Sep 15 '11 at 15:14
    
Thanks J.M. I'm not entirely sure why the ",0" is even in the equation. It was part of my spec. I really appreciate your quick answer. JW –  Jane WIlkie Sep 15 '11 at 15:15
    
Well, in general, if you an expression of the form $\max \{ \operatorname{round}(t), 0\}$, then both the round and max parts will be required. For example, if I want my input to be a nonnegative integer, then I could use this formula to sanitize the input. –  Srivatsan Sep 15 '11 at 15:18
    
Someone might want a function like $\max(x,0)$ if s/he wants things zeroed out whenever $x$ is negative... –  J. M. Sep 15 '11 at 15:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.