IMAX(9) | Kernel Developer's Manual | IMAX(9)

# NAME

`imax`, `imin`, `lmax`, `lmin`, `max`, `min`, `ulmax`, `ulmin`, `abs` — kernel library math routines

# SYNOPSIS

`#include <lib/libkern/libkern.h>`

int
`imax`(int a, int b);

int
`imin`(int a, int b);

long
`lmax`(long a, long b);

long
`lmin`(long a, long b);

u_int
`max`(u_int a, u_int b);

u_int
`min`(u_int a, u_int b);

u_long
`ulmax`(u_long a, u_long b);

u_long
`ulmin`(u_long a, u_long b);

int
`abs`(int j);

# DESCRIPTION

The `min`(), `imin`(), `lmin`() and `ulmin`() functions return the smallest integer between a and b, inclusive. The `max`(), `imax`(), `lmax`() and `ulmax`() functions return the largest integer between a and b, inclusive.

The `abs`() function computes the absolute value of integer j.

# STANDARDS

The `abs`() function conforms to ANSI X3.159-1989 (“ANSI C89”).

April 23, 2018 | Debian