• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IEEEremainder method

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ).
 
Die Fledermaus does not fear such a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic