Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

round2

round2( 
n_arg 
) 
=>  x_result

Description

This function is a version of the round function that rounds the result in floating-point calculations to its closest integer value.

Arguments

n_arg

A floating-point number.

Value Returned

x_result

Integer whose value is closest to n_arg.

Examples

val=-0.2865
round(val/0.001)*0.001
=> -0.286
round2(val/0.001)*0.001
=> -0.287

Related Topics

Type Conversion Functions (fix and float)


Return to top
 ⠀
X