1*48352Scael.\" Copyright (c) 1985, 1991 Regents of the University of California. 2*48352Scael.\" All rights reserved. 324695Smckusick.\" 4*48352Scael.\" %sccs.include.redist.man% 524695Smckusick.\" 6*48352Scael.\" @(#)sqrt.3 6.3 (Berkeley) 04/19/91 7*48352Scael.\" 8*48352Scael.Dd 9*48352Scael.Dt SQRT 3 10*48352Scael.Os 11*48352Scael.Sh NAME 12*48352Scael.Nm cbrt , 13*48352Scael.Nm sqrt 14*48352Scael.Nd cube root and square root functions 15*48352Scael.Sh SYNOPSIS 16*48352Scael.Fd #include <math.h> 17*48352Scael.Ft double 18*48352Scael.Fn cbrt "double x" 19*48352Scael.Ft double 20*48352Scael.Fn sqrt "double x" 21*48352Scael.Sh DESCRIPTION 22*48352ScaelThe 23*48352Scael.Fn cbrt 24*48352Scaelfunction computes 25*48352Scaelthe cube root of 26*48352Scael.Ar x . 27*48352Scael.Pp 28*48352ScaelThe 29*48352Scael.Fn sqrt 30*48352Scaelcomputes the 31*48352Scaelnon-negative square root of x. 32*48352Scael.Sh RETURN VALUES 33*48352ScaelThe 34*48352Scael.Fn cbrt 35*48352Scaelfunction returns the requested cube root. 36*48352ScaelThe 37*48352Scael.Fn sqrt 38*48352Scaelfunction returns the requested square root 39*48352Scaelunless an error occurs. 40*48352ScaelOn the 41*48352Scael.Tn VAX 42*48352Scaelor 43*48352Scael.Tn Tahoe 44*48352Scaelprocessor an attempt to take the 45*48352Scael.Fn sqrt 46*48352Scaelof negative 47*48352Scael.Fa x 48*48352Scaelcauses an error; in this event, 49*48352Scaelthe global variable 50*48352Scael.Va errno 51*48352Scaelis set to 52*48352Scael.Dv EDOM 53*48352Scaeland a reserved operand fault is generated. 54*48352Scael.Sh ERROR (due to Roundoff etc.) 55*48352ScaelThe 56*48352Scael.Fn cbrt 57*48352Scaelfunction 58*48352Scaelis accurate to within 0.7 59*48352Scael.Em ulps . 60*48352Scael.Pp 61*48352ScaelThe 62*48352Scael.Fn sqrt 63*48352Scaelfunction on a 64*48352Scael.Tn VAX 65*48352Scaelis accurate to within 0.501 66*48352Scael.Em ulps . 67*48352ScaelSqrt on a machine that conforms to 68*48352Scael.Tn IEEE 69*48352Scael754 is correctly rounded 7024378Smiriamin accordance with the rounding mode in force; the error is less than 71*48352Scaelhalf an 72*48352Scael.Em ulp 73*48352Scaelin the default mode (round\-to\-nearest). 74*48352ScaelAn 75*48352Scael.Em ulp 76*48352Scaelis one 77*48352Scael.Em U Ns nit 78*48352Scaelin the 79*48352Scael.Em L Ns ast 80*48352Scael.Em P Ns lace 81*48352Scaelcarried. 82*48352Scael.Sh SEE ALSO 83*48352Scael.Xr math 3 , 84*48352Scael.Xr infnan 3 85*48352Scael.Sh AUTHOR 86*48352Scael.An W. Kahan 87*48352Scael.Sh STANDARDS 88*48352ScaelThe 89*48352Scael.Nm sqrt 90*48352Scaelfunction conforms to 91*48352Scael.St -ansiC . 92*48352Scael.Sh HISTORY 93*48352ScaelThe 94*48352Scael.Nm cbrt 95*48352Scaelfunction appeared in 96*48352Scael.Bx 4.3 . 97