AutomationDirect Technical Support
AutomationDirect | Direct Sales in US and Canada | 1-800-633-0405

C-more Frequently Asked Questions AutomationDirect Logo


Question

My C-more is not displaying the same floating point number as my (PLC, Spreadsheet, or other platform). Why is this?

Answer

This is usually due to truncation or rounding of the floating point value due to the number of decimal places that are displayed. All of our products follow IEEE-754 floating point specification, which is not rounded.

The following example uses this IEEE-754 Floating-Point Conversion to show how rounding can affect floating point numbers.
  • Enter 13.609 and choose the "Not Rounded" calculation, notice that it generates a hexadecimal value of 0x4159BE76
  • At the bottom of the page, select "[ Convert IEEE-754 64-bit Hexadecimal Representations to Decimal Floating-Point Numbers. ]"
  • Enter "4159BE76" and click "Compute" and you will get a result of 13.608999

This shows that 13.609 is not a pure number but has been either truncated or rounded since the binary pattern of 0x4159BE76 is being used.



FAQ Subcategory: None

This item was last updated on 2021-02-17
Document ID: 1302


The information provided in the AutomationDirect knowledge base is provided "as is" without warranty of any kind. AutomationDirect disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall AutomationDirect or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if AutomationDirect or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion of limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.


Copyright © 1999- AutomationDirect.com. ALL RIGHTS RESERVED