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

imax, imin, lmax, lmin, max, min, ulmax, ulmin, abskernel library math routines

#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);

The (), (), () and () functions return the smallest integer between a and b, inclusive. The (), (), () and () functions return the largest integer between a and b, inclusive.

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

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

April 23, 2018 OpenBSD 7.5