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$
  • $\begingroup$ $Assumptions is only used by functions that use the option Assumptions. Floor does not have any options. $\endgroup$ – Bob Hanlon Jan 15 '18 at 18:48
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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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