News:

  • April 19, 2024, 03:38:58 PM

Login with username, password and session length

Author Topic: Floating Point representation explained  (Read 1811 times)

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3658
    • Host Engineering
Floating Point representation explained
« on: December 05, 2016, 09:23:34 AM »
I found a half decent website that explains floating point representation and its potential caveats and possible work-arounds in LAYMAN’s terms:

http://floating-point-gui.de/  Don’t worry – it’s not German.  They picked Deutch for the top-level-domain-name so that it looks like "floating point guide" (get it?  ;D).

The whole site is very well organized, with very simple explanations (no complex notations so you don’t have to have a Ph.D. in Mathematics or Computer Science to understand).

One issue, it mostly shows double precision floating point representation in their examples, not single precision, so the issues are more prevalent with single precision used in most PLCs.

HOWEVER, remember that you typically do not care about the 6th and 7th decimal place (it's just noise to a 12 bit or even 16 bit analog signal), so for most applications, it's just "display/rounding" issues, not actual data issues.  But the website does a good job of explaining all issues/concerns and work-arounds.

b_carlton

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 606
    • thePLCguy
Re: Floating Point representation explained
« Reply #1 on: December 05, 2016, 09:56:45 AM »
Thanks for sharing the link. It is very well done.
An output is a PLC's way of getting its inputs to change.