Built-in Mathematical Functions (ksh93 Only)

ksh93 provides access to the standard set of mathematical functions. They are called using C function call syntax.

Name

Function

Name

Function

abs

Absolute value

hypot

Euclidean distance

acos

Arc cosine

int

Integer part of floating-point number

asin

Arc sine

log

Natural logarithm

atan

Arc tangent

pow

Exponentiation (x y)

atan2

Arc tangent of two values

sin

Sine

cos

Cosine

sinh

Hyperbolic sine

cosh

Hyperbolic cosine

sqrt

Square root

exp

Exponential (e x)

tan

Tangent

fmod

Floating-point remainder

tanh

Hyperbolic tangent

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.