WOLFRAM COMMUNITY
Connect with users of Wolfram technologies to learn, solve problems and share ideas
Join
Sign In
Dashboard
Groups
People
Message Boards
Answer
(
Unmark
)
Mark as an Answer
WOLFRAM COMMUNITY
Dashboard
Groups
People
2
|
4534 Views
|
1 Reply
|
3 Total Likes
View groups...
Follow this post
Share
Share this post:
GROUPS:
Mathematica
Numerical Computation
A simple question on distributive property of floating-point arithmetic
Gregory Fridman
Gregory Fridman, St. Petersburg State University of Economics
Posted
11 years ago
Please comment on the following:
a = 11.56;
100000 (1 + a/100) // Floor
1000 (100 + a) // Floor
a =.;
I guess it's a result of numerical computations and settings for accuracy, precision, etc., but nevertheless ...
POSTED BY:
Gregory Fridman
Reply
|
Flag
1 Reply
Sort By:
Replies
Likes
Recent
1
Ilian Gachevski
Ilian Gachevski, Wolfram Research
Posted
11 years ago
Floating-point arithmetic addition and multiplication (in general, not just in Mathematica) are commutative but need not be associative or distributive.
POSTED BY:
Ilian Gachevski
Reply
|
Flag
Reply to this discussion
in reply to
Add Notebook
Community posts can be styled and formatted using the
Markdown syntax
.
Tag limit exceeded
Note: Only the first five people you tag will receive an email notification; the other tagged names will appear as links to their profiles.
Publish anyway
Cancel
Reply Preview
Attachments
Remove
Add a file to this post
Follow this discussion
or
Discard
Group Abstract
Be respectful. Review our
Community Guidelines
to understand your role and responsibilities.
Community Terms of Use
Feedback
Enable JavaScript to interact with content and submit forms on Wolfram websites.
Learn how »