Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 886 Bytes

truncation-of-floating-point-values.md

File metadata and controls

24 lines (22 loc) · 886 Bytes
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
Truncation of Floating-Point Values | Microsoft Docs
11/04/2016
cpp-language
article
C++
floating-point numbers, truncation
051a6e22-c636-4af8-9ac4-40160f4affca
6
mikeblome
mblome
ghogen

Truncation of Floating-Point Values

ANSI 3.2.1.4 The direction of truncation or rounding when a floating-point number is converted to a narrower floating-point number

When an underflow occurs, the value of a floating-point variable is rounded down to zero. An overflow may cause a run-time error or it may produce an unpredictable value, depending on the optimizations specified.

See Also

Floating-Point Math