[metadata]
id = "FLP01-C"
type = "recommendation"
category = "FLP"
number = 1
title = "Take care in rearranging floating-point expressions"
description = """
Be careful when rearranging floating-point expressions to ensure the greatest
accuracy of the result.
Subclause 5.1.2.3, paragraph 14, of the C Standard [ISO/IEC 9899:2011], states:
Failure to understand the limitations in precision of floating-point-represented
numbers and their implications on the arrangement of expressions can cause
unexpected arithmetic results.
"""
severity = "Low"
likelihood = "Probable"
priority = "P2"
level = "L3"
cert_version = "2016 Edition (Wiki)"
last_modified = "May 20, 2025"
[rules.cert_c.FLP01-C]
enabled = true
[references]
wiki = "https://wiki.sei.cmu.edu/confluence/display/c/FLP01-C.+Take+care+in+rearranging+floating-point+expressions"
cwe = []