• Post Reply Bookmark Topic Watch Topic
  • New Topic

IEEEremainder method  RSS feed

 
Dario Stepanos
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I understand what the IEEEremainder method does, but could anyone give me a real-life application of why would I prefer using the IEEEremainder method rather than the modulo operation? (I don't need the code, it's just I can figure out what it would be useful for, and my search on the subject was inconclusive.)

Secondly, there are many articles related to IEEE 754 floating-point standard. Is it really important as a programmer to know those things? It's just because there's a 79 page document to read, and before reading it I'd like to know it is as much important as they say.

Thanks a lot to all of you ranchers!
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IEEEremainder() and a deep knowledge of the IEEE floating-point standard are important if, and probably only if, you're doing relatively serious numeric computing (Monte Carlo simulation, quantum chemistry, large-scale modeling or statistics). There are complex numerical algorithms in these areas whose results cannot be easily checked except by comparing their results to a "gold standard", some previous well-known good implementation. In this case, you need to ensure that your results are identical to the last bit to the gold standard, or your code is suspect.

Also, there are situations -- for example, adding very small and very large numbers -- where a relatively deep knowledge of floating-point math is necessary to ensure that you get the right results. But for computer graphics and other more common floating-point applications, none of this matters, at least not most of the time.
 
Dario Stepanos
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernest, very complete and accurate post! I can't wait for the day that I'll become a great programmer just like some ppl around here(hopefully I'll get there someday ).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!