Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.2K Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Simplify the FractionalPart of an expression including variables

Posted 3 years ago

See my following testing:

In[199]:= Assuming[{n1,n2,n3}\[Epsilon] Integers, FractionalPart[n1 + 2 n2 - 3 n3 ]]
FullSimplify[FractionalPart[n1 + 2 n2 - 3 n3], {n1,n2,n3}\[Epsilon] Integers ]

Out[199]= FractionalPart[n1 + 2 n2 - 3 n3]

Out[200]= FractionalPart[n1 + 2 n2 - 3 n3]

Why can't I simplify the results, that is, return the correct results 0?

Regards, Zhao

POSTED BY: Hongyi Zhao
3 Replies
Posted 3 years ago

Assuming does not affect evaluation of every type of its second argument. Its scope is limited. From documentation:

enter image description here

In[23]:= Assuming[Element[{n1, n2, n3}, Integers], FractionalPart[n1 + 2 n2 - 3 n3] // Simplify]

Out[23]= 0

Or:

In[25]:= Assuming[Element[_Symbol, Integers], FractionalPart[n1 + 2 n2 - 3 n3] // Simplify]

Out[25]= 0
POSTED BY: Hans Milton
Posted 3 years ago
POSTED BY: Hongyi Zhao
Posted 3 years ago
POSTED BY: Hans Milton
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard