From c71ad1764a07b4be9b04c56fd0d199c0f547404a Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Wed, 19 Feb 2020 00:00:27 +0000 Subject: 12366 Want mdb typelist command Reviewed by: Toomas Soome Reviewed by: Andy Fiddaman Reviewed by: Mike Zeller Approved by: Joshua M. Clulow --- usr/src/cmd/mdb/common/mdb/mdb_cmds.c | 1 + usr/src/cmd/mdb/common/mdb/mdb_ctf.c | 32 ++++++++++++++++++++++++++++++++ usr/src/cmd/mdb/common/mdb/mdb_ctf.h | 3 +++ 3 files changed, 36 insertions(+) diff --git a/usr/src/cmd/mdb/common/mdb/mdb_cmds.c b/usr/src/cmd/mdb/common/mdb/mdb_cmds.c index fff03274d5..aa706c690d 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_cmds.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_cmds.c @@ -3163,6 +3163,7 @@ const mdb_dcmd_t mdb_dcmd_builtins[] = { { "typeset", "[+/-t] var ...", "set variable attributes", cmd_typeset }, { "typedef", "[-c model | -d | -l | -r file | -w file ] [type] [name]", "create synthetic types", cmd_typedef, cmd_typedef_help }, + { "typelist", NULL, "list known types", cmd_typelist }, { "unset", "[name ...]", "unset variables", cmd_unset }, { "vars", "[-npt]", "print listing of variables", cmd_vars }, { "version", NULL, "print debugger version string", cmd_version }, diff --git a/usr/src/cmd/mdb/common/mdb/mdb_ctf.c b/usr/src/cmd/mdb/common/mdb/mdb_ctf.c index 1be7357f05..90cedaea4e 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_ctf.c +++ b/usr/src/cmd/mdb/common/mdb/mdb_ctf.c @@ -2218,3 +2218,35 @@ mdb_ctf_synthetics_to_file(const char *file) return (err); } + +static int +cmd_typelist_type(mdb_ctf_id_t id, void *arg) +{ + char buf[1024]; + + if (mdb_ctf_type_name(id, buf, sizeof (buf)) != NULL) { + mdb_printf("%s\n", buf); + } + return (0); +} + +static int +cmd_typelist_module(void *data, const mdb_map_t *mp, const char *name) +{ + (void) mdb_ctf_type_iter(name, cmd_typelist_type, data); + return (0); +} + +int +cmd_typelist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) +{ + if ((flags & DCMD_ADDRSPEC) != 0) { + return (DCMD_USAGE); + } + + (void) mdb_tgt_object_iter(mdb.m_target, cmd_typelist_module, NULL); + (void) mdb_ctf_type_iter(MDB_CTF_SYNTHETIC_ITER, cmd_typelist_type, + NULL); + + return (DCMD_OK); +} diff --git a/usr/src/cmd/mdb/common/mdb/mdb_ctf.h b/usr/src/cmd/mdb/common/mdb/mdb_ctf.h index 74bc8e95da..639e7b2bdc 100644 --- a/usr/src/cmd/mdb/common/mdb/mdb_ctf.h +++ b/usr/src/cmd/mdb/common/mdb/mdb_ctf.h @@ -35,6 +35,7 @@ #ifdef _MDB #include +#include #endif /* @@ -159,6 +160,8 @@ extern int mdb_ctf_synthetics_init(void); /* Internal */ extern void mdb_ctf_synthetics_fini(void); /* Internal */ extern int mdb_ctf_synthetics_from_file(const char *); /* Internal */ extern int mdb_ctf_synthetics_to_file(const char *); /* Internal */ +extern int cmd_typelist(uintptr_t, uint_t, int, /* Internal */ + const mdb_arg_t *); #endif -- cgit v1.2.3 From ea7201620ceafab72b37e65bea4ec461dd27089d Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Sun, 1 Mar 2020 09:51:21 +0000 Subject: 12355 vnic_unicast_add() can return uninitialised diag value Reviewed by: Robert Mustacchi Reviewed by: Dominik Hassler Approved by: Joshua M. Clulow --- usr/src/uts/common/io/mac/mac_client.c | 5 ++++- usr/src/uts/common/io/vnic/vnic_dev.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/usr/src/uts/common/io/mac/mac_client.c b/usr/src/uts/common/io/mac/mac_client.c index c39e3fa12f..779bdf204a 100644 --- a/usr/src/uts/common/io/mac/mac_client.c +++ b/usr/src/uts/common/io/mac/mac_client.c @@ -23,6 +23,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2018 Joyent, Inc. * Copyright 2017 RackTop Systems. + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. */ /* @@ -1286,7 +1287,7 @@ mac_addr_random(mac_client_handle_t mch, uint_t prefix_len, prefix_len, addr_len - prefix_len); } - *diag = 0; + *diag = MAC_DIAG_NONE; return (0); } @@ -2524,6 +2525,8 @@ i_mac_unicast_add(mac_client_handle_t mch, uint8_t *mac_addr, uint16_t flags, */ ASSERT(!((mip->mi_state_flags & MIS_IS_VNIC) && (vid != VLAN_ID_NONE))); + *diag = MAC_DIAG_NONE; + /* * Can't unicast add if the client asked only for minimal datapath * setup. diff --git a/usr/src/uts/common/io/vnic/vnic_dev.c b/usr/src/uts/common/io/vnic/vnic_dev.c index da52d7bb37..bbbd9b46bd 100644 --- a/usr/src/uts/common/io/vnic/vnic_dev.c +++ b/usr/src/uts/common/io/vnic/vnic_dev.c @@ -22,6 +22,7 @@ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2018 Joyent, Inc. * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved. + * Copyright 2020 OmniOS Community Edition (OmniOSce) Association. */ #include @@ -198,7 +199,7 @@ vnic_unicast_add(vnic_t *vnic, vnic_mac_addr_type_t vnic_addr_type, uint8_t *mac_addr_arg, uint16_t flags, vnic_ioc_diag_t *diag, uint16_t vid, boolean_t req_hwgrp_flag) { - mac_diag_t mac_diag; + mac_diag_t mac_diag = MAC_DIAG_NONE; uint16_t mac_flags = 0; int err; uint_t addr_len; -- cgit v1.2.3 From 343622ca5a82ac99828cc46e04e1f962c09be0e8 Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 27 Feb 2020 13:23:53 -0800 Subject: 12346 need libm(3LIB) and libmvec(3LIB) manpages Reviewed by: Robert Mustacchi Approved by: Joshua M. Clulow --- usr/src/man/man3lib/Makefile | 181 +++--- usr/src/man/man3lib/libm.3lib | 672 +++++++++++++++++++++++ usr/src/man/man3lib/libmvec.3lib | 91 +++ usr/src/pkg/manifests/system-library.man3lib.inc | 3 + 4 files changed, 858 insertions(+), 89 deletions(-) create mode 100644 usr/src/man/man3lib/libm.3lib create mode 100644 usr/src/man/man3lib/libmvec.3lib diff --git a/usr/src/man/man3lib/Makefile b/usr/src/man/man3lib/Makefile index 220ed2ae3e..68478b2e04 100644 --- a/usr/src/man/man3lib/Makefile +++ b/usr/src/man/man3lib/Makefile @@ -12,102 +12,105 @@ # # Copyright 2011, Richard Lowe # Copyright 2013 Nexenta Systems, Inc. All rights reserved. +# Copyright 2020 Joyent, Inc. # include $(SRC)/Makefile.master -MANSECT= 3lib +MANSECT= 3lib -MANFILES= libMPAPI.3lib \ - libSMHBAAPI.3lib \ - libadm.3lib \ - libaio.3lib \ +MANFILES= libMPAPI.3lib \ + libSMHBAAPI.3lib \ + libadm.3lib \ + libaio.3lib \ libavl.3lib \ - libbsdmalloc.3lib \ - libbsm.3lib \ - libc.3lib \ - libc_db.3lib \ - libcfgadm.3lib \ - libcommputil.3lib \ - libcontract.3lib \ - libcpc.3lib \ - libcrypt.3lib \ - libcurses.3lib \ - libdat.3lib \ - libdevid.3lib \ - libdevinfo.3lib \ - libdl.3lib \ - libdlpi.3lib \ - libdns_sd.3lib \ - libdoor.3lib \ - libdtrace.3lib \ - libefi.3lib \ - libelf.3lib \ - libexacct.3lib \ - libfcoe.3lib \ - libform.3lib \ - libfstyp.3lib \ - libgen.3lib \ - libgss.3lib \ - libintl.3lib \ - libiscsit.3lib \ - libkmf.3lib \ - libkrb5.3lib \ - libkstat.3lib \ - libkvm.3lib \ - libl.3lib \ - liblgrp.3lib \ - libmail.3lib \ - libmalloc.3lib \ - libmapmalloc.3lib \ - libmd.3lib \ - libmd5.3lib \ - libmenu.3lib \ - libmp.3lib \ - libmtmalloc.3lib \ - libnls.3lib \ - libnsl.3lib \ - libnvpair.3lib \ - libpam.3lib \ - libpanel.3lib \ - libpapi.3lib \ - libpctx.3lib \ - libpicl.3lib \ - libpicltree.3lib \ - libpkcs11.3lib \ - libpool.3lib \ + libbsdmalloc.3lib \ + libbsm.3lib \ + libc.3lib \ + libc_db.3lib \ + libcfgadm.3lib \ + libcommputil.3lib \ + libcontract.3lib \ + libcpc.3lib \ + libcrypt.3lib \ + libcurses.3lib \ + libdat.3lib \ + libdevid.3lib \ + libdevinfo.3lib \ + libdl.3lib \ + libdlpi.3lib \ + libdns_sd.3lib \ + libdoor.3lib \ + libdtrace.3lib \ + libefi.3lib \ + libelf.3lib \ + libexacct.3lib \ + libfcoe.3lib \ + libform.3lib \ + libfstyp.3lib \ + libgen.3lib \ + libgss.3lib \ + libintl.3lib \ + libiscsit.3lib \ + libkmf.3lib \ + libkrb5.3lib \ + libkstat.3lib \ + libkvm.3lib \ + libl.3lib \ + liblgrp.3lib \ + libm.3lib \ + libmail.3lib \ + libmalloc.3lib \ + libmapmalloc.3lib \ + libmd.3lib \ + libmd5.3lib \ + libmenu.3lib \ + libmp.3lib \ + libmtmalloc.3lib \ + libmvec.3lib \ + libnls.3lib \ + libnsl.3lib \ + libnvpair.3lib \ + libpam.3lib \ + libpanel.3lib \ + libpapi.3lib \ + libpctx.3lib \ + libpicl.3lib \ + libpicltree.3lib \ + libpkcs11.3lib \ + libpool.3lib \ libproc.3lib \ - libproject.3lib \ - libpthread.3lib \ - libresolv.3lib \ - librpcsvc.3lib \ - librsm.3lib \ - librt.3lib \ - librtld_db.3lib \ - libsasl.3lib \ - libscf.3lib \ - libsctp.3lib \ - libsec.3lib \ - libsecdb.3lib \ - libsendfile.3lib \ - libsip.3lib \ - libslp.3lib \ - libsocket.3lib \ - libstmf.3lib \ - libsys.3lib \ - libsysevent.3lib \ - libtecla.3lib \ - libthread.3lib \ - libtnfctl.3lib \ - libtsalarm.3lib \ - libtsnet.3lib \ - libtsol.3lib \ - libumem.3lib \ - libuuid.3lib \ - libvolmgt.3lib \ - libw.3lib \ - libxnet.3lib \ - liby.3lib + libproject.3lib \ + libpthread.3lib \ + libresolv.3lib \ + librpcsvc.3lib \ + librsm.3lib \ + librt.3lib \ + librtld_db.3lib \ + libsasl.3lib \ + libscf.3lib \ + libsctp.3lib \ + libsec.3lib \ + libsecdb.3lib \ + libsendfile.3lib \ + libsip.3lib \ + libslp.3lib \ + libsocket.3lib \ + libstmf.3lib \ + libsys.3lib \ + libsysevent.3lib \ + libtecla.3lib \ + libthread.3lib \ + libtnfctl.3lib \ + libtsalarm.3lib \ + libtsnet.3lib \ + libtsol.3lib \ + libumem.3lib \ + libuuid.3lib \ + libvolmgt.3lib \ + libw.3lib \ + libxnet.3lib \ + liby.3lib MANLINKS= SMHBA_GetAdapterAttributes.3lib \ SMHBA_GetAdapterPortAttributes.3lib \ diff --git a/usr/src/man/man3lib/libm.3lib b/usr/src/man/man3lib/libm.3lib new file mode 100644 index 0000000000..61ada1bbde --- /dev/null +++ b/usr/src/man/man3lib/libm.3lib @@ -0,0 +1,672 @@ +'\" te +.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright 2020 Joyent, Inc. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH libm 3LIB "Feb 27, 2020" +.SH NAME +libm \- C math library +.SH SYNOPSIS +.nf +c99 [ \fIflag\fR... ] \fIfile\fR... \fB-lm\fR [ \fIlibrary\fR... ] +.fi + +.SH DESCRIPTION +Functions in this library provide common elementary mathematical functions and +floating point environment routines defined by System V, ANSI C, POSIX, and so +on. See \fBstandards\fR(5). Additional functions in this library provide +extended support for handling floating point exceptions. +.SH INTERFACES +The shared object \fBlibm.so.2\fR provides the public interfaces defined below. +See \fBIntro\fR(3) for additional information on shared object interfaces. +.sp + +.sp +.TS +tab( ); +lw(2.75i) lw(2.75i) +lw(2.75i) lw(2.75i) +. +\fBacos\fR \fBacosf\fR +\fBacosh\fR \fBacoshf\fR +\fBacoshl\fR \fBacosl\fR +\fBasin\fR \fBasinf\fR +\fBasinh\fR \fBasinhf\fR +\fBasinhl\fR \fBasinl\fR +\fBatan\fR \fBatan2\fR +\fBatan2f\fR \fBatan2l\fR +\fBatanf\fR \fBatanh\fR +\fBatanhf\fR \fBatanhl\fR +\fBatanl\fR \fBcabs\fR +\fBcabsf\fR \fBcabsl\fR +\fBcacos\fR \fBcacosf\fR +\fBcacosh\fR \fBcacoshf\fR +\fBcacoshl\fR \fBcacosl\fR +\fBcarg\fR \fBcargf\fR +\fBcargl\fR \fBcasin\fR +\fBcasinf\fR \fBcasinh\fR +\fBcasinhf\fR \fBcasinhl\fR +\fBcasinl\fR \fBcatan\fR +\fBcatanf\fR \fBcatanh\fR +\fBcatanhf\fR \fBcatanhl\fR +\fBcatanl\fR \fBcbrt\fR +\fBcbrtf\fR \fBcbrtl\fR +\fBccos\fR \fBccosf\fR +\fBccosh\fR \fBccoshf\fR +\fBccoshl\fR \fBccosl\fR +\fBceil\fR \fBceilf\fR +\fBceill\fR \fBcexp\fR +\fBcexpf\fR \fBcexpl\fR +\fBcimag\fR \fBcimagf\fR +\fBcimagl\fR \fBclog\fR +\fBclogf\fR \fBclogl\fR +\fBconj\fR \fBconjf\fR +\fBconjl\fR \fBcopysign\fR +\fBcopysignf\fR \fBcopysignl\fR +\fBcos\fR \fBcosf\fR +\fBcosh\fR \fBcoshf\fR +\fBcoshl\fR \fBcosl\fR +\fBcpow\fR \fBcpowf\fR +\fBcpowl\fR \fBcproj\fR +\fBcprojf\fR \fBcprojl\fR +\fBcreal\fR \fBcrealf\fR +\fBcreall\fR \fBcsin\fR +\fBcsinf\fR \fBcsinh\fR +\fBcsinhf\fR \fBcsinhl\fR +\fBcsinl\fR \fBcsqrt\fR +\fBcsqrtf\fR \fBcsqrtl\fR +\fBctan\fR \fBctanf\fR +\fBctanh\fR \fBctanhf\fR +\fBctanhl\fR \fBctanl\fR +\fBerf\fR \fBerfc\fR +\fBerfcf\fR \fBerfcl\fR +\fBerff\fR \fBerfl\fR +\fBexp\fR \fBexp2\fR +\fBexp2f\fR \fBexp2l\fR +\fBexpf\fR \fBexpl\fR +\fBexpm1\fR \fBexpm1f\fR +\fBexpm1l\fR \fBfabs\fR +\fBfabsf\fR \fBfabsl\fR +\fBfdim\fR \fBfdimf\fR +\fBfdiml\fR \fBfeclearexcept\fR +\fBfegetenv\fR \fBfegetexceptflag\fR +\fBfegetround\fR \fBfeholdexcept\fR +\fBferaiseexcept\fR \fBfesetenv\fR +\fBfesetexceptflag\fR \fBfesetround\fR +\fBfetestexcept\fR \fBfeupdateenv\fR +\fBfex_get_handling\fR \fBfex_get_log\fR +\fBfex_get_log_depth\fR \fBfex_getexcepthandler\fR +\fBfex_log_entry\fR \fBfex_merge_flags\fR +\fBfex_set_handling\fR \fBfex_set_log\fR +\fBfex_set_log_depth\fR \fBfex_setexcepthandler\fR +\fBfloor\fR \fBfloorf\fR +\fBfloorl\fR \fBfma\fR +\fBfmaf\fR \fBfmal\fR +\fBfmax\fR \fBfmaxf\fR +\fBfmaxl\fR \fBfmin\fR +\fBfminf\fR \fBfminl\fR +\fBfmod\fR \fBfmodf\fR +\fBfmodl\fR \fBfrexp\fR +\fBfrexpf\fR \fBfrexpl\fR +\fBgamma\fR \fBgamma_r\fR +\fBgammaf\fR \fBgammaf_r\fR +\fBgammal\fR \fBgammal_r\fR +\fBhypot\fR \fBhypotf\fR +\fBhypotl\fR \fBilogb\fR +\fBilogbf\fR \fBilogbl\fR +\fBisnan\fR \fBj0\fR +\fBj0f\fR \fBj0l\fR +\fBj1\fR \fBj1f\fR +\fBj1l\fR \fBjn\fR +\fBjnf\fR \fBjnl\fR +\fBldexp\fR \fBldexpf\fR +\fBldexpl\fR \fBlgamma\fR +\fBlgamma_r\fR \fBlgammaf\fR +\fBlgammaf_r\fR \fBlgammal\fR +\fBlgammal_r\fR \fBllrint\fR +\fBllrintf\fR \fBllrintl\fR +\fBllround\fR \fBllroundf\fR +\fBllroundl\fR \fBlog\fR +\fBlog10\fR \fBlog10f\fR +\fBlog10l\fR \fBlog1p\fR +\fBlog1pf\fR \fBlog1pl\fR +\fBlog2\fR \fBlog2f\fR +\fBlog2l\fR \fBlogb\fR +\fBlogbf\fR \fBlogbl\fR +\fBlogf\fR \fBlogl\fR +\fBlrint\fR \fBlrintf\fR +\fBlrintl\fR \fBlround\fR +\fBlroundf\fR \fBlroundl\fR +\fBmatherr\fR \fBmodf\fR +\fBmodff\fR \fBmodfl\fR +\fBnan\fR \fBnanf\fR +\fBnanl\fR \fBnearbyint\fR +\fBnearbyintf\fR \fBnearbyintl\fR +\fBnextafter\fR \fBnextafterf\fR +\fBnextafterl\fR \fBnexttoward\fR +\fBnexttowardf\fR \fBnexttowardl\fR +\fBpow\fR \fBpowf\fR +\fBpowl\fR \fBremainder\fR +\fBremainderf\fR \fBremainderl\fR +\fBremquo\fR \fBremquof\fR +\fBremquol\fR \fBrint\fR +\fBrintf\fR \fBrintl\fR +\fBround\fR \fBroundf\fR +\fBroundl\fR \fBscalb\fR +\fBscalbf\fR \fBscalbl\fR +\fBscalbln\fR \fBscalblnf\fR +\fBscalblnl\fR \fBscalbn\fR +\fBscalbnf\fR \fBscalbnl\fR +\fBsigngam\fR \fBsigngamf\fR +\fBsigngaml\fR \fBsignificand\fR +\fBsignificandf\fR \fBsignificandl\fR +\fBsin\fR \fBsincos\fR +\fBsincosf\fR \fBsincosl\fR +\fBsinf\fR \fBsinh\fR +\fBsinhf\fR \fBsinhl\fR +\fBsinl\fR \fBsqrt\fR +\fBsqrtf\fR \fBsqrtl\fR +\fBtan\fR \fBtanf\fR +\fBtanh\fR \fBtanhf\fR +\fBtanhl\fR \fBtanl\fR +\fBtgamma\fR \fBtgammaf\fR +\fBtgammal\fR \fBtrunc\fR +\fBtruncf\fR \fBtruncl\fR +\fBy0\fR \fBy0f\fR +\fBy0l\fR \fBy1\fR +\fBy1f\fR \fBy1l\fR +\fByn\fR \fBynf\fR +\fBynl\fR \fB\fR +.TE + +.sp +.LP +The following interfaces are unique to the x86 and amd64 versions of this library: +.sp + +.sp +.TS +tab( ); +lw(2.75i) lw(2.75i) +. +\fBfegetprec\fR \fBfesetprec\fR +.TE + +.SH ACCURACY +ISO/IEC 9899:1999, also known as C99, specifies the functions listed in the +following tables and states that the accuracy of these functions is +"implementation-defined". The information below characterizes the accuracy +of these functions as implemented in \fBlibm.so.2\fR. For each function, +the tables provide an upper bound on the largest error possible for any +argument and the largest error actually observed among a large sample of +arguments. Errors are expressed in "units in the last place", or ulps, relative +to the exact function value for each argument (regarding the argument as +exact). Ulps depend on the precision of the floating point format: if \fIy\fR +is the exact function value, \fIx\fR and \fIx\fR' are adjacent floating point +numbers such that \fIx\fR < \fIy\fR < \fIx\fR', and \fIx\fR'' is the computed +function value, then provided \fIx\fR, \fIx\fR', and \fIx\fR'' all lie in the +same binade, the error in \fIx\fR'' is |\fIy\fR - \fIx\fR''| / |\fIx\fR - +\fIx\fR'| ulps. In particular, when the error is less than one ulp, the computed +value is one of the two floating point numbers adjacent to the exact value. +.sp +.LP +The bounds and observed errors listed below apply only in the default floating +point modes. Specifically, on SPARC, these bounds assume the rounding direction +is round-to-nearest and non-standard mode is disabled. On x86, the bounds assume +the rounding direction is round-to-nearest and the rounding precision is +round-to-64-bits. Moreover, on x86, floating point function values are returned +in a floating point register in extended double precision format, but the bounds +below assume that the result value is then stored to memory in the format +corresponding to the function's type. On amd64, the bounds assume the rounding +direction in both the x87 floating point control word and the MXCSR is +round-to-nearest, the rounding precision in the x87 control word is +round-to-64-bits, and the FTZ and DAZ modes are disabled. +.sp +.LP +The error bounds listed below are believed to be correct, but smaller bounds +might be proved later. The observed errors are the largest ones currently known, +but larger errors might be discovered later. Numbers in the notes column refer +to the notes following the tables. +.SS "Real Functions" +.SS "Single precision real functions (SPARC, x86, and amd64)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBacosf\fR 1.0 < 1 +\fBacoshf\fR 1.0 < 1 +\fBasinf\fR 1.0 < 1 +\fBasinhf\fR 1.0 < 1 +\fBatanf\fR 1.0 < 1 +\fBatan2f\fR 1.0 < 1 +\fBatanhf\fR 1.0 < 1 +\fBcbrtf\fR 1.0 < 1 +\fBcosf\fR 1.0 < 1 +\fBcoshf\fR 1.0 < 1 +\fBerff\fR 1.0 < 1 +\fBerfcf\fR 1.0 < 1 +\fBexpf\fR 1.0 < 1 +\fBexp2f\fR 1.0 < 1 +\fBexpm1f\fR 1.0 < 1 +\fBhypotf\fR 1.0 < 1 +\fBlgammaf\fR 1.0 < 1 +\fBlogf\fR 1.0 < 1 +\fBlog10f\fR 1.0 < 1 +\fBlog1pf\fR 1.0 < 1 +\fBlog2f\fR 1.0 < 1 +\fBpowf\fR 1.0 < 1 +\fBsinf\fR 1.0 < 1 +\fBsinhf\fR 1.0 < 1 +\fBsqrtf\fR 0.5 0.500 [1] +\fBtanf\fR 1.0 < 1 +\fBtanhf\fR 1.0 < 1 +\fBtgammaf\fR 1.0 < 1 +.TE + +.SS "Double precision real functions (SPARC and amd64)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBacos\fR 1.0 < 1 +\fBacosh\fR 4.0 1.878 +\fBasin\fR 1.0 < 1 +\fBasinh\fR 7.0 1.653 +\fBatan\fR 1.0 <1 +\fBatan2\fR 2.5 1.475 +\fBatanh\fR 4.0 1.960 +\fBcbrt\fR 1.0 < 1 +\fBcos\fR 1.0 < 1 +\fBcosh\fR 3.0 1.168 +\fBerf\fR 4.0 0.959 +\fBerfc\fR 6.0 2.816 +\fBexp\fR 1.0 < 1 +\fBexp2\fR 2.0 1.050 +\fBexpm1\fR 1.0 < 1 +\fBhypot\fR 1.0 < 1 +\fBlgamma\fR 61.5 5.629 [2] +\fBlog\fR 1.0 < 1 +\fBlog10\fR 3.5 1.592 +\fBlog1p\fR 1.0 < 1 +\fBlog2\fR 1.0 < 1 +\fBpow\fR 1.0 < 1 +\fBsin\fR 1.0 < 1 +\fBsinh\fR 4.0 2.078 +\fBsqrt\fR 0.5 0.500 [1] +\fBtan\fR 1.0 < 1 +\fBtanh\fR 3.5 2.136 +\fBtgamma\fR 1.0 < 1 +.TE + +.SS "Double precision real functions (x86)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBacos\fR 1.0 < 1 +\fBacosh\fR 4.0 1.694 +\fBasin\fR 1.0 < 1 +\fBasinh\fR 7.0 1.493 +\fBatan\fR 1.0 < 1 +\fBatan2\fR 1.0 < 1 +\fBatanh\fR 4.0 1.445 +\fBcbrt\fR 1.0 < 1 +\fBcos\fR 1.0 < 1 +\fBcosh\fR 3.0 1.001 +\fBerf\fR 4.0 0.932 +\fBerfc\fR 6.0 2.728 +\fBexp\fR 1.0 < 1 +\fBexp2\fR 1.0 < 1 +\fBexpm1\fR 1.0 < 1 +\fBhypot\fR 1.0 < 1 +\fBlgamma\fR 61.5 2.654 [2] +\fBlog\fR 1.0 < 1 +\fBlog10\fR 1.0 < 1 +\fBlog1p\fR 1.0 < 1 +\fBlog2\fR 1.0 < 1 +\fBpow\fR 1.0 < 1 +\fBsin\fR 1.0 < 1 +\fBsinh\fR 4.0 1.458 +\fBsqrt\fR 0.5003 0.500 [1] +\fBtan\fR 1.0 < 1 +\fBtanh\fR 3.5 1.592 +\fBtgamma\fR 1.0 < 1 +.TE + +.SS "Quadruple precision real functions (SPARC)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBacosl\fR 3.5 1.771 +\fBacoshl\fR 8.0 1.275 +\fBasinl\fR 4.0 2.007 +\fBasinhl\fR 9.0 1.823 +\fBatanl\fR 1.0 < 1 +\fBatan2l\fR 2.5 1.102 +\fBatanhl\fR 4.0 1.970 +\fBcbrtl\fR 1.0 < 1 +\fBcosl\fR 1.0 < 1 +\fBcoshl\fR 3.5 0.985 +\fBerfl\fR 2.0 0.779 +\fBerfcl\fR 68.5 13.923 +\fBexpl\fR 1.0 < 1 +\fBexp2l\fR 2.0 0.714 +\fBexpm1l\fR 2.0 1.020 +\fBhypotl\fR 1.0 < 1 +\fBlgammal\fR 18.5 2.916 [2] +\fBlogl\fR 1.0 < 1 +\fBlog10l\fR 3.5 1.156 +\fBlog1pl\fR 2.0 1.216 +\fBlog2l\fR 3.5 1.675 +\fBpowl\fR 1.0 < 1 +\fBsinl\fR 1.0 < 1 +\fBsinhl\fR 4.5 1.589 +\fBsqrtl\fR 0.5 0.500 [1] +\fBtanl\fR 4.5 2.380 +\fBtanhl\fR 4.5 1.692 +\fBtgammal\fR 1.0 < 1 +.TE + +.SS "Extended precision real functions (x86 and amd64)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBacosl\fR 3.0 1.868 +\fBacoshl\fR 8.0 2.352 +\fBasinl\fR 3.0 1.716 +\fBasinhl\fR 9.0 2.346 +\fBatanl\fR 1.0 < 1 +\fBatan2l\fR 1.0 < 1 +\fBatanhl\fR 4.0 2.438 +\fBcbrtl\fR 1.0 < 1 +\fBcosl\fR 1.0 < 1 +\fBcoshl\fR 3.5 1.288 +\fBerfl\fR 1.0 < 1 +\fBerfcl\fR 78.5 13.407 +\fBexpl\fR 3.5 1.291 +\fBexp2l\fR 1.5 0.807 +\fBexpm1l\fR 4.0 1.936 +\fBhypotl\fR 3.5 2.087 +\fBlgammal\fR 22.5 4.197 [2] +\fBlogl\fR 2.0 0.881 +\fBlog10l\fR 2.0 1.284 +\fBlog1pl\fR 5.0 2.370 +\fBlog2l\fR 1.0 < 1 +\fBpowl\fR 32770.0 4478.132 +\fBsinl\fR 1.0 < 1 +\fBsinhl\fR 4.5 2.356 +\fBsqrtl\fR 0.5 0.500 [1] +\fBtanl\fR 4.5 2.366 +\fBtanhl\fR 4.5 2.417 +\fBtgammal\fR 1.0 < 1 +.TE + +.SS "Notes:" +.ne 2 +.mk +.na +\fB[1]\fR +.ad +.RS 7n +.rt +On SPARC and amd64, \fBsqrtf\fR, \fBsqrt\fR, and \fBsqrtl\fR are correctly +rounded in accordance with IEEE 754. On x86, \fBsqrtl\fR is correctly rounded, +\fBsqrtf\fR is correctly rounded provided the result is narrowed to single +precision as discussed above, but \fBsqrt\fR might not be correctly rounded due +to "double rounding": when the intermediate value computed to extended precision +lies exactly halfway between two representable numbers in double precision, the +result of rounding the intermediate value to double precision is determined by +the round-ties-to-even rule. If this rule causes the second rounding to round in +the same direction as the first, the net rounding error can exceed 0.5 ulps. +(The error is bounded instead by 0.5*(1 + 2^-11) ulps.) +.RE + +.sp +.ne 2 +.mk +.na +\fB[2]\fR +.ad +.RS 7n +.rt +Error bounds for lgamma and lgammal apply only for positive arguments. +.RE + +.SS "Complex functions" +The real-valued complex functions \fBcabsf\fR, \fBcabs\fR, \fBcabsl\fR, +\fBcargf\fR, \fBcarg\fR, and \fBcargl\fR are equivalent to the real functions +\fBhypotf\fR, \fBhypot\fR, \fBhypotl\fR, \fBatan2f\fR, \fBatan2\fR, and +\fBatan2l\fR, respectively. The error bounds and observed errors given above for +the latter functions also apply to the former. +.sp +.LP +The complex functions listed below are complex-valued. For each function, the +error bound shown applies separately to both the real and imaginary parts of the +result. (For example, both the real and imaginary parts of \fBcacosf\fR(\fIz\fR) +are accurate to within 1 ulp regardless of their magnitudes.) Similarly, the +largest observed error shown is the largest error found in either the real or +the imaginary part of the result. +.SS "Single precision complex functions (SPARC and amd64)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBcacosf\fR, \fBcacoshf\fR 1 < 1 [1] +\fBcasinf\fR, \fBcasinhf\fR 1 < 1 +\fBcatanf\fR, \fBcatanhf\fR 6 < 1 +\fBccosf\fR, \fBccoshf\fR 10 2.012 +\fBcexpf\fR 3 2.239 +\fBclogf\fR 3 < 1 +\fBcpowf\fR \(em < 1 [2] +\fBcsinf\fR, \fBcsinhf\fR 10 2.009 +\fBcsqrtf\fR 4 < 1 +\fBctanf\fR, \fBctanhf\fR 13 6.987 +.TE + +.SS "Single precision complex functions (x86)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBcacosf\fR, \fBcacoshf\fR 1 < 1 [1] +\fBcasinf\fR, \fBcasinhf\fR 1 < 1 +\fBcatanf\fR, \fBcatanhf\fR 6 < 1 +\fBccosf\fR, \fBccoshf\fR 10 1.984 +\fBcexpf\fR 3 1.984 +\fBclogf\fR 3 < 1 +\fBcpowf\fR \(em < 1 [2] +\fBcsinf\fR, \fBcsinhf\fR 10 1.973 +\fBcsqrtf\fR 4 < 1 +\fBctanf\fR, \fBctanhf\fR 13 4.657 +.TE + +.SS "Double precision complex functions (SPARC and amd64)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBcacos\fR, \fBcacosh\fR 9 3.831 [1] +\fBcasin\fR, \fBcasinh\fR 9 3.732 +\fBcatan\fR, \fBcatanh\fR 6 4.179 +\fBccos\fR, \fBccosh\fR 10 3.832 +\fBcexp\fR 3 2.255 +\fBclog\fR 3 2.870 +\fBcpow\fR - - [2] +\fBcsin\fR, \fBcsinh\fR 10 3.722 +\fBcsqrt\fR 4 3.204 +\fBctan\fR, \fBctanh\fR 13 7.143 +.TE + +.SS "Double precision complex functions (x86)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBcacos\fR, \fBcacosh\fR 9 3.624 [1] +\fBcasin\fR, \fBcasinh\fR 9 3.624 +\fBcatan\fR, \fBcatanh\fR 6 2.500 +\fBccos\fR, \fBccosh\fR 10 2.929 +\fBcexp\fR 3 2.147 +\fBclog\fR 3 1.927 +\fBcpow\fR - - [2] +\fBcsin\fR, \fBcsinh\fR 10 2.918 +\fBcsqrt\fR 4 1.914 +\fBctan\fR, \fBctanh\fR 13 4.630 +.TE + +.SS "Quadruple precision complex functions (SPARC)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBcacosl\fR, \fBcacoshl\fR 9 3 [1] +\fBcasinl\fR, \fBcasinhl\fR 9 3 +\fBcatanl\fR, \fBcatanhl\fR 6 3 +\fBccosl\fR, \fBccoshl\fR 10 3 +\fBcexpl\fR 3 2 +\fBclogl\fR 3 2 +\fBcpowl\fR - - [2] +\fBcsinl\fR, \fBcsinhl\fR 10 3 +\fBcsqrtl\fR 4 3 +\fBctanl\fR, \fBctanhl\fR 13 5 +.TE + +.SS "Extended precision complex functions (x86 and amd64)" + +.TS +tab( ); +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +cw(1.38i) cw(1.38i) cw(1.38i) cw(1.38i) +. + error bound largest error +function (ulps) observed (ulps) notes +\fBcacosl\fR, \fBcacoshl\fR 9 2 [1] +\fBcasinl\fR, \fBcasinhl\fR 9 2 +\fBcatanl\fR, \fBcatanhl\fR 6 2 +\fBccosl\fR, \fBccoshl\fR 10 3 +\fBcexpl\fR 3 2.699 +\fBclogl\fR 3 1 +\fBcpowl\fR - - [2] +\fBcsinl\fR, \fBcsinhl\fR 10 3 +\fBcsqrtl\fR 4 1.452 +\fBctanl\fR, \fBctanhl\fR 13 5 +.TE + +.SS "Notes:" +.ne 2 +.mk +.na +\fB[1]\fR +.ad +.RS 7n +.rt +The complex hyperbolic trigonometric functions are equivalent by symmetries to +their circular trigonometric counterparts. Because the implementations of these +functions exploit these symmetries, corresponding functions have the same error +bounds and observed errors. +.RE + +.sp +.ne 2 +.mk +.na +\fB[2]\fR +.ad +.RS 7n +.rt +For large arguments, the results computed by \fBcpowf\fR, \fBcpow\fR, and +\fBcpowl\fR can have unbounded relative error. It might be possible to give +error bounds for specific domains, but no such bounds are currently available. +The observed errors shown are for the domain {(\fIz\fR,\fIw\fR) : +\fBmax\fR(|\fBRe\fR \fIz\fR|, |\fBIm\fR \fIz\fR|, |\fBRe\fR \fIw\fR|, |\fBIm\fR +\fIw\fR|) <= 1}. +.RE + +.SH FILES +.ne 2 +.mk +.na +\fB\fB/lib/libm.so.2\fR\fR +.ad +.RS 21n +.rt +shared object +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/lib/64/libm.so.2\fR\fR +.ad +.RS 21n +.rt +64-bit shared object +.RE + +.SH ATTRIBUTES +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab( ) box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +MT-Level Safe with exceptions +.TE + +.sp +.LP +As described on the \fBlgamma\fR(3M) manual page, \fBgamma()\fR and +\fBlgamma()\fR and their \fBfloat\fR and \fBlong double\fR counterparts are +Unsafe. All other functions in \fBlibm.so.2\fR are MT-Safe. +.SH SEE ALSO +\fBIntro\fR(3), \fBlgamma\fR(3M), \fBmath.h\fR(3HEAD), \fBattributes\fR(5), +\fBstandards\fR(5) diff --git a/usr/src/man/man3lib/libmvec.3lib b/usr/src/man/man3lib/libmvec.3lib new file mode 100644 index 0000000000..2be5fda4c7 --- /dev/null +++ b/usr/src/man/man3lib/libmvec.3lib @@ -0,0 +1,91 @@ +'\" te +.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. +.\" Copyright 2020 Joyent, Inc. +.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. +.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. +.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] +.TH libmvec 3LIB "Feb 27, 2020" +.SH NAME +libmvec \- vector math library +.SH SYNOPSIS +.nf +cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmvec\fR [ \fIlibrary\fR... ] +.fi + +.SH DESCRIPTION +This library contains function to evaluate common mathematical functions for +several arguments at once. The argument values are specified by one or more +vectors (arrays) of data, and the corresponding result values are stored in +another vector. +.SH INTERFACES +The shared object \fBlibmvec.so.1\fR provides the public interfaces defined +below. See \fBIntro\fR(3) for additional information on shared object +interfaces. +.sp + +.sp +.TS +tab( ); +lw(2.75i) lw(2.75i) +lw(2.75i) lw(2.75i) +. +\fBvatan_\fR \fBvatanf_\fR +\fBvatan2_\fR \fBvatan2f_\fR +\fBvc_abs_\fR \fBvc_exp_\fR +\fBvc_log_\fR \fBvc_pow_\fR +\fBvcos_\fR \fBvcosf_\fR +\fBvcospi_\fR \fBvcospif_\fR +\fBvexp_\fR \fBvexpf_\fR +\fBvhypot_\fR \fBvhypotf_\fR +\fBvlog_\fR \fBvlogf_\fR +\fBvpow_\fR \fBvpowf_\fR +\fBvrhypot_\fR \fBvrhypotf_\fR +\fBvrsqrt_\fR \fBvrsqrtf_\fR +\fBvsin_\fR \fBvsinf_\fR +\fBvsincos_\fR \fBvsincosf_\fR +\fBvsincospi_\fR \fBvsincospif_\fR +\fBvsinpi_\fR \fBvsinpif_\fR +\fBvsqrt_\fR \fBvsqrtf_\fR +\fBvz_abs_\fR \fBvz_exp_\fR +\fBvz_log_\fR \fBvz_pow_\fR +.TE + +.SH FILES +.ne 2 +.mk +.na +\fB\fB/lib/libmvec.so.1\fR\fR +.ad +.RS 24n +.rt +shared object +.RE + +.sp +.ne 2 +.mk +.na +\fB\fB/lib/64/libmvec.so.1\fR\fR +.ad +.RS 24n +.rt +64-bit shared object +.RE + +.SH ATTRIBUTES +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab( ) box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPE ATTRIBUTE VALUE +_ +MT-Level MT-Safe +.TE + +.SH SEE ALSO +\fBIntro\fR(3), \fBcomplex.h\fR(3HEAD), \fBlibm\fR(3LIB), \fBattributes\fR(5) diff --git a/usr/src/pkg/manifests/system-library.man3lib.inc b/usr/src/pkg/manifests/system-library.man3lib.inc index c552648c8f..bf60cd2b7a 100644 --- a/usr/src/pkg/manifests/system-library.man3lib.inc +++ b/usr/src/pkg/manifests/system-library.man3lib.inc @@ -12,6 +12,7 @@ # # Copyright 2011, Richard Lowe # Copyright 2012 Nexenta Systems, Inc. All rights reserved. +# Copyright 2020 Joyent, Inc. # file path=usr/share/man/man3lib/libadm.3lib @@ -43,6 +44,7 @@ file path=usr/share/man/man3lib/libkstat.3lib file path=usr/share/man/man3lib/libkvm.3lib file path=usr/share/man/man3lib/libl.3lib file path=usr/share/man/man3lib/liblgrp.3lib +file path=usr/share/man/man3lib/libm.3lib file path=usr/share/man/man3lib/libmail.3lib file path=usr/share/man/man3lib/libmalloc.3lib file path=usr/share/man/man3lib/libmapmalloc.3lib @@ -51,6 +53,7 @@ file path=usr/share/man/man3lib/libmd5.3lib file path=usr/share/man/man3lib/libmenu.3lib file path=usr/share/man/man3lib/libmp.3lib file path=usr/share/man/man3lib/libmtmalloc.3lib +file path=usr/share/man/man3lib/libmvec.3lib file path=usr/share/man/man3lib/libnls.3lib file path=usr/share/man/man3lib/libnsl.3lib file path=usr/share/man/man3lib/libnvpair.3lib -- cgit v1.2.3