Message Boards Message Boards

2
|
4255 Views
|
1 Reply
|
3 Total Likes
View groups...
Share
Share this post:

A simple question on distributive property of floating-point arithmetic

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
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 to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract