Group Abstract Group Abstract

Message Boards Message Boards

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

Solution of an inequality with Reduce[ ] ?

Posted 5 years ago
POSTED BY: Zhaokun Xiang
2 Replies

The result is a little strange, but in general when you are working with floating point numbers the distinction between < and <= is not so clear. Using Rationalize gives the result you expect:

Reduce[Rationalize[(k + 12541)*3.97 - 452.25 < 228660.42],
 k, Integers]

I assume that Reduce does an automatic rationalization too, but it must be doing something slightly different.

POSTED BY: Gianluca Gorni
Posted 5 years ago

Thank you very much!!!

POSTED BY: Zhaokun Xiang
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard