Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 2 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 2
HBA_GetAdapterAttributes(3HBAAPI)
HBA_GetAdapterPortAttributes(3HBAAPI)
HBA_GetBindingCapability(3HBAAPI)
HBA_GetBindingSupport(3HBAAPI)
HBA_GetDiscoveredPortAttributes(3HBAAPI)
HBA_GetFcpPersistentBinding(3HBAAPI)
HBA_GetFcpTargetMapping(3HBAAPI)
HBA_GetFcpTargetMappingV2(3HBAAPI)
HBA_GetNumberOfAdapters(3HBAAPI)
HBA_GetPersistentBindingV2(3HBAAPI)
HBA_GetPortAttributesByWWN(3HBAAPI)
HBA_GetPortStatistics(3HBAAPI)
HBA_GetVendorLibraryAttributes(3HBAAPI)
HBA_GetWrapperLibraryAttributes(3HBAAPI)
HBA_RefreshAdapterConfiguration(3HBAAPI)
HBA_RefreshInformation(3HBAAPI)
HBA_RegisterForAdapterAddEvents(3HBAAPI)
HBA_RegisterForAdapterEvents(3HBAAPI)
HBA_RegisterForAdapterPortEvents(3HBAAPI)
HBA_RegisterForAdapterPortStatEvents(3HBAAPI)
HBA_RegisterForLinkEvents(3HBAAPI)
HBA_RegisterForTargetEvents(3HBAAPI)
HBA_RemoveAllPersistentBindings(3HBAAPI)
HBA_RemovePersistentBinding(3HBAAPI)
HBA_ScsiReadCapacityV2(3HBAAPI)
HBA_SetBindingSupport(3HBAAPI)
HBA_SetPersistentBindingV2(3HBAAPI)
lgrp_affinity_inherit_get(3LGRP)
lgrp_affinity_inherit_set(3LGRP)
MP_AssignLogicalUnitToTPG(3MPAPI)
MP_DeregisterForObjectPropertyChanges(3MPAPI)
MP_DeregisterForObjectVisibilityChanges(3MPAPI)
MP_DisableAutoFailback(3MPAPI)
MP_GetAssociatedPathOidList(3MPAPI)
MP_GetAssociatedPluginOid(3MPAPI)
MP_GetAssociatedTPGOidList(3MPAPI)
MP_GetDeviceProductOidList(3MPAPI)
MP_GetDeviceProductProperties(3MPAPI)
MP_GetInitiatorPortOidList(3MPAPI)
MP_GetInitiatorPortProperties(3MPAPI)
MP_GetLibraryProperties(3MPAPI)
MP_GetMPLogicalUnitProperties(3MPAPI)
MP_GetMPLuOidListFromTPG(3MPAPI)
MP_GetPathLogicalUnitProperties(3MPAPI)
MP_GetPluginProperties(3MPAPI)
MP_GetProprietaryLoadBalanceOidList(3MPAPI)
MP_GetProprietaryLoadBalanceProperties(3MPAPI)
MP_GetTargetPortGroupProperties(3MPAPI)
MP_GetTargetPortOidList(3MPAPI)
MP_GetTargetPortProperties(3MPAPI)
MP_RegisterForObjectPropertyChanges(3MPAPI)
MP_RegisterForObjectVisibilityChanges(3MPAPI)
MP_SetFailbackPollingRate(3MPAPI)
MP_SetLogicalUnitLoadBalanceType(3MPAPI)
MP_SetPluginLoadBalanceType(3MPAPI)
MP_SetProbingPollingRate(3MPAPI)
- math library exception-handling function
#include <math.h> int matherr(struct exception *exc);
The System V Interface Definition, Third Edition (SVID3) specifies that certain libm functions call matherr() when exceptions are detected. Users may define their own mechanisms for handling exceptions, by including a function named matherr() in their programs. The matherr() function is of the form described above. When an exception occurs, a pointer to the exception structure exc will be passed to the user-supplied matherr() function. This structure, which is defined in the <math.h> header file, is as follows:
struct exception { int type; char *name; double arg1, arg2, retval; };
The type member is an integer describing the type of exception that has occurred, from the following list of constants (defined in the header file):
argument domain exception
argument singularity
overflow range exception
underflow range exception
total loss of significance
partial loss of significance
Both TLOSS and PLOSS reflect limitations of particular algorithms for trigonometric functions that suffer abrupt declines in accuracy at definite boundaries. Since the implementation does not suffer such abrupt declines, PLOSS is never signaled. TLOSS is signaled for Bessel functions only to satisfy SVID3 requirements.
The name member points to a string containing the name of the function that incurred the exception. The arg1 and arg2 members are the arguments with which the function was invoked. retval is set to the default value that will be returned by the function unless the user's matherr() sets it to a different value.
If the user's matherr() function returns non-zero, no exception message will be printed and errno is not set.
When an application is built as a SVID3 conforming application (see standards(5)), if matherr() is not supplied by the user, the default matherr exception-handling mechanisms, summarized in the table below, are invoked upon exception:
0.0 is usually returned, errno is set to EDOM and a message is usually printed on standard error.
The largest finite single-precision number, HUGE of appropriate sign, is returned, errno is set to EDOM, and a message is printed on standard error.
The largest finite single-precision number, HUGE of appropriate sign, is usually returned and errno is set to ERANGE.
0.0 is returned and errno is set to ERANGE.
0.0 is returned, errno is set to ERANGE, and a message is printed on standard error.
In general, errno is not a reliable error indicator because it can be unexpectedly set by a function in a handler for an asynchronous signal.
|
Message is printed (DOMAIN error).
Message is printed (SING error).
Message is printed (TLOSS error).
IEEE NaN result and invalid operation exception.
Maximum finite single-precision floating-point number.
IEEE ∞ result and division-by-zero exception.
The value X_TLOSS is defined in <values.h>.
The interaction of IEEE arithmetic and matherr() is not defined when executing under IEEE rounding modes other than the default round to nearest: matherr() is not always called on overflow or underflow and can return results that differ from those in this table.
The X/Open System Interfaces and Headers (XSH) Issue 3 and later revisions of that specification no longer sanctions the use of the matherr interface. The following table summarizes the values returned in the exceptional cases. In general, XSH dictates that as long as one of the input argument(s) is a NaN, NaN is returned. In particular, pow(NaN,0) = NaN.
|
errno is not to be relied upon in all braced cases.
IEEE NaN result and invalid operation exception.
IEEE ∞ result and division-by-zero exception.
The value X_TLOSS is defined in <values.h>.
The ANSI/ISO-C standard covers a small subset of the CAE specification.
The following table summarizes the values returned in the exceptional cases.
|
IEEE NaN result and invalid operation exception.
IEEE ∞ result and division-by-zero.
Example 1 Example of matherr() function
#include <stdio.h> #include <stdlib.h> #include <math.h> int matherr(struct exception *x) { switch (x->type) { case DOMAIN: /* change sqrt to return sqrt(-arg1), not NaN */ if (!strcmp(x->name, "sqrt")) { x->retval = sqrt(-x->arg1); return (0); /* print message and set errno */ } /* FALLTHRU */ case SING: /* all other domain or sing exceptions, print message and */ /* abort */ fprintf(stderr, "domain exception in %s\n", x->name); abort( ); break; } return (0); /* all other exceptions, execute default procedure */ }
See attributes(5) for descriptions of the following attributes:
|