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

fix2

fix2( 
n_value 
) 
=> x_result / nil

Description

This function is a version of the fix function that works for rounding issue in floating-point calculations. The function returns the largest integer not larger than the given argument.

Arguments

n_value

Any number.

Value Returned

x_result

Returns the largest integer not larger than the given argument.

nil

If n_value is not an integer.

Examples

fix2(4.1 * 100) 
=> 410

Related Topics

fix

float

floatp

integerp

Comparing Floating-Point Numbers

Arithmetic Functions


Return to top
 ⠀
X