Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sqrt(3m) — Ultrix/UWS 4.4 RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

math(3m)

sqrt(3m)  —  RISC

Name

cbrt, sqrt − cube root, square root

Syntax

#include <math.h>

double cbrt(x)
double x;

double sqrt(x)
double x;

float fsqrt(float x)
float x;

Description

The cbrt function returns the cube root of x. 

The sqrt and fsqrt functions return the square root of x for double and float data types respectively. 

A declaration of

float fsqrt(float)

is required to obtain correct results in a nonstandard compile.

Error Due to Roundoff and Other Reasons

The cbrt function is accurate to within 0.7 ulps. 

The sqrt function on this machine conforms to IEEE 754 and is correctly rounded in accordance with the rounding mode in force; the error is less than half an ulp in the default mode (round−to−nearest).  An ulp is one Unit in the Last Place carried. 

Diagnostics

Both sqrt and fsqrt functions set errno to EDOM when the result is NaN.

The sqrt function returns the default quiet NaN when x is negative indicating the invalid operation. 

See Also

math(3m)

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