Truncate (Number)

Pronunciation: /ˈtrʌŋ keɪt/ Explain

A number is truncated by removing digits[1]. For example, truncating the number 14.784 to three digits yields 14.7. Note that truncating is not the same as rounding.

NumberTruncate to
Table 1: Truncation examples

In computer languages, to truncate means to convert a floating point or decimal number to an integer[2]. The following code truncates the floating point number 3.62 to the integer 3 and prints '3'.

float num1 = 3.62;
integer num2 = trunc(num1);
print num2

The following code truncates a floating point number 7.2832 to two decimal places and prints '7.28'.

float num1 = 7.2832;
float num2 = trunc(num1 * 100.0) / 100.0;
print num2;


  1. truncate. Unabridged. Random House, Inc.. Last Accessed 12/13/2009.
  2. Decimal.Truncate Method. MSDN Library. Microsoft. Last Accessed 12/13/2009.

Cite this article as:

McAdams, David E. Truncate (Number). 7/18/2018. All Math Words Encyclopedia. Life is a Story Problem LLC.

Revision History

7/18/2018: Changed title to common format. (McAdams, David E.)
12/13/2009: Initial version. (McAdams, David E.)

All Math Words Encyclopedia is a service of Life is a Story Problem LLC.
Copyright © 2018 Life is a Story Problem LLC. All rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License