ReactOS 0.4.15-dev-7942-gd23573b
libm_inlines.h File Reference
#include "libm_util.h"
Include dependency graph for libm_inlines.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double _handle_error (char *fname, int opcode, unsigned long long value, int type, int flags, int error, double arg1, double arg2, int nargs)
 Handles an error condition.
 
float _handle_errorf (char *fname, int opcode, unsigned long long value, int type, int flags, int error, float arg1, float arg2, int nargs)
 

Function Documentation

◆ _handle_error()

double _handle_error ( char fname,
int  opcode,
unsigned long long  value,
int  type,
int  flags,
int  error,
double  arg1,
double  arg2,
int  nargs 
)

Handles an error condition.

MIT License


Copyright (c) 2002-2019 Advanced Micro Devices, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this Software and associated documentaon files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Parameters
fname- The name of the function that caused the error.
opcode- Opcode of the function that cause the error (see OP_* consants in fpieee.h).
value- The value to be returned, encoded as uint64_t.
type- The type of error (see _DOMAIN, ... in math.h)
flags- Exception flags (see AMD_F_* constants).
error- Specifies the CRT error code (EDOM, ...).
arg1- First parameter to the function that cause the error.
arg2- Second parameter to the function that cause the error.
nargs- Number of parameters to the function that cause the error.
Returns
The value to be returned.

Definition at line 34 of file _handle_error.c.

44{
45 float retval = *(double*)&value;
46
47 _invoke_matherr(type, fname, arg1, arg2, retval);
48
49 return retval;
50}
int __cdecl _invoke_matherr(int type, char *name, double arg1, double arg2, double retval)
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
Definition: pdh_main.c:94

◆ _handle_errorf()

float _handle_errorf ( char fname,
int  opcode,
unsigned long long  value,
int  type,
int  flags,
int  error,
float  arg1,
float  arg2,
int  nargs 
)

Definition at line 56 of file _handle_error.c.

66{
67 float retval = *(float*)&value;
68
69 _invoke_matherr(type, fname, arg1, arg2, retval);
70
71 return retval;
72}