13a8617a8SJordan K. Hubbard.\" Copyright (c) 1985, 1991 Regents of the University of California. 23a8617a8SJordan K. Hubbard.\" All rights reserved. 33a8617a8SJordan K. Hubbard.\" 43a8617a8SJordan K. Hubbard.\" Redistribution and use in source and binary forms, with or without 53a8617a8SJordan K. Hubbard.\" modification, are permitted provided that the following conditions 63a8617a8SJordan K. Hubbard.\" are met: 73a8617a8SJordan K. Hubbard.\" 1. Redistributions of source code must retain the above copyright 83a8617a8SJordan K. Hubbard.\" notice, this list of conditions and the following disclaimer. 93a8617a8SJordan K. Hubbard.\" 2. Redistributions in binary form must reproduce the above copyright 103a8617a8SJordan K. Hubbard.\" notice, this list of conditions and the following disclaimer in the 113a8617a8SJordan K. Hubbard.\" documentation and/or other materials provided with the distribution. 12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 133a8617a8SJordan K. Hubbard.\" may be used to endorse or promote products derived from this software 143a8617a8SJordan K. Hubbard.\" without specific prior written permission. 153a8617a8SJordan K. Hubbard.\" 163a8617a8SJordan K. Hubbard.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 173a8617a8SJordan K. Hubbard.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 183a8617a8SJordan K. Hubbard.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 193a8617a8SJordan K. Hubbard.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 203a8617a8SJordan K. Hubbard.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 213a8617a8SJordan K. Hubbard.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 223a8617a8SJordan K. Hubbard.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 233a8617a8SJordan K. Hubbard.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 243a8617a8SJordan K. Hubbard.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 253a8617a8SJordan K. Hubbard.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 263a8617a8SJordan K. Hubbard.\" SUCH DAMAGE. 273a8617a8SJordan K. Hubbard.\" 288209febbSSergio Carlavilla Delgado.Dd February 15, 2020 293a8617a8SJordan K. Hubbard.Dt SQRT 3 303a8617a8SJordan K. Hubbard.Os 313a8617a8SJordan K. Hubbard.Sh NAME 323a8617a8SJordan K. Hubbard.Nm cbrt , 337a15a32aSJordan K. Hubbard.Nm cbrtf , 34dfe5233bSSteve Kargl.Nm cbrtl , 357a15a32aSJordan K. Hubbard.Nm sqrt , 36e43c8f6aSDavid Schultz.Nm sqrtf , 37e43c8f6aSDavid Schultz.Nm sqrtl 383a8617a8SJordan K. Hubbard.Nd cube root and square root functions 3964890443SBruce Evans.Sh LIBRARY 4064890443SBruce Evans.Lb libm 413a8617a8SJordan K. Hubbard.Sh SYNOPSIS 4232eef9aeSRuslan Ermilov.In math.h 433a8617a8SJordan K. Hubbard.Ft double 443a8617a8SJordan K. Hubbard.Fn cbrt "double x" 457a15a32aSJordan K. Hubbard.Ft float 467a15a32aSJordan K. Hubbard.Fn cbrtf "float x" 47dfe5233bSSteve Kargl.Ft long double 48dfe5233bSSteve Kargl.Fn cbrtl "long double x" 493a8617a8SJordan K. Hubbard.Ft double 503a8617a8SJordan K. Hubbard.Fn sqrt "double x" 517a15a32aSJordan K. Hubbard.Ft float 527a15a32aSJordan K. Hubbard.Fn sqrtf "float x" 53e43c8f6aSDavid Schultz.Ft long double 54e43c8f6aSDavid Schultz.Fn sqrtl "long double x" 553a8617a8SJordan K. Hubbard.Sh DESCRIPTION 563a8617a8SJordan K. HubbardThe 57dfe5233bSSteve Kargl.Fn cbrt , 58dfe5233bSSteve Kargl.Fn cbrtf , 59dfe5233bSSteve Kargland 60dfe5233bSSteve Kargl.Fn cbrtl 617a15a32aSJordan K. Hubbardfunctions compute 623a8617a8SJordan K. Hubbardthe cube root of 63*c5cbef2fSGordon Bergling.Fa x . 643a8617a8SJordan K. Hubbard.Pp 653a8617a8SJordan K. HubbardThe 66e43c8f6aSDavid Schultz.Fn sqrt , 67e43c8f6aSDavid Schultz.Fn sqrtf , 68e43c8f6aSDavid Schultzand 69e43c8f6aSDavid Schultz.Fn sqrtl 707a15a32aSJordan K. Hubbardfunctions compute the 71dfe5233bSSteve Karglnon-negative square root of 72*c5cbef2fSGordon Bergling.Fa x . 733a8617a8SJordan K. Hubbard.Sh RETURN VALUES 743a8617a8SJordan K. HubbardThe 75dfe5233bSSteve Kargl.Fn cbrt , 76dfe5233bSSteve Kargl.Fn cbrtf , 77dfe5233bSSteve Kargland 78dfe5233bSSteve Kargl.Fn cbrtl 797a15a32aSJordan K. Hubbardfunctions return the requested cube root. 803a8617a8SJordan K. HubbardThe 81e43c8f6aSDavid Schultz.Fn sqrt , 82e43c8f6aSDavid Schultz.Fn sqrtf , 83e43c8f6aSDavid Schultzand 84e43c8f6aSDavid Schultz.Fn sqrtl 857a15a32aSJordan K. Hubbardfunctions return the requested square root 863a8617a8SJordan K. Hubbardunless an error occurs. 878e264694SDavid SchultzAn attempt to take the 883a8617a8SJordan K. Hubbard.Fn sqrt 893a8617a8SJordan K. Hubbardof negative 903a8617a8SJordan K. Hubbard.Fa x 91ce448a2eSDavid Schultzraises an invalid exception and causes an \*(Na to be returned 92ce448a2eSDavid Schultz(except that the square root of -0 is valid and equal to -0.) 933a8617a8SJordan K. Hubbard.Sh SEE ALSO 948e264694SDavid Schultz.Xr fenv 3 , 954bd9ba3cSMike Pritchard.Xr math 3 963a8617a8SJordan K. Hubbard.Sh STANDARDS 973a8617a8SJordan K. HubbardThe 98ce448a2eSDavid Schultz.Fn cbrt , 99ce448a2eSDavid Schultz.Fn cbrtf , 100dfe5233bSSteve Kargl.Fn cbrtl , 101ce448a2eSDavid Schultz.Fn sqrt , 102e43c8f6aSDavid Schultz.Fn sqrtf , 103ce448a2eSDavid Schultzand 104e43c8f6aSDavid Schultz.Fn sqrtl 105ce448a2eSDavid Schultzfunctions conform to 106ce448a2eSDavid Schultz.St -isoC-99 . 1073a8617a8SJordan K. Hubbard.Sh HISTORY 1083a8617a8SJordan K. HubbardThe 109563f6bdeSRuslan Ermilov.Fn cbrt 1103a8617a8SJordan K. Hubbardfunction appeared in 1113a8617a8SJordan K. Hubbard.Bx 4.3 . 112e43c8f6aSDavid SchultzThe 1138209febbSSergio Carlavilla Delgado.Fn sqrt 1148209febbSSergio Carlavilla Delgadofunction appeared in 1158209febbSSergio Carlavilla Delgado.At v2 . 116e43c8f6aSDavid Schultz.Fn sqrtl 117e43c8f6aSDavid Schultzfunction appeared in 118e43c8f6aSDavid Schultz.Fx 8.0 . 119dfe5233bSSteve KarglThe 120dfe5233bSSteve Kargl.Fn cbrtl 121dfe5233bSSteve Karglfunction appeared in 122dfe5233bSSteve Kargl.Fx 9.0 . 123