Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ log(3M) — Sun WorkShop 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exp2(3M)

matherr(3M)

EXP(3M)  —  MATHEMATICAL LIBRARY

NAME

exp, expm1, log, log1p, log10, pow − exponential, logarithm, power

SYNOPSIS

#include <math.h>

double exp(double x);

double expm1(double x);

double log(double x);

double log1p(double x);

double log10(double x);

double pow(double x, double y);

DESCRIPTION

exp(x) computes the exponential function e∗∗x.

expm1(x) computes (e∗∗x)−1 accurately even for tiny x.

log(x) computes the natural logarithm of x.

log1p(x) computes log(1+x) accurately even for tiny x.

log10(x) computes the base-10 logarithm of x.

pow(x, y) computes x raised to the power y.

RETURN VALUES

For exceptional cases, matherr(3M) tabulates the values to be returned as dictated by various Standards. 

SEE ALSO

exp2(3M), matherr(3M)

DIAGNOSTICS

In IEEE754 mode (i.e. the −xlibmieee acc compilation option), log(±0) returns −∞ and raises the division by zero exception; if x<0, log(x) returns a NaN and raises the invalid operation exception; if x == +∞ or a quiet NaN, log(x) returns x and raises no exception; if x is a signaling NaN, log(x) returns a quiet NaN and raises the invalid operation exception; log(1) returns 0 and raises no exception; for all other positive x, log(x) returns a normalized number and raises the inexact exception. 

Sun Release 4.1  —  Last change: 22 Jul 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026