3
$\begingroup$

I don't understand why Mathematica doesn't simplify these expressions:

$Assumptions = Element[x,Integers] && x>=0;
Floor[x]
Floor[9/10 + x]

The ouput is:

Floor[x]

Floor[9/10+x]

And I would like it to use the assumption and return:

x

x
$\endgroup$
1
  • $\begingroup$ $Assumptions is only used by functions that use the option Assumptions. Floor does not have any options. $\endgroup$
    – Bob Hanlon
    Commented Jan 15, 2018 at 18:48

1 Answer 1

3
$\begingroup$

It seems this works when you use FullSimplify:

FullSimplify[Floor[9/10 + x], Element[x, Integers]]

Btw, as soon as you use $Assumptions you don't need to specify them and you can simply call Simplify or FullSimplify.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.