# math.trunc

`FLOATmath.truncFLOATx`

Available inall subroutines.

Truncate `x` to an integer value less than or equal in absolute value. In other words, round `x` towards zero. Negative values will be rounded up towards zero and positive values will be rounded down towards zero.

For example, 2.2, 2.5, and 2.7 all truncate to 2.0.

This is equivalent to formatting the number to base ten and removing all digits after the decimal point.

## Return Value

If `x` is `math.NAN`, a NaN will be returned.

If `x` is integral, ±0, `x` itself is returned.

If `x` is `math.POS_INFINITY` or `math.NEG_INFINITY`, an infinity of the same sign is returned.

Otherwise, the rounded value of `x` is returned.
{"ft_lang_label":"__label__en","ft_lang_prob":0.68429214,"math_prob":0.9724753,"size":642,"snap":"2023-14-2023-23","text_gpt3_token_len":170,"char_repetition_ratio":0.12852664,"word_repetition_ratio":0.0,"special_character_ratio":0.23208722,"punctuation_ratio":0.1849315,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98106915,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-06-05T06:27:57Z\",\"WARC-Record-ID\":\"<urn:uuid:b52f8219-13df-4ddd-8281-391b0b353405>\",\"Content-Length\":\"164041\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:61cf862e-35e0-4d49-88a5-fe536225eda4>\",\"WARC-Concurrent-To\":\"<urn:uuid:313a1a2a-5e5d-499f-9ed1-0789fb68f975>\",\"WARC-IP-Address\":\"146.75.33.57\",\"WARC-Target-URI\":\"https://developer.fastly.com/reference/vcl/functions/math-rounding/math-trunc/\",\"WARC-Payload-Digest\":\"sha1:WJDPOPRXHKZZZXZCT5KEZTVVFK6MTHBN\",\"WARC-Block-Digest\":\"sha1:VPLUGHXA7K3VLUR333OESLC23ISWJXD3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-23/CC-MAIN-2023-23_segments_1685224651325.38_warc_CC-MAIN-20230605053432-20230605083432-00427.warc.gz\"}"}