Message Boards Message Boards


A simple question on distributive property of floating-point arithmetic

Posted 10 years ago
1 Reply
3 Total Likes
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
or Discard

Group Abstract Group Abstract