diff --git a/docs/2-references/quad/README.md b/docs/2-references/quad/README.md index 77718322..c953117a 100644 --- a/docs/2-references/quad/README.md +++ b/docs/2-references/quad/README.md @@ -10,1700 +10,1304 @@ permalink: /2-references/quad/
- As of version 3.6, SLEEF includes a quad-precision math - library. This library includes various functions for computing with - IEEE - 754 quadruple-precision(QP) floating-point numbers. If the - compiler natively supports IEEE 754 QP FP type, numbers in this - natively supported QP data type can be directly passed to the - library functions. Otherwise, the library defines a data type for - retaining numbers in IEEE 754 QP data type. -
- -- Many of the functions are fully vectorized to maximize the - throughput of computation. For these functions, two vector registers - are combined to retain a vector of QP FP numbers, where one of these - registers holds the upper part of QP numbers, and the other register - holds the lower part. Dedicated functions are provided to load to or - store from variables in vector QP data types. -
- +As of version 3.6, SLEEF includes a quad-precision math library. This library +includes various functions for computing with [IEEE 754 quadruple-precision(QP) +floating-point +numbers](https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format). +If the compiler natively supports IEEE 754 QP FP type, numbers in this natively +supported QP data type can be directly passed to the library functions. +Otherwise, the library defines a data type for retaining numbers in IEEE 754 QP +data type. + +Many of the functions are fully vectorized to maximize the throughput of +computation. For these functions, two vector registers are combined to retain a +vector of QP FP numbers, where one of these registers holds the upper part of +QP numbers, and the other register holds the lower part. Dedicated functions +are provided to load to or store from variables in vector QP data types.Sleef_quad
+### `Sleef_quad` -Description
+`Sleef_quad` is a data type for retaining a single QP FP number. If the +compiler natively supports IEEE 754 quad precision FP type, then `Sleef_quad` +is an alias of that data type. -- Sleef_quad is a data type for retaining a single - QP FP number. If the compiler natively supports IEEE 754 quad - precision FP type, then Sleef_quad is an alias of - that data type. -
- -typedef __float128 Sleef_quad;-
typedef long double Sleef_quad; // On AArch64 and System/390 systems- -
- Otherwise, the library defines a 128-bit data type for retaining a number in - IEEE 754 QP data format. -
+```c +typedef __float128 Sleef_quad; +typedef long double Sleef_quad; // On AArch64 and System/390 systems +``` +Otherwise, the library defines a 128-bit data type for retaining a number in +IEEE 754 QP data format.sleef_q - Function to define any QP FP constant
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad sleef_q( int64_t upper, uint64_t lower, int e );
-
-
Description
+### `sleef_q` -- This is a function for defining any QP FP constant. This function - can be used to represent a QP FP constant on compilers without - support for a QP FP data type. This function is small and thus the - code is likely be optimized so that the immediate QP FP value is - available at runtime. You can convert any QP FP value to this - representation using qutil utility program. -
- -SLEEF_QUAD_C - Macro for appending the correct suffix to a QP FP literal
+```c +#includeSynopsis
+Sleef_quad sleef_q (int64_t upper, uint64_t lower, int e); +``` +This is a function for defining any QP FP constant. This function can be used +to represent a QP FP constant on compilers without support for a QP FP data +type. This function is small and thus the code is likely be optimized so that +the immediate QP FP value is available at runtime. You can convert any QP FP +value to this representation using `qutil` utility program. -
-#include <sleefquad.h>
-
-Sleef_quad SLEEF_QUAD_C( literal );
-
-
Description
+Macro for appending the correct suffix to a QP FP literal -- This is a macro for appending the correct suffix to a QP FP - literal. The data type for representing a QP FP number is not - available on all systems, and the data type differs between - architectures. This macro can be used to append the correct suffix - regardless of the architecture. This macro is defined only if the - compiler supports a data type for representing a QP FP number. -
+```c +#includeConstants
- --Below is the table of QP constants defined in sleefquad.h. These are -also defined in the inline headers. These constants are defined as QP -literals if the compiler supports them. Otherwise, they are defined -with sleef_q function. -
+Sleef_quad SLEEF_QUAD_C (literal); +``` +This is a macro for appending the correct suffix to a QP FP literal. The data +type for representing a QP FP number is not available on all systems, and the +data type differs between architectures. This macro can be used to append the +correct suffix regardless of the architecture. This macro is defined only if +the compiler supports a data type for representing a QP FP number. -
-
|
- |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+
|
+
Sleef_strtoq - convert ASCII string to QP FP number
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_strtoq( const char * str, char ** endptr );
-
-Link with -lsleefquad.
-
Description
+### `Sleef_strtoq` -- This is a QP version of the strtod function. It converts the given - string to a QP FP number. It supports converting from both decimal - and hexadecimal numbers. -
- -Sleef_printf, Sleef_fprintf, Sleef_snprintf, Sleef_vprintf, Sleef_vfprintf, Sleef_vsnprintf - Format various data into string and output
- -Synopsis
- -
-#include <sleefquad.h>
-
-int Sleef_printf( const char * fmt, ... );
-int Sleef_fprintf( FILE * fp, const char * fmt, ... );
-int Sleef_snprintf( char * str, size_t size, const char * fmt, ... );
-int Sleef_vprintf( const char * fmt, va_list ap );
-int Sleef_vfprintf( FILE * fp, const char * fmt, va_list ap );
-int Sleef_vsnprintf( char * str, size_t size, const char * fmt, va_list ap );
-
-Link with -lsleefquad.
-
Description
- -- These functions are equivalent to the - corresponding printf functions in the C - standard, except for the following extensions. These functions - support converting from QP FP numbers using Q and P - modifiers with a, e, f and g - conversions. With Q modifier, an immediate QP FP value can be - passed to these functions, while a QP FP value can be passed via a - pointer with P modifier. These functions only supports the - format strings defined in the C standard. Beware - of this bug when - you use this function with clang. These functions are neither - thread safe nor atomic. -
- -Sleef_registerPrintfHook, Sleef_unregisterPrintfHook - Register and unregister C library hooks to printf family funcions in the GNU C Library
- -Synopsis
- -
-#include <sleefquad.h>
-
-void Sleef_registerPrintfHook( void );
-void Sleef_unregisterPrintfHook( void );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions are defined only on systems with Glibc. Glibc has a - functionality for installing C library hooks to extend conversion - capability of its printf-familiy - functions. Sleef_registerPrintfHook installs C - library hooks to add support for the Q and P - modifiers. Sleef_unregisterPrintfHook uninstalls - the C library hooks. -
+Sleef_quad Sleef_strtoq(const char * str, char ** endptr); +``` +Link with `-lsleefquad`. -Sleef_cast_to_doubleq1, Sleef_cast_to_doubleq1_purec, Sleef_cast_to_doubleq1_purecfma - Convert QP number to double-precision number
+### `Sleef_vprintf` +### `Sleef_vfprintf` +### `Sleef_vsnprintf` -Synopsis
+Format various data into string and output -
-#include <sleefquad.h>
-
-double Sleef_cast_to_doubleq1( Sleef_quad a );
-double Sleef_cast_to_doubleq1_purec( Sleef_quad a );
-double Sleef_cast_to_doubleq1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+int Sleef_printf(const char * fmt, ... ); +int Sleef_fprintf(FILE * fp, const char * fmt, ... ); +int Sleef_snprintf(char * str, size_t size, const char * fmt, ... ); +int Sleef_vprintf(const char * fmt, va_list ap); +int Sleef_vfprintf(FILE * fp, const char * fmt, va_list ap); +int Sleef_vsnprintf(char * str, size_t size, const char * fmt, va_list ap); +``` +Link with `-lsleefquad`. -- These functions convert a QP FP value to a double-precision value. -
+These functions are equivalent to the corresponding printf functions in the C +standard, except for the following extensions. These functions support +converting from QP FP numbers using `Q` and P` modifiers with `a`, e`, f` and +g` conversions. With `Q` modifier, an immediate QP FP value can be passed to +these functions, while a QP FP value can be passed via a pointer with `P` +modifier. These functions only supports the format strings defined in the C +standard. Beware of [this bug](https://bugs.llvm.org/show_bug.cgi?id=47665) +when you use this function with clang. These functions are neither thread safe +nor atomic. -Sleef_cast_from_doubleq1, Sleef_cast_from_doubleq1_purec, Sleef_cast_from_doubleq1_purecfma - Convert double-precision number to QP number
+Register and unregister C library hooks to printf family funcions in the GNU C Library -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_cast_from_doubleq1( double a );
-Sleef_quad Sleef_cast_from_doubleq1_purec( double a );
-Sleef_quad Sleef_cast_from_doubleq1_purecfma( double a );
-
-Link with -lsleefquad.
-
Description
+These functions are defined only on systems with Glibc. Glibc has a +functionality for installing C library hooks to extend conversion capability of +its printf-familiy functions. `Sleef_registerPrintfHook` installs C library +hooks to add support for the `Q` and `P` modifiers. +`Sleef_unregisterPrintfHook` uninstalls the C library hooks. -- These functions convert a double-precision value to a QP FP value. -
+### `Sleef_cast_to_doubleq1` +### `Sleef_cast_to_doubleq1_purec` +### `Sleef_cast_to_doubleq1_purecfma` -Sleef_cast_to_int64q1, Sleef_cast_to_int64q1_purec, Sleef_cast_to_int64q1_purecfma - Convert QP number to 64-bit signed integer
+double Sleef_cast_to_doubleq1(Sleef_quad a); +double Sleef_cast_to_doubleq1_purec(Sleef_quad a); +double Sleef_cast_to_doubleq1_purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions convert a QP FP value to a double-precision value. -
-#include <sleefquad.h>
-
-int64_t Sleef_cast_to_int64q1( Sleef_quad a );
-int64_t Sleef_cast_to_int64q1_purec( Sleef_quad a );
-int64_t Sleef_cast_to_int64q1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Convert double-precision number to QP number -- These functions convert a QP FP value to a 64-bit signed integer. -
+```c +#includeSleef_cast_from_int64q1, Sleef_cast_from_int64q1_purec, Sleef_cast_from_int64q1_purecfma - Convert 64-bit signed integer to QP number
+### `Sleef_cast_to_int64q1` +### `Sleef_cast_to_int64q1_purec` +### `Sleef_cast_to_int64q1_purecfma` -Synopsis
+Convert QP number to 64-bit signed integer -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_cast_from_int64q1( int64_t a );
-Sleef_quad Sleef_cast_from_int64q1_purec( int64_t a );
-Sleef_quad Sleef_cast_from_int64q1_purecfma( int64_t a );
-
-Link with -lsleefquad.
-
Description
+int64_t Sleef_cast_to_int64q1(Sleef_quad a); +int64_t Sleef_cast_to_int64q1_purec(Sleef_quad a); +int64_t Sleef_cast_to_int64q1_purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -- These functions convert a 64-bit signed integer to a QP FP value. -
+These functions convert a QP FP value to a 64-bit signed integer. -Sleef_cast_to_uint64q1, Sleef_cast_to_uint64q1_purec, Sleef_cast_to_uint64q1_purecfma - Convert QP number to 64-bit unsigned integer
+```c +#includeSynopsis
+Sleef_quad Sleef_cast_from_int64q1(int64_t a); +Sleef_quad Sleef_cast_from_int64q1_purec(int64_t a); +Sleef_quad Sleef_cast_from_int64q1_purecfma(int64_t a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-uint64_t Sleef_cast_to_uint64q1( Sleef_quad a );
-uint64_t Sleef_cast_to_uint64q1_purec( Sleef_quad a );
-uint64_t Sleef_cast_to_uint64q1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+### `Sleef_cast_to_uint64q1` +### `Sleef_cast_to_uint64q1_purec` +### `Sleef_cast_to_uint64q1_purecfma` -- These functions convert a QP FP value to a 64-bit signed integer. -
+Convert QP number to 64-bit unsigned integer -Sleef_cast_from_uint64q1, Sleef_cast_from_uint64q1_purec, Sleef_cast_from_uint64q1_purecfma - Convert 64-bit unsigned integer to QP number
+These functions convert a QP FP value to a 64-bit signed integer. -Synopsis
+### `Sleef_cast_from_uint64q1` +### `Sleef_cast_from_uint64q1_purec` +### `Sleef_cast_from_uint64q1_purecfma` -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_cast_from_uint64q1( uint64_t a );
-Sleef_quad Sleef_cast_from_uint64q1_purec( uint64_t a );
-Sleef_quad Sleef_cast_from_uint64q1_purecfma( uint64_t a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions convert a 64-bit unsigned integer to a QP FP value. -
+Sleef_quad Sleef_cast_from_uint64q1(uint64_t a); +Sleef_quad Sleef_cast_from_uint64q1_purec(uint64_t a); +Sleef_quad Sleef_cast_from_uint64q1_purecfma(uint64_t a); +``` +Link with `-lsleefquad`. +These functions convert a 64-bit unsigned integer to a QP FP value.QP comparison functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-int32_t Sleef_icmpltq1( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpleq1( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpgtq1( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpgeq1( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpeqq1( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpneq1( Sleef_quad a, Sleef_quad b );
-
-int32_t Sleef_icmpltq1_purec( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpleq1_purec( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpgtq1_purec( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpgeq1_purec( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpeqq1_purec( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpneq1_purec( Sleef_quad a, Sleef_quad b );
-
-int32_t Sleef_icmpltq1_purecfma( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpleq1_purecfma( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpgtq1_purecfma( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpgeq1_purecfma( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpeqq1_purecfma( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpneq1_purecfma( Sleef_quad a, Sleef_quad b );
-
-Link with -lsleefquad.
-
Description
- -- These functions compare two QP FP - values. The lt, le, gt, ge, eq - and ne functions return 1 if and only if a - is less than, less or equal, greather than, greater or equal, equal - and not equal to b, respectively. Otherwise, 0 is - returned. -
- -Sleef_icmpq1, Sleef_icmpq1_purec, Sleef_icmpq1_purecfma - QP comparison
- -Synopsis
- -
-#include <sleefquad.h>
-
-int32_t Sleef_icmpq1( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpq1_purec( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_icmpq1_purecfma( Sleef_quad a, Sleef_quad b );
-
-Link with -lsleefquad.
-
Description
- -- These functions compare two QP FP values. If a is - greater than b, they return - 1. If a is less than b, they - return -1. Otherwise, they return 0. If either argument is NaN, they - return 0. -
- -Sleef_iunordq1, Sleef_iunordq1_purec, Sleef_iunordq1_purecfma - Check orderedness
- -Synopsis
- -
-#include <sleefquad.h>
-
-int32_t Sleef_iunordq1( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_iunordq1_purec( Sleef_quad a, Sleef_quad b );
-int32_t Sleef_iunordq1_purecfma( Sleef_quad a, Sleef_quad b );
-
-Link with -lsleefquad.
-
Description
- -- These functions return 1 if either argument is NaN, otherwise 0. -
- +```c +#includeQP functions for basic arithmetic operations
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_addq1_u05( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_subq1_u05( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_mulq1_u05( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_divq1_u05( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_negq1( Sleef_quad a );
-
-Sleef_quad Sleef_addq1_u05purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_subq1_u05purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_mulq1_u05purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_divq1_u05purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_negq1_purec( Sleef_quad a );
-
-Sleef_quad Sleef_addq1_u05purecfma( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_subq1_u05purecfma( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_mulq1_u05purecfma( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_divq1_u05purecfma( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_negq1_purec( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_addq1_u05(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_subq1_u05(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_mulq1_u05(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_divq1_u05(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_negq1(Sleef_quad a); -- The add, sub, mul and div functions perform addition, subtraction, - multiplication and division of two QP FP values. The error bound of - these functions are 0.5000000001 ULP. The neg functions return - -a. -
+Sleef_quad Sleef_addq1_u05purec(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_subq1_u05purec(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_mulq1_u05purec(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_divq1_u05purec(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_negq1_purec(Sleef_quad a); -Sleef_sqrtq1_u05, Sleef_sqrtq1_u05purec, Sleef_sqrtq1_u05purecfma - square root functions
+The add, sub, mul and div functions perform addition, subtraction, +multiplication and division of two QP FP values. The error bound of these +functions are 0.5000000001 ULP. The neg functions return `-a`. -Synopsis
+### `Sleef_sqrtq1_u05` +### `Sleef_sqrtq1_u05purec` +### `Sleef_sqrtq1_u05purecfma` -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_sqrtq1_u05( Sleef_quad a );
-Sleef_quad Sleef_sqrtq1_u05purec( Sleef_quad a );
-Sleef_quad Sleef_sqrtq1_u05purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions return nonnegative square root of a value - in a. The error bound of the returned value is - 0.5000000001 ULP. -
+Sleef_quad Sleef_sqrtq1_u05(Sleef_quad a); +Sleef_quad Sleef_sqrtq1_u05purec(Sleef_quad a); +Sleef_quad Sleef_sqrtq1_u05purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Sleef_sinq1_u10, Sleef_sinq1_u10purec, Sleef_sinq1_u10purecfma - sine functions
+### `Sleef_sinq1_u10` +### `Sleef_sinq1_u10purec` +### `Sleef_sinq1_u10purecfma` -Synopsis
+sine functions -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_sinq1_u10( Sleef_quad a );
-Sleef_quad Sleef_sinq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_sinq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_sinq1_u10(Sleef_quad a); +Sleef_quad Sleef_sinq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_sinq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -- These functions evaluate the sine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+These functions evaluate the sine function of a value in `a`. The error bound +of the returned value is 1.0 ULP. -Sleef_cosq1_u10, Sleef_cosq1_u10purec, Sleef_cosq1_u10purecfma - cosine functions
+cosine functions -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_cosq1_u10( Sleef_quad a );
-Sleef_quad Sleef_cosq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_cosq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+These functions evaluate the cosine function of a value in `a`. The error bound +of the returned value is 1.0 ULP. -- These functions evaluate the cosine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+### `Sleef_tanq1_u10` +### `Sleef_tanq1_u10purec` +### `Sleef_tanq1_u10purecfma` -Sleef_tanq1_u10, Sleef_tanq1_u10purec, Sleef_tanq1_u10purecfma - tangent functions
+```c +#includeSynopsis
+Sleef_quad Sleef_tanq1_u10(Sleef_quad a); +Sleef_quad Sleef_tanq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_tanq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_tanq1_u10( Sleef_quad a );
-Sleef_quad Sleef_tanq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_tanq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+### `Sleef_asinq1_u10` +### `Sleef_asinq1_u10purec` +### `Sleef_asinq1_u10purecfma` -- These functions evaluate the tangent function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+arc sine functions -Sleef_asinq1_u10, Sleef_asinq1_u10purec, Sleef_asinq1_u10purecfma - arc sine functions
+Sleef_quad Sleef_asinq1_u10(Sleef_quad a); +Sleef_quad Sleef_asinq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_asinq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions evaluate the arc sine function of a value in `a`. The error +bound of the returned value is 1.0 ULP. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_asinq1_u10( Sleef_quad a );
-Sleef_quad Sleef_asinq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_asinq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+arc cosine functions -- These functions evaluate the arc sine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+```c +#includeSleef_acosq1_u10, Sleef_acosq1_u10purec, Sleef_acosq1_u10purecfma - arc cosine functions
+These functions evaluate the arc cosine function of a value in `a`. The error +bound of the returned value is 1.0 ULP. -Synopsis
+### `Sleef_atanq1_u10` +### `Sleef_atanq1_u10purec` +### `Sleef_atanq1_u10purecfma` -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_acosq1_u10( Sleef_quad a );
-Sleef_quad Sleef_acosq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_acosq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions evaluate the arc cosine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+Sleef_quad Sleef_atanq1_u10(Sleef_quad a); +Sleef_quad Sleef_atanq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_atanq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Sleef_atanq1_u10, Sleef_atanq1_u10purec, Sleef_atanq1_u10purecfma - arc tangent functions
+### `Sleef_atan2q1_u10` +### `Sleef_atan2q1_u10purec` +### `Sleef_atan2q1_u10purecfma` -Synopsis
+arc tangent functions of two variables -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_atanq1_u10( Sleef_quad a );
-Sleef_quad Sleef_atanq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_atanq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_atan2q1_u10(Sleef_quad y, Sleef_quad x); +Sleef_quad Sleef_atan2q1_u10purec(Sleef_quad y, Sleef_quad x); +Sleef_quad Sleef_atan2q1_u10purecfma(Sleef_quad y, Sleef_quad x); +``` +Link with `-lsleefquad`. -- These functions evaluate the arc tangent function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+These functions evaluate the arc tangent function of ( `y / x` ). The quadrant +of the result is determined according to the signs of `x` and `y`. The error +bound of the returned value is 1.0 ULP. -Sleef_atan2q1_u10, Sleef_atan2q1_u10purec, Sleef_atan2q1_u10purecfma - arc tangent functions of two variables
+base-`e` exponential functions -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_atan2q1_u10( Sleef_quad y, Sleef_quad x );
-Sleef_quad Sleef_atan2q1_u10purec( Sleef_quad y, Sleef_quad x );
-Sleef_quad Sleef_atan2q1_u10purecfma( Sleef_quad y, Sleef_quad x );
-
-Link with -lsleefquad.
-
Description
+These functions return the value of `e` raised to `a`. The error bound of the +returned value is 1.0 ULP. -- These functions evaluate the arc tangent function of - ( y / x ). The quadrant of - the result is determined according to the signs - of x and y. The error bound of - the returned value is 1.0 ULP. -
+### `Sleef_exp2q1_u10` +### `Sleef_exp2q1_u10purec` +### `Sleef_exp2q1_u10purecfma` -Sleef_expq1_u10, Sleef_expq1_u10purec, Sleef_expq1_u10purecfma - base-e exponential functions
+```c +#includeSynopsis
+Sleef_quad Sleef_exp2q1_u10(Sleef_quad a); +Sleef_quad Sleef_exp2q1_u10purec(Sleef_quad a); +Sleef_quad Sleef_exp2q1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_expq1_u10( Sleef_quad a );
-Sleef_quad Sleef_expq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_expq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+### `Sleef_exp10q1_u10` +### `Sleef_exp10q1_u10purec` +### `Sleef_exp10q1_u10purecfma` -- These functions return the value of e raised - to a. The error bound of the returned value is - 1.0 ULP. -
+base-10 exponentail -Sleef_exp2q1_u10, Sleef_exp2q1_u10purec, Sleef_exp2q1_u10purecfma - base-2 exponential functions
+Sleef_quad Sleef_exp10q1_u10(Sleef_quad a); +Sleef_quad Sleef_exp10q1_u10purec(Sleef_quad a); +Sleef_quad Sleef_exp10q1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions return 10 raised to `a`. The error bound of the returned value +is 1.0 ULP. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_exp2q1_u10( Sleef_quad a );
-Sleef_quad Sleef_exp2q1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_exp2q1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+base-`e` exponential functions minus 1 -- These functions return 2 raised to a. The error - bound of the returned value is 1.0 ULP. -
+```c +#includeSleef_exp10q1_u10, Sleef_exp10q1_u10purec, Sleef_exp10q1_u10purecfma - base-10 exponentail
+These functions return the value one less than `e` raised to `a`. The error +bound of the returned value is 1.0 ULP. -Synopsis
+### `Sleef_logq1_u10` +### `Sleef_logq1_u10purec` +### `Sleef_logq1_u10purecfma` -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_exp10q1_u10( Sleef_quad a );
-Sleef_quad Sleef_exp10q1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_exp10q1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions return 10 raised to a. The error - bound of the returned value is 1.0 ULP. -
+Sleef_quad Sleef_logq1_u10(Sleef_quad a); +Sleef_quad Sleef_logq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_logq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Sleef_expm1q1_u10, Sleef_expm1q1_u10purec, Sleef_expm1q1_u10purecfma - base-e exponential functions minus 1
+### `Sleef_log2q1_u10` +### `Sleef_log2q1_u10purec` +### `Sleef_log2q1_u10purecfma` -Synopsis
+base-2 logarithmic functions -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_expm1q1_u10( Sleef_quad a );
-Sleef_quad Sleef_expm1q1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_expm1q1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_log2q1_u10(Sleef_quad a); +Sleef_quad Sleef_log2q1_u10purec(Sleef_quad a); +Sleef_quad Sleef_log2q1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -- These functions return the value one less than e raised - to a. The error bound of the returned value is - 1.0 ULP. -
+These functions return the base-2 logarithm of `a`. The error bound of the +returned value is 1.0 ULP. -Sleef_logq1_u10, Sleef_logq1_u10purec, Sleef_logq1_u10purecfma - natural logarithmic functions
+base-10 logarithmic functions -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_logq1_u10( Sleef_quad a );
-Sleef_quad Sleef_logq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_logq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+These functions return the base-10 logarithm of `a`. The error bound of the +returned value is 1.0 ULP. -- These functions return the natural logarithm - of a. The error bound of the returned value is - 1.0 ULP. -
+### `Sleef_log1pq1_u10` +### `Sleef_log1pq1_u10purec` +### `Sleef_log1pq1_u10purecfma` -Sleef_log2q1_u10, Sleef_log2q1_u10purec, Sleef_log2q1_u10purecfma - base-2 logarithmic functions
+```c +#includeSynopsis
+Sleef_quad Sleef_log1pq1_u10(Sleef_quad a); +Sleef_quad Sleef_log1pq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_log1pq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_log2q1_u10( Sleef_quad a );
-Sleef_quad Sleef_log2q1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_log2q1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+### `Sleef_powq1_u10` +### `Sleef_powq1_u10purec` +### `Sleef_powq1_u10purecfma` -- These functions return the base-2 logarithm - of a. The error bound of the returned value is - 1.0 ULP. -
+power functions -Sleef_log10q1_u10, Sleef_log10q1_u10purec, Sleef_log10q1_u10purecfma - base-10 logarithmic functions
+Sleef_quad Sleef_powq1_u10(Sleef_quad x, Sleef_quad y); +Sleef_quad Sleef_powq1_u10purec(Sleef_quad x, Sleef_quad y); +Sleef_quad Sleef_powq1_u10purecfma(Sleef_quad x, Sleef_quad y); +``` +Link with `-lsleefquad`. -Synopsis
+These functions return the value of `x` raised to the power +of `y`. The error bound of the returned value is 1.0 ULP. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_log10q1_u10( Sleef_quad a );
-Sleef_quad Sleef_log10q1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_log10q1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+hyperbolic sine functions -- These functions return the base-10 logarithm - of a. The error bound of the returned value is - 1.0 ULP. -
- -Sleef_log1pq1_u10, Sleef_log1pq1_u10purec, Sleef_log1pq1_u10purecfma - logarithm of one plus argument
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_log1pq1_u10( Sleef_quad a );
-Sleef_quad Sleef_log1pq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_log1pq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
- -- These functions return the natural logarithm of - ( 1 + a ). The error bound of the returned value is - 1.0 ULP. -
- -Sleef_powq1_u10, Sleef_powq1_u10purec, Sleef_powq1_u10purecfma - power functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_powq1_u10( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_powq1_u10purec( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_powq1_u10purecfma( Sleef_quad x, Sleef_quad y );
-
-Link with -lsleefquad.
-
Description
- -- These functions return the value of x raised to the power - of y. The error bound of the returned value is 1.0 ULP. -
- -Sleef_sinhq1_u10, Sleef_sinhq1_u10purec, Sleef_sinhq1_u10purecfma - hyperbolic sine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_sinhq1_u10( Sleef_quad a );
-Sleef_quad Sleef_sinhq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_sinhq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
- -- These functions evaluate the hyperbolic sine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
- -Sleef_coshq1_u10, Sleef_coshq1_u10purec, Sleef_coshq1_u10purecfma - hyperbolic cosine functions
+Sleef_quad Sleef_sinhq1_u10(Sleef_quad a); +Sleef_quad Sleef_sinhq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_sinhq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions evaluate the hyperbolic sine function of a value in `a`. The +error bound of the returned value is 1.0 ULP. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_coshq1_u10( Sleef_quad a );
-Sleef_quad Sleef_coshq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_coshq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+hyperbolic cosine functions -- These functions evaluate the hyperbolic cosine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+```c +#includeSleef_tanhq1_u10, Sleef_tanhq1_u10purec, Sleef_tanhq1_u10purecfma - hyperbolic tangent functions
+These functions evaluate the hyperbolic cosine function of a value in `a`. The +error bound of the returned value is 1.0 ULP. -Synopsis
+### `Sleef_tanhq1_u10` +### `Sleef_tanhq1_u10purec` +### `Sleef_tanhq1_u10purecfma` -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_tanhq1_u10( Sleef_quad a );
-Sleef_quad Sleef_tanhq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_tanhq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions evaluate the hyperbolic tangent function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+Sleef_quad Sleef_tanhq1_u10(Sleef_quad a); +Sleef_quad Sleef_tanhq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_tanhq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Sleef_asinhq1_u10, Sleef_asinhq1_u10purec, Sleef_asinhq1_u10purecfma - inverse hyperbolic sine functions
+### `Sleef_asinhq1_u10` +### `Sleef_asinhq1_u10purec` +### `Sleef_asinhq1_u10purecfma` -Synopsis
+inverse hyperbolic sine functions -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_asinhq1_u10( Sleef_quad a );
-Sleef_quad Sleef_asinhq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_asinhq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_asinhq1_u10(Sleef_quad a); +Sleef_quad Sleef_asinhq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_asinhq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -- These functions evaluate the inverse hyperbolic sine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+These functions evaluate the inverse hyperbolic sine function of a value in +`a`. The error bound of the returned value is 1.0 ULP. -Sleef_acoshq1_u10, Sleef_acoshq1_u10purec, Sleef_acoshq1_u10purecfma - inverse hyperbolic cosine functions
+inverse hyperbolic cosine functions -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_acoshq1_u10( Sleef_quad a );
-Sleef_quad Sleef_acoshq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_acoshq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+These functions evaluate the inverse hyperbolic cosine function of a value in +`a`. The error bound of the returned value is 1.0 ULP. -- These functions evaluate the inverse hyperbolic cosine function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
- -Sleef_atanhq1_u10, Sleef_atanhq1_u10purec, Sleef_atanhq1_u10purecfma - inverse hyperbolic tangent functions
+### `Sleef_atanhq1_u10` +### `Sleef_atanhq1_u10purec` +### `Sleef_atanhq1_u10purecfma` -Synopsis
+inverse hyperbolic tangent functions -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_atanhq1_u10( Sleef_quad a );
-Sleef_quad Sleef_atanhq1_u10purec( Sleef_quad a );
-Sleef_quad Sleef_atanhq1_u10purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions evaluate the inverse hyperbolic tangent function of a value - in a. The error bound of the returned value is - 1.0 ULP. -
+Sleef_quad Sleef_atanhq1_u10(Sleef_quad a); +Sleef_quad Sleef_atanhq1_u10purec(Sleef_quad a); +Sleef_quad Sleef_atanhq1_u10purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Sleef_truncq1, Sleef_truncq1_purec, Sleef_truncq1_purecfma - round to integer towards zero
+### `Sleef_truncq1` +### `Sleef_truncq1_purec` +### `Sleef_truncq1_purecfma` -Synopsis
+round to integer towards zero -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_truncq1( Sleef_quad a );
-Sleef_quad Sleef_truncq1_purec( Sleef_quad a );
-Sleef_quad Sleef_truncq1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_truncq1(Sleef_quad a); +Sleef_quad Sleef_truncq1_purec(Sleef_quad a); +Sleef_quad Sleef_truncq1_purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -These functions round their argument to the integer value, in floating format, nearest to but no larger in magnitude than the argument. -
-Sleef_floorq1, Sleef_floorq1_purec, Sleef_floorq1_purecfma - round to integer towards minus infinity
+round to integer towards minus infinity -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_floorq1( Sleef_quad a );
-Sleef_quad Sleef_floorq1_purec( Sleef_quad a );
-Sleef_quad Sleef_floorq1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+These functions return the largest integer value not greater than `a`. --These functions return the largest integer value not greater -than a. -
+### `Sleef_ceilq1` +### `Sleef_ceilq1_purec` +### `Sleef_ceilq1_purecfma` -Sleef_ceilq1, Sleef_ceilq1_purec, Sleef_ceilq1_purecfma - round to integer towards plus infinity
+```c +#includeSynopsis
+Sleef_quad Sleef_ceilq1(Sleef_quad a); +Sleef_quad Sleef_ceilq1_purec(Sleef_quad a); +Sleef_quad Sleef_ceilq1_purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_ceilq1( Sleef_quad a );
-Sleef_quad Sleef_ceilq1_purec( Sleef_quad a );
-Sleef_quad Sleef_ceilq1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+### `Sleef_roundq1` +### `Sleef_roundq1_purec` +### `Sleef_roundq1_purecfma` --These functions return the smallest integer value not less -than a. -
+round to integer away from zero -Sleef_roundq1, Sleef_roundq1_purec, Sleef_roundq1_purecfma - round to integer away from zero
+Sleef_quad Sleef_roundq1(Sleef_quad a); +Sleef_quad Sleef_roundq1_purec(Sleef_quad a); +Sleef_quad Sleef_roundq1_purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions round their argument to the nearest integer value, rounding +halfway cases away from zero. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_roundq1( Sleef_quad a );
-Sleef_quad Sleef_roundq1_purec( Sleef_quad a );
-Sleef_quad Sleef_roundq1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+round to integer, ties round to even --These functions round their argument to the nearest integer value, -rounding halfway cases away from zero. -
+```c +#includeSleef_rintq1, Sleef_rintq1_purec, Sleef_rintq1_purecfma - round to integer, ties round to even
+These functions round their argument to an integer value with the round-to-even +method. -Synopsis
+### `Sleef_fabsq1` +### `Sleef_fabsq1_purec` +### `Sleef_fabsq1_purecfma` -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_rintq1( Sleef_quad a );
-Sleef_quad Sleef_rintq1_purec( Sleef_quad a );
-Sleef_quad Sleef_rintq1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+```c +#include-These functions round their argument to an integer value with the -round-to-even method. -
+Sleef_quad Sleef_fabsq1(Sleef_quad a); +Sleef_quad Sleef_fabsq1_purec(Sleef_quad a); +Sleef_quad Sleef_fabsq1_purecfma(Sleef_quad a); +``` +Link with `-lsleefquad`. -Sleef_fabsq1, Sleef_fabsq1_purec, Sleef_fabsq1_purecfma - absolute value
+### `Sleef_copysignq1` +### `Sleef_copysignq1_purec` +### `Sleef_copysignq1_purecfma` -Synopsis
+copy sign of a number -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_fabsq1( Sleef_quad a );
-Sleef_quad Sleef_fabsq1_purec( Sleef_quad a );
-Sleef_quad Sleef_fabsq1_purecfma( Sleef_quad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_copysignq1(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_copysignq1_purec(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_copysignq1_purecfma(Sleef_quad a, Sleef_quad b); +``` +Link with `-lsleefquad`. --These functions return the absolute value of a. -
+These functions return a value with the magnitude of `a` and the sign of `b`. -Sleef_copysignq1, Sleef_copysignq1_purec, Sleef_copysignq1_purecfma - copy sign of a number
+maximum of two numbers -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_copysignq1( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_copysignq1_purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_copysignq1_purecfma( Sleef_quad a, Sleef_quad b );
-
-Link with -lsleefquad.
-
Description
+These functions return the larger value of `a` and `b`. --These functions return a value with the magnitude -of a and the sign of b. -
- -Sleef_fmaxq1, Sleef_fmaxq1_purec, Sleef_fmaxq1_purecfma - maximum of two numbers
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_fmaxq1( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_fmaxq1_purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_fmaxq1_purecfma( Sleef_quad a, Sleef_quad b );
-
-Link with -lsleefquad.
-
Description
- --These functions return the larger value of a -and b. -
- -Sleef_fminq1, Sleef_fminq1_purec, Sleef_fminq1_purecfma - minimum of two numbers
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_fminq1( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_fminq1_purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_fminq1_purecfma( Sleef_quad a, Sleef_quad b );
-
-Link with -lsleefquad.
-
Description
+minimum of two numbers --These functions return the smaller value of a -and b. -
+```c +#includeSleef_fdimq1_u05, Sleef_fdimq1_u05purec, Sleef_fdimq1_u05purecfma - positive difference
+These functions return the smaller value of `a` and `b`. -Synopsis
+### `Sleef_fdimq1_u05` +### `Sleef_fdimq1_u05purec` +### `Sleef_fdimq1_u05purecfma` -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_fdimq1_u05( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_fdimq1_u05purec( Sleef_quad a, Sleef_quad b );
-Sleef_quad Sleef_fdimq1_u05purecfma( Sleef_quad a, Sleef_quad b );
-
-Link with -lsleefquad.
-
Description
+```c +#include-These functions return the positive difference -between a and b. The error bound -of these functions are 0.5000000001 ULP. -
+Sleef_quad Sleef_fdimq1_u05(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_fdimq1_u05purec(Sleef_quad a, Sleef_quad b); +Sleef_quad Sleef_fdimq1_u05purecfma(Sleef_quad a, Sleef_quad b); +``` +Link with `-lsleefquad`. -Sleef_fmodq1, Sleef_fmodq1_purec, Sleef_fmodq1_purecfma - floating point remainder
+### `Sleef_fmodq1` +### `Sleef_fmodq1_purec` +### `Sleef_fmodq1_purecfma` -Synopsis
+floating point remainder -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_fmodq1( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_fmodq1_purec( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_fmodq1_purecfma( Sleef_quad x, Sleef_quad y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_fmodq1(Sleef_quad x, Sleef_quad y); +Sleef_quad Sleef_fmodq1_purec(Sleef_quad x, Sleef_quad y); +Sleef_quad Sleef_fmodq1_purecfma(Sleef_quad x, Sleef_quad y); +``` +Link with `-lsleefquad`. --These functions return x -- n y, where n is the quotient -of x / y, rounded toward zero to -an integer. -
+These functions return `x - n * y`, where `n` is the quotient of `x / y`, +rounded toward zero to an integer. -Sleef_remainderq1, Sleef_remainderq1_purec, Sleef_remainderq1_purecfma - floatint point remainder
+floatint point remainder -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_remainderq1( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_remainderq1_purec( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_remainderq1_purecfma( Sleef_quad x, Sleef_quad y );
-
-Link with -lsleefquad.
-
Description
+These functions return `x - n * y`, where `n` is the quotient of `x / y`, +rounded to an integer with the round-to-even method. --These functions return x -- n y, where n is the quotient -of x / y, rounded to an integer -with the round-to-even method. -
- -Sleef_frexpq1, Sleef_frexpq1_purec, Sleef_frexpq1_purecfma - split a number to fractional and integral components
+split a number to fractional and integral components -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quad Sleef_frexpq1( Sleef_quad a, int * ptr );
-Sleef_quad Sleef_frexpq1_purec( Sleef_quad a, int * ptr );
-Sleef_quad Sleef_frexpq1_purecfma( Sleef_quad a, int * ptr );
-
-Link with -lsleefquad.
-
Description
+These functions split the argument `a` into a fraction `f` and an exponent `e`, +where `0.5 <= f < 1` and `a = f * 2^e`. The computed exponent `e` will be +stored in `*ptr`, and the functions return `f`. --These functions split the argument a into a -fraction f and an exponent e, where 0.5 ≤ f -< 1 and a = f 2e. The -computed exponent e will be stored in *ptr, -and the functions return f. -
+### `Sleef_modfq1` +### `Sleef_modfq1_purec` +### `Sleef_modfq1_purecfma` -Sleef_modfq1, Sleef_modfq1_purec, Sleef_modfq1_purecfma - break a number into integral and fractional parts
+```c +#includeSynopsis
+Sleef_quad Sleef_modfq1(Sleef_quad a, Sleef_quad * ptr); +Sleef_quad Sleef_modfq1_purec(Sleef_quad a, Sleef_quad * ptr); +Sleef_quad Sleef_modfq1_purecfma(Sleef_quad a, Sleef_quad * ptr); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_modfq1( Sleef_quad a, Sleef_quad * ptr );
-Sleef_quad Sleef_modfq1_purec( Sleef_quad a, Sleef_quad * ptr );
-Sleef_quad Sleef_modfq1_purecfma( Sleef_quad a, Sleef_quad * ptr );
-
-Link with -lsleefquad.
-
Description
+### `Sleef_hypotq1_u05` +### `Sleef_hypotq1_u05purec` +### `Sleef_hypotq1_u05purecfma` --These functions split the argument a into an -integral part k and a fractional part -f, where k and f have the same sign -as a. k will be stored -in *ptr, and the functions return f. -
+2D Euclidian distance -Sleef_hypotq1_u05, Sleef_hypotq1_u05purec, Sleef_hypotq1_u05purecfma - 2D Euclidian distance
+Sleef_quad Sleef_hypotq1_u05(Sleef_quad x, Sleef_quad y); +Sleef_quad Sleef_hypotq1_u05purec(Sleef_quad x, Sleef_quad y); +Sleef_quad Sleef_hypotq1_u05purecfma(Sleef_quad x, Sleef_quad y); +``` +Link with `-lsleefquad`. -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_hypotq1_u05( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_hypotq1_u05purec( Sleef_quad x, Sleef_quad y );
-Sleef_quad Sleef_hypotq1_u05purecfma( Sleef_quad x, Sleef_quad y );
-
-Link with -lsleefquad.
-
Description
- -These functions return the square root of the sum of the squares -of x and y. The error bound of +of `x` and y`. The error bound of these functions are 0.5000000001 ULP. -
- -Sleef_fmaq1_u05, Sleef_fmaq1_u05purec, Sleef_fmaq1_u05purecfma - fused multiply and accumulate
+### `Sleef_fmaq1_u05` +### `Sleef_fmaq1_u05purec` +### `Sleef_fmaq1_u05purecfma` -Synopsis
+fused multiply and accumulate -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_fmaq1_u05( Sleef_quad x, Sleef_quad y, Sleef_quad z );
-Sleef_quad Sleef_fmaq1_u05purec( Sleef_quad x, Sleef_quad y, Sleef_quad z );
-Sleef_quad Sleef_fmaq1_u05purecfma( Sleef_quad x, Sleef_quad y, Sleef_quad z );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_fmaq1_u05(Sleef_quad x, Sleef_quad y, Sleef_quad z); +Sleef_quad Sleef_fmaq1_u05purec(Sleef_quad x, Sleef_quad y, Sleef_quad z); +Sleef_quad Sleef_fmaq1_u05purecfma(Sleef_quad x, Sleef_quad y, Sleef_quad z); +``` +Link with `-lsleefquad`. --These functions return xy -+ z with a single rounding. The error bound of +These functions return `x * y + z` with a single rounding. The error bound of these functions are 0.5000000001 ULP. -
- -Sleef_ldexpq1, Sleef_ldexpq1_purec, Sleef_ldexpq1_purecfma - multiply by integral power of 2
+### `Sleef_ldexpq1` +### `Sleef_ldexpq1_purec` +### `Sleef_ldexpq1_purecfma` -Synopsis
+multiply by integral power of 2 -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_ldexpq1( Sleef_quad x, int e );
-Sleef_quad Sleef_ldexpq1_purec( Sleef_quad x, int e );
-Sleef_quad Sleef_ldexpq1_purecfma( Sleef_quad x, int e );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_ldexpq1(Sleef_quad x, int e); +Sleef_quad Sleef_ldexpq1_purec(Sleef_quad x, int e); +Sleef_quad Sleef_ldexpq1_purecfma(Sleef_quad x, int e); +``` +Link with `-lsleefquad`. --These functions return x 2e. -
+These functions return `x * 2^e`. -Sleef_ilogbq1, Sleef_ilogbq1_purec, Sleef_ilogbq1_purecfma - integer exponent of an FP number
+integer exponent of an FP number -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-int Sleef_ilogbq1( Sleef_quad x );
-int Sleef_ilogbq1_purec( Sleef_quad x );
-int Sleef_ilogbq1_purecfma( Sleef_quad x );
-
-Link with -lsleefquad.
-
Description
- --These functions return the exponent -of x. If x is zero, infinite and -a NaN, they return SLEEF_FP_ILOGB0, INT_MAX -and SLEEF_FP_ILOGBNAN, respectively. -
+int Sleef_ilogbq1(Sleef_quad x); +int Sleef_ilogbq1_purec(Sleef_quad x); +int Sleef_ilogbq1_purecfma(Sleef_quad x); +``` +Link with `-lsleefquad`. +These functions return the exponent of `x`. If x` is zero, infinite and a NaN, +they return `SLEEF_FP_ILOGB0`, `INT_MAX` and `SLEEF_FP_ILOGBNAN`, +respectively.- I would like to show an example of how the vectorized QP functions - can be used. Below is a - source code for computing π with Machin's - formula on x86 GNU systems. This formula has two terms with arc - tangent which can be independently calculated. In this example, - these two terms are computed using vector - functions. __float128 data type is defined on - x86, and you can use literals in this type to initialize the - variables. Variables q0, q1, q2 - and q3 retain two QP FP values each. At line 5, 8 - and 11, QP values in arrays are loaded into these variables with - Sleef_loadq2_sse2 - function. Vector operations are carried out from line 14 to 16, and - then each element of the vector variable q3 is - extracted - with Sleef_getq2_sse2 - function and subtracted to obtain the result at line 18. Note that - the QP subtract function in the standard library is called to do - this subtraction. This result is output to the console - using Sleef_printf - function at line 22. Note that this source code can be built with - clang, on which libquadmath is not available. -
- --+I would like to show an example of how the vectorized QP functions can be used. +Below is [a source code](../../src/machinx86.c) for computing π with +[Machin's formula](https://en.wikipedia.org/wiki/Machin-like_formula) on x86 +GNU systems. This formula has two terms with arc tangent which can be +independently calculated. In this example, these two terms are computed using +vector functions. `__float128` data type is defined on x86, +and you can use literals in this type to initialize the variables. Variables +`q0`, q1`, q2` and `q3` retain two QP FP values each. At line 5, 8 and 11, QP +values in arrays are loaded into these variables with +[Sleef_loadq2_sse2](x86#load) function. Vector operations are carried out from +line 14 to 16, and then each element of the vector variable `q3` is extracted +with [Sleef_getq2_sse2](x86#get) function and subtracted to obtain the result +at line 18. Note that the QP subtract function in the standard library is +called to do this subtraction. This result is output to the console using +[Sleef_printf](#Sleef_printf) function at line 22. Note that this source code +can be built with clang, on which libquadmath is not available. + +```c +#include#include <sleefquad.h>
--
int main(int argc, char **argv) {
-__float128 a0[] = { 5, 239 };
-Sleef_quadx2 q0 = Sleef_loadq2_sse2(a0);
--
__float128 a1[] = { 1, 1 };
-Sleef_quadx2 q1 = Sleef_loadq2_sse2(a1);
--
__float128 a2[] = { 16, 4 };
-Sleef_quadx2 q2 = Sleef_loadq2_sse2(a2);
--
Sleef_quadx2 q3;
-q3 = Sleef_divq2_u05sse2(q1, q0);
-q3 = Sleef_atanq2_u10sse2(q3);
-q3 = Sleef_mulq2_u05sse2(q3, q2);
--
__float128 pi = Sleef_getq2_sse2(q3, 0) - Sleef_getq2_sse2(q3, 1);
--
Sleef_printf("%.40Pg\n", &pi);
-}
-
- Fig. 4.1: Example source code for x86 computers -
- -- __float128 data type is not defined on MSVC, and - thus we cannot use literals of this type to initialize QP - variables. Sleef provides various conversion functions for this - purpose. In the following - source - code, Sleef_cast_from_doubleq1_purec - function is used to initialize q0 from line 4 to - 5. Sleef_strtoq - function is used to initialize q1 at line 7. - Here, Sleef_splatq2_sse2 - function is a function for setting the specified QP FP value to all - elements in a vector. Obtaining QP FP constants by calling these - functions may waste some CPU time. From line 9 and - 12, sleef_q function is - used to intialize - q2. sleef_q - is a function for defining a QP FP constant. You can convert any QP - FP value to this representation using qutil utility - program. At line - 20, Sleef_subq1_u05purec - function is used to subtract a scalar value from another to obtain - the result. -
- --+Fig. 4.1: [Example source code for x86 computers](../../src/machinx86.c) + + +`__float128` data type is not defined on MSVC, and thus we cannot use literals +of this type to initialize QP variables. Sleef provides various conversion +functions for this purpose. In [the following source +code](../../src/machinx86.c), +[Sleef_cast_from_doubleq1_purec](#Sleef_cast_from_doubleq1_purec) function is +used to initialize `q0` from line 4 to 5. [Sleef_strtoq](#Sleef_strtoq) +function is used to initialize `q1` at line 7. Here, +[Sleef_splatq2_sse2](x86#splat) function is a function for setting the +specified QP FP value to all elements in a vector. Obtaining QP FP constants by +calling these functions may waste some CPU time. From line 9 and 12, +[sleef_q](#sleef_q) function is used to intialize `q2`. [sleef_q](#sleef_q) is +a function for defining a QP FP constant. You can convert any QP FP value to +this representation using `qutil` utility program. At line 20, +[Sleef_subq1_u05purec](#basicArithmetic) function is used to subtract a scalar +value from another to obtain the result. + +```c +#include#include <sleefquad.h>
--
int main(int argc, char **argv) {
-Sleef_quad a0[] = { Sleef_cast_from_doubleq1_purec(5), Sleef_cast_from_doubleq1_purec(239) };
-Sleef_quadx2 q0 = Sleef_loadq2_sse2(a0);
--
Sleef_quadx2 q1 = Sleef_splatq2_sse2(Sleef_strtoq("1.0", NULL));
--
Sleef_quadx2 q2 = Sleef_loadq2_sse2((Sleef_quad[]) {
-sleef_q(+0x1000000000000LL, 0x0000000000000000ULL, 4), // 16.0
-sleef_q(+0x1000000000000LL, 0x0000000000000000ULL, 2), // 4.0
-});
--
Sleef_quadx2 q3;
--
q3 = Sleef_divq2_u05sse2(q1, q0);
-q3 = Sleef_atanq2_u10sse2(q3);
-q3 = Sleef_mulq2_u05sse2(q3, q2);
--
Sleef_quad pi = Sleef_subq1_u05purec(Sleef_getq2_sse2(q3, 0), Sleef_getq2_sse2(q3, 1));
--
Sleef_printf("%.40Pg\n", &pi);
-}
-
- Fig. 4.2: Example source code for MSVC -
+Fig. 4.2: [Example source code for MSVC](../../src/machinmsvc.c) +diff --git a/docs/2-references/quad/aarch64.md b/docs/2-references/quad/aarch64.md index 1fbe57dd..96cef2e0 100644 --- a/docs/2-references/quad/aarch64.md +++ b/docs/2-references/quad/aarch64.md @@ -10,1359 +10,829 @@ permalink: /2-references/quad/aarch64
Sleef_quadx2
+### Sleef_quadx2 -Description
+`Sleef_quadx2` is a data type for retaining two QP FP numbers. Please use +[Sleef_loadq2](#load), [Sleef_storeq2](#store), [Sleef_getq2](#get) and +[Sleef_setq2](#set) functions to access the data inside variables in this data +type. -- Sleef_quadx2 is a data type for retaining two QP - FP numbers. Please - use Sleef_loadq2, Sleef_storeq2, Sleef_getq2 - and Sleef_setq2 functions to access the - data inside variables in this data type. -
- -Sleef_svquad
- -Description
- -- Sleef_svquad is a data type for retaining a - vector of QP FP numbers. Please - use Sleef_loadqx_sve, Sleef_storeqx_sve, Sleef_getqx_sve - and Sleef_setqx_sve functions - to access the data inside variables in this data type. -
+### Sleef_svquad +`Sleef_svquad` is a data type for retaining a vector of QP FP numbers. Please +use [Sleef_loadqx_sve](#load), [Sleef_storeqx_sve](#store), +[Sleef_getqx_sve](#get) and [Sleef_setqx_sve](#set) functions to access the +data inside variables in this data type.Load QP FP values into vector variable
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_loadq2( Sleef_quad * ptr );
-Sleef_quadx2 Sleef_loadq2_advsimd( Sleef_quad * ptr );
-Sleef_svquad Sleef_loadqx_sve( Sleef_quad * ptr );
-
-Link with -lsleefquad.
-
Description
- -- These functions load QP FP values from memory and store the results - in a vector variable. -
- -Store QP FP values in a vector variable to memory
- -Synopsis
- -
-#include <sleefquad.h>
-
-void Sleef_storeq2( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq2_advsimd( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeqx_sve( Sleef_quad * ptr, Sleef_svquad v );
-
-Link with -lsleefquad.
-
Description
- -- These functions store QP FP values in the given variable to memory. -
- -Extract one element from QP FP vector variable
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_getq2( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq2_advsimd( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getqx_sve( Sleef_svquad v, int index );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions extract the index-th element from - a QP FP vector variable. -
+Sleef_quadx2 Sleef_loadq2(Sleef_quad * ptr); +Sleef_quadx2 Sleef_loadq2_advsimd(Sleef_quad * ptr); +Sleef_svquad Sleef_loadqx_sve(Sleef_quad * ptr); +``` +Link with `-lsleefquad`. -Set one element in QP FP vector variable
+```c +#includeSynopsis
+void Sleef_storeq2(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq2_advsimd(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeqx_sve(Sleef_quad * ptr, Sleef_svquad v); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_setq2( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx2 Sleef_setq2_advsimd( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_svquad Sleef_setqx_sve( Sleef_svquad v, int index, Sleef_quad e );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions return a QP FP vector in which - the index-th element is e, and - other elements are the same as v. -
+Sleef_quad Sleef_getq2(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq2_advsimd(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getqx_sve(Sleef_svquad v, int index); +``` +Link with `-lsleefquad`. -Set all elements in QP FP vector to the same value
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_setq2(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx2 Sleef_setq2_advsimd(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_svquad Sleef_setqx_sve(Sleef_svquad v, int index, Sleef_quad e); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_splatq2( Sleef_quad e );
-Sleef_quadx2 Sleef_splatq2_advsimd( Sleef_quad e );
-Sleef_svquad Sleef_splatqx_sve( Sleef_quad e );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions return a QP FP vector in which all elements are set - to e. -
+Sleef_quadx2 Sleef_splatq2(Sleef_quad e); +Sleef_quadx2 Sleef_splatq2_advsimd(Sleef_quad e); +Sleef_svquad Sleef_splatqx_sve(Sleef_quad e); +``` +Link with `-lsleefquad`. +These functions return a QP FP vector in which all elements are set to `e`.Convert QP number to double-precision number
+### Convert QP number to double-precision number -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-float64x2_t Sleef_cast_to_doubleq2( Sleef_quadx2 a );
-float64x2_t Sleef_cast_to_doubleq2_advsimd( Sleef_quadx2 a );
-svfloat64_t Sleef_cast_to_doubleqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+These functions convert a QP FP value to a double-precision value. -- These functions convert a QP FP value to a double-precision value. -
+### Convert double-precision number to QP number -Convert double-precision number to QP number
+Sleef_quadx2 Sleef_cast_from_doubleq2(float64x2_t a); +Sleef_quadx2 Sleef_cast_from_doubleq2_advsimd(float64x2_t a); +Sleef_svquad Sleef_cast_from_doubleqx_sve(svfloat64_t a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions convert a double-precision value to a QP FP value. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_doubleq2( float64x2_t a );
-Sleef_quadx2 Sleef_cast_from_doubleq2_advsimd( float64x2_t a );
-Sleef_svquad Sleef_cast_from_doubleqx_sve( svfloat64_t a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions convert a double-precision value to a QP FP value. -
+int64x2_t Sleef_cast_to_int64q2(Sleef_quadx2 a); +int64x2_t Sleef_cast_to_int64q2_advsimd(Sleef_quadx2 a); +svint64_t Sleef_cast_to_int64qx_sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -Convert QP number to 64-bit signed integer
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_cast_from_int64q2(int64x2_t a); +Sleef_quadx2 Sleef_cast_from_int64q2_advsimd(int64x2_t a); +Sleef_svquad Sleef_cast_from_int64qx_sve(svint64_t a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-int64x2_t Sleef_cast_to_int64q2( Sleef_quadx2 a );
-int64x2_t Sleef_cast_to_int64q2_advsimd( Sleef_quadx2 a );
-svint64_t Sleef_cast_to_int64qx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Convert QP number to 64-bit unsigned integer -- These functions convert a QP FP value to a 64-bit signed integer. -
+```c +#includeConvert 64-bit signed integer to QP number
+### Convert 64-bit unsigned integer to QP number -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_int64q2( int64x2_t a );
-Sleef_quadx2 Sleef_cast_from_int64q2_advsimd( int64x2_t a );
-Sleef_svquad Sleef_cast_from_int64qx_sve( svint64_t a );
-
-Link with -lsleefquad.
-
Description
- -- These functions convert a 64-bit signed integer to a QP FP value. -
- -Convert QP number to 64-bit unsigned integer
- -Synopsis
- -
-#include <sleefquad.h>
-
-uint64x2_t Sleef_cast_to_uint64q2( Sleef_quadx2 a );
-uint64x2_t Sleef_cast_to_uint64q2_advsimd( Sleef_quadx2 a );
-svuint64_t Sleef_cast_to_uint64qx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These functions convert a QP FP value to a 64-bit signed integer. -
- -Convert 64-bit unsigned integer to QP number
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_uint64q2( uint64x2_t a );
-Sleef_quadx2 Sleef_cast_from_uint64q2_advsimd( uint64x2_t a );
-Sleef_svquad Sleef_cast_from_uint64qx_sve( svuint64_t a );
-
-Link with -lsleefquad.
-
Description
- -- These functions convert a 64-bit unsigned integer to a QP FP value. -
+Sleef_quadx2 Sleef_cast_from_uint64q2(uint64x2_t a); +Sleef_quadx2 Sleef_cast_from_uint64q2_advsimd(uint64x2_t a); +Sleef_svquad Sleef_cast_from_uint64qx_sve(svuint64_t a); +``` +Link with `-lsleefquad`. +These functions convert a 64-bit unsigned integer to a QP FP value.QP comparison functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-int32x2_t Sleef_icmpltq2( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpleq2( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpgtq2( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpgeq2( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpeqq2( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpneq2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-int32x2_t Sleef_icmpltq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpleq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpgtq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpgeq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpeqq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpneq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-
-svint32_t Sleef_icmpltqx_sve( Sleef_svquad a, Sleef_svquad b );
-svint32_t Sleef_icmpleqx_sve( Sleef_svquad a, Sleef_svquad b );
-svint32_t Sleef_icmpgtqx_sve( Sleef_svquad a, Sleef_svquad b );
-svint32_t Sleef_icmpgeqx_sve( Sleef_svquad a, Sleef_svquad b );
-svint32_t Sleef_icmpeqqx_sve( Sleef_svquad a, Sleef_svquad b );
-svint32_t Sleef_icmpneqx_sve( Sleef_svquad a, Sleef_svquad b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions of comparison functions. -
- -QP comparison functions of the second kind
- -Synopsis
- -
-#include <sleefquad.h>
-
-int32x2_t Sleef_icmpq2( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_icmpq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-svint32_t Sleef_icmpqx_sve( Sleef_svquad a, Sleef_svquad b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_icmpq1_purec. -
- -Check orderedness
- -Synopsis
- -
-#include <sleefquad.h>
-
-int32x2_t Sleef_iunordq2( Sleef_quadx2 a, Sleef_quadx2 b );
-int32x2_t Sleef_iunordq2_advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-svint32_t Sleef_iunordqx_sve( Sleef_svquad a, Sleef_svquad b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_iunordq1_purec. -
- -Select elements
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_iselectq2( int32x2_t c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_iselectq2_advsimd( int32x2_t c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_svquad Sleef_iselectqx_sve( svint32_t c, Sleef_svquad a, Sleef_svquad b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions that operate in the same way as the ternary operator. -
- - -QP functions for basic arithmetic operations
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_addq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2( Sleef_quadx2 a );
-
-Sleef_quadx2 Sleef_addq2_u05advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05advsimd( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2_advsimd( Sleef_quadx2 a );
-
-Sleef_svquad Sleef_addqx_u05sve( Sleef_svquad a, Sleef_svquad b );
-Sleef_svquad Sleef_subqx_u05sve( Sleef_svquad a, Sleef_svquad b );
-Sleef_svquad Sleef_mulqx_u05sve( Sleef_svquad a, Sleef_svquad b );
-Sleef_svquad Sleef_divqx_u05sve( Sleef_svquad a, Sleef_svquad b );
-Sleef_svquad Sleef_negqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions of the basic arithmetic operations. -
- -Square root functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sqrtq2_u05( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sqrtq2_u05advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_sqrtqx_u05sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_sqrtq1_u05purec. -
- -Sine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sinq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_sinqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_sinq1_u10purec. -
- -Cosine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cosq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_cosq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_cosqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_cosq1_u10purec. -
- -Tangent functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_tanq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_tanqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_tanq1_u10purec. -
- -Arc sine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_asinq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_asinqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_asinq1_u10purec. -
- -Arc cosine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_acosq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acosq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_acosqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_acosq1_u10purec. -
- -Arc tangent functions
+### QP comparison functions -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_atanqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+int32x2_t Sleef_icmpltq2_advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +int32x2_t Sleef_icmpleq2_advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +int32x2_t Sleef_icmpgtq2_advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +int32x2_t Sleef_icmpgeq2_advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +int32x2_t Sleef_icmpeqq2_advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +int32x2_t Sleef_icmpneq2_advsimd(Sleef_quadx2 a, Sleef_quadx2 b); -- These are the vectorized functions - of Sleef_atanq1_u10purec. -
+svint32_t Sleef_icmpltqx_sve(Sleef_svquad a, Sleef_svquad b); +svint32_t Sleef_icmpleqx_sve(Sleef_svquad a, Sleef_svquad b); +svint32_t Sleef_icmpgtqx_sve(Sleef_svquad a, Sleef_svquad b); +svint32_t Sleef_icmpgeqx_sve(Sleef_svquad a, Sleef_svquad b); +svint32_t Sleef_icmpeqqx_sve(Sleef_svquad a, Sleef_svquad b); +svint32_t Sleef_icmpneqx_sve(Sleef_svquad a, Sleef_svquad b); +``` +Link with `-lsleefquad`. -Base-e exponential functions
+### QP comparison functions of the second kind -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_expq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_expqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+These are the vectorized functions of +[Sleef_icmpq1_purec](../quad#sleef_icmpq1_purec). -- These are the vectorized functions - of Sleef_expq1_u10purec. -
+### Check orderedness -Base-2 exponential functions
+int32x2_t Sleef_iunordq2(Sleef_quadx2 a, Sleef_quadx2 b); +int32x2_t Sleef_iunordq2_advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +svint32_t Sleef_iunordqx_sve(Sleef_svquad a, Sleef_svquad b); +``` +Link with `-lsleefquad`. -Synopsis
+These are the vectorized functions +of [Sleef_iunordq1_purec](../quad#sleef_iunordq1_purec). -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_exp2q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp2q2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_exp2qx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These are the vectorized functions - of Sleef_exp2q1_u10purec. -
+Sleef_quadx2 Sleef_iselectq2(int32x2_t c, Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_iselectq2_advsimd(int32x2_t c, Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_svquad Sleef_iselectqx_sve(svint32_t c, Sleef_svquad a, Sleef_svquad b); +``` +Link with `-lsleefquad`. -Base-10 exponentail
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_exp10q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp10q2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_exp10qx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_exp10q1_u10purec. -
- -Base-e exponential functions minus 1
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_expm1q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expm1q2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_expm1qx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_expm1q1_u10purec. -
- -Natural logarithmic functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_logq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_logq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_logqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_logq1_u10purec. -
- -Base-2 logarithmic functions
+Synopsis
+### QP functions for basic arithmetic operations -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log2q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log2q2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_log2qx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_addq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2(Sleef_quadx2 a); -- These are the vectorized functions - of Sleef_log2q1_u10purec. -
+Sleef_quadx2 Sleef_addq2_u05advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05advsimd(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2_advsimd(Sleef_quadx2 a); -Base-10 logarithmic functions
+These are the vectorized functions of [the basic arithmetic +operations](../quad#basicArithmetic). -Synopsis
+### Square root functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log10q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log10q2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_log10qx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_sqrtq2_u05(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sqrtq2_u05advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_sqrtqx_u05sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_log10q1_u10purec. -
+These are the vectorized functions +of [Sleef_sqrtq1_u05purec](../quad#sleef_sqrtq1_u05purec). -Logarithm of one plus argument
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_sinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_sinqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log1pq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log1pq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_log1pqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Cosine functions -- These are the vectorized functions - of Sleef_log1pq1_u10purec. -
+```c +#includePower functions
+These are the vectorized functions +of [Sleef_cosq1_u10purec](../quad#sleef_cosq1_u10purec). -Synopsis
+### Tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_powq2_u10( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_powq2_u10advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_powqx_u10sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_tanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_tanqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_powq1_u10purec. -
+These are the vectorized functions +of [Sleef_tanq1_u10purec](../quad#sleef_tanq1_u10purec). -Hyperbolic sine functions
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_asinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_asinqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sinhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinhq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_sinhqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Arc cosine functions -- These are the vectorized functions - of Sleef_sinhq1_u10purec. -
+```c +#includeHyperbolic cosine functions
+These are the vectorized functions +of [Sleef_acosq1_u10purec](../quad#sleef_acosq1_u10purec). -Synopsis
+### Arc tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_coshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_coshq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_coshqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_atanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_atanqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_coshq1_u10purec. -
+These are the vectorized functions +of [Sleef_atanq1_u10purec](../quad#sleef_atanq1_u10purec). -Hyperbolic tangent functions
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_expq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_expqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_tanhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanhq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_tanhqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Base-2 exponential functions -- These are the vectorized functions - of Sleef_tanhq1_u10purec. -
+```c +#includeInverse hyperbolic sine functions
+These are the vectorized functions +of [Sleef_exp2q1_u10purec](../quad#sleef_exp2q1_u10purec). -Synopsis
+### Base-10 exponentail -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_asinhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinhq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_asinhqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_exp10q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_exp10q2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_exp10qx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_asinhq1_u10purec. -
+These are the vectorized functions +of [Sleef_exp10q1_u10purec](../quad#sleef_exp10q1_u10purec). -Inverse hyperbolic cosine functions
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_expm1q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expm1q2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_expm1qx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_acoshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acoshq2_u10advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_acoshqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Natural logarithmic functions -- These are the vectorized functions - of Sleef_acoshq1_u10purec. -
+```c +#includeInverse hyperbolic tangent functions
+These are the vectorized functions +of [Sleef_logq1_u10purec](../quad#sleef_logq1_u10purec). -Synopsis
+### Base-2 logarithmic functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanhq2_u10adv( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanhq2_u10advadvsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_atanhqx_u10sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_log2q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log2q2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_log2qx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_atanhq1_u10purec. -
+These are the vectorized functions +of [Sleef_log2q1_u10purec](../quad#sleef_log2q1_u10purec). -Round to integer towards zero
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_log10q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log10q2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_log10qx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_truncq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_truncq2_advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_truncqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Logarithm of one plus argument -- These are the vectorized functions - of Sleef_truncq1_purec. -
+```c +#includeRound to integer towards minus infinity
+These are the vectorized functions +of [Sleef_log1pq1_u10purec](../quad#sleef_log1pq1_u10purec). -Synopsis
+### Power functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_floorq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_floorq2_advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_floorqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_powq2_u10(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_powq2_u10advsimd(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_svquad Sleef_powqx_u10sve(Sleef_svquad x, Sleef_svquad y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_floorq1_purec. -
+These are the vectorized functions +of [Sleef_powq1_u10purec](../quad#sleef_powq1_u10purec). -Round to integer towards plus infinity
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_sinhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinhq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_sinhqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_ceilq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_ceilq2_advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_ceilqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Hyperbolic cosine functions -- These are the vectorized functions - of Sleef_ceilq1_purec. -
+```c +#includeRound to integer away from zero
+These are the vectorized functions +of [Sleef_coshq1_u10purec](../quad#sleef_coshq1_u10purec). -Synopsis
+### Hyperbolic tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_roundq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_roundq2_advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_roundqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_tanhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanhq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_tanhqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_roundq1_purec. -
+These are the vectorized functions +of [Sleef_tanhq1_u10purec](../quad#sleef_tanhq1_u10purec). -Round to integer, ties round to even
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_asinhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinhq2_u10advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_asinhqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_rintq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_rintq2_advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_rintqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+### Inverse hyperbolic cosine functions -- These are the vectorized functions - of Sleef_rintq1_purec. -
+```c +#includeAbsolute value
+These are the vectorized functions +of [Sleef_acoshq1_u10purec](../quad#sleef_acoshq1_u10purec). -Synopsis
+### Inverse hyperbolic tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fabsq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_fabsq2_advsimd( Sleef_quadx2 a );
-Sleef_svquad Sleef_fabsqx_sve( Sleef_svquad a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_atanhq2_u10adv(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanhq2_u10advadvsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_atanhqx_u10sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fabsq1_purec. -
+These are the vectorized functions +of [Sleef_atanhq1_u10purec](../quad#sleef_atanhq1_u10purec). -Copy sign of a number
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_truncq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_truncq2_advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_truncqx_sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_copysignq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_copysignq2_advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_copysignqx_sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+### Round to integer towards minus infinity -- These are the vectorized functions - of Sleef_copysignq1_purec. -
+```c +#includeMaximum of two numbers
+These are the vectorized functions +of [Sleef_floorq1_purec](../quad#sleef_floorq1_purec). -Synopsis
+### Round to integer towards plus infinity -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmaxq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmaxq2_advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_fmaxqx_sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_ceilq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_ceilq2_advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_ceilqx_sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fmaxq1_purec. -
+These are the vectorized functions +of [Sleef_ceilq1_purec](../quad#sleef_ceilq1_purec). -Minimum of two numbers
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_roundq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_roundq2_advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_roundqx_sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fminq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fminq2_advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_fminqx_sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+### Round to integer, ties round to even -- These are the vectorized functions - of Sleef_fminq1_purec. -
+```c +#includePositive difference
+These are the vectorized functions +of [Sleef_rintq1_purec](../quad#sleef_rintq1_purec). -Synopsis
+### Absolute value -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fdimq2_u05( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fdimq2_u05advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_fdimqx_u05sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_fabsq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_fabsq2_advsimd(Sleef_quadx2 a); +Sleef_svquad Sleef_fabsqx_sve(Sleef_svquad a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fdimq1_u05purec. -
+These are the vectorized functions +of [Sleef_fabsq1_purec](../quad#sleef_fabsq1_purec). -Floating point remainder
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_copysignq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_copysignq2_advsimd(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_svquad Sleef_copysignqx_sve(Sleef_svquad x, Sleef_svquad y); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmodq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmodq2_advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_fmodqx_sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+### Maximum of two numbers -- These are the vectorized functions - of Sleef_fmodq1_purec. -
+```c +#includeFloating point remainder
+These are the vectorized functions +of [Sleef_fmaxq1_purec](../quad#sleef_fmaxq1_purec). -Synopsis
+### Minimum of two numbers -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_remainderq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_remainderq2_advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_remainderqx_sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_fminq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fminq2_advsimd(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_svquad Sleef_fminqx_sve(Sleef_svquad x, Sleef_svquad y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_remainderq1_purec. -
+These are the vectorized functions +of [Sleef_fminq1_purec](../quad#sleef_fminq1_purec). -Split a number to fractional and integral components
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_fdimq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fdimq2_u05advsimd(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_svquad Sleef_fdimqx_u05sve(Sleef_svquad x, Sleef_svquad y); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_frexpq2( Sleef_quadx2 x, int32x2_t * ptr );
-Sleef_quadx2 Sleef_frexpq2_advsimd( Sleef_quadx2 x, int32x2_t * ptr );
-Sleef_svquad Sleef_frexpqx_sve( Sleef_svquad x, svint32_t * ptr );
-
-Link with -lsleefquad.
-
Description
+### Floating point remainder -- These are the vectorized functions - of Sleef_frexpq1_purec. -
+```c +#includeBreak a number into integral and fractional parts
+These are the vectorized functions +of [Sleef_fmodq1_purec](../quad#sleef_fmodq1_purec). -Synopsis
+### Floating point remainder -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_modfq2( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_quadx2 Sleef_modfq2_advsimd( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_svquad Sleef_modfqx_sve( Sleef_svquad x, Sleef_svquad * ptr );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_remainderq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_remainderq2_advsimd(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_svquad Sleef_remainderqx_sve(Sleef_svquad x, Sleef_svquad y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_modfq1_purec. -
+These are the vectorized functions +of [Sleef_remainderq1_purec](../quad#sleef_remainderq1_purec). -2D Euclidian distance
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_frexpq2(Sleef_quadx2 x, int32x2_t * ptr); +Sleef_quadx2 Sleef_frexpq2_advsimd(Sleef_quadx2 x, int32x2_t * ptr); +Sleef_svquad Sleef_frexpqx_sve(Sleef_svquad x, svint32_t * ptr); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_hypotq2_u05( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_hypotq2_u05advsimd( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_svquad Sleef_hypotqx_u05sve( Sleef_svquad x, Sleef_svquad y );
-
-Link with -lsleefquad.
-
Description
+### Break a number into integral and fractional parts -- These are the vectorized functions - of Sleef_hypotq1_u05purec. -
+```c +#includeFused multiply and accumulate
+These are the vectorized functions +of [Sleef_modfq1_purec](../quad#sleef_modfq1_purec). -Synopsis
+### 2D Euclidian distance -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmaq2_u05( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_quadx2 Sleef_fmaq2_u05advsimd( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_svquad Sleef_fmaqx_u05sve( Sleef_svquad x, Sleef_svquad y, Sleef_svquad z );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_hypotq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_hypotq2_u05advsimd(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_svquad Sleef_hypotqx_u05sve(Sleef_svquad x, Sleef_svquad y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fmaq1_u05purec. -
+These are the vectorized functions +of [Sleef_hypotq1_u05purec](../quad#sleef_hypotq1_u05purec). -Multiply by integral power of 2
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_fmaq2_u05(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx2 Sleef_fmaq2_u05advsimd(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_svquad Sleef_fmaqx_u05sve(Sleef_svquad x, Sleef_svquad y, Sleef_svquad z); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_ldexpq2( Sleef_quadx2 x, int32x2_t e );
-Sleef_quadx2 Sleef_ldexpq2_advsimd( Sleef_quadx2 x, int32x2_t e );
-Sleef_svquad Sleef_ldexpqx_sve( Sleef_svquad x, svint32_t e );
-
-Link with -lsleefquad.
-
Description
+### Multiply by integral power of 2 -- These are the vectorized functions - of Sleef_ldexpq1_purec. -
+```c +#includeInteger exponent of an FP number
+These are the vectorized functions +of [Sleef_ldexpq1_purec](../quad#sleef_ldexpq1_purec). -Synopsis
+### Integer exponent of an FP number -
-#include <sleefquad.h>
-
-int32x2_t Sleef_ilogbq2( Sleef_quadx2 x );
-int32x2_t Sleef_ilogbq2_advsimd( Sleef_quadx2 x );
-svint32_t Sleef_ilogbqx_sve( Sleef_svquad x );
-
-Link with -lsleefquad.
-
Description
+int32x2_t Sleef_ilogbq2(Sleef_quadx2 x); +int32x2_t Sleef_ilogbq2_advsimd(Sleef_quadx2 x); +svint32_t Sleef_ilogbqx_sve(Sleef_svquad x); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_ilogbq1_purec. -
+These are the vectorized functions +of [Sleef_ilogbq1_purec](../quad#sleef_ilogbq1_purec). diff --git a/docs/2-references/quad/cuda.md b/docs/2-references/quad/cuda.md index b25fe100..c33fd622 100644 --- a/docs/2-references/quad/cuda.md +++ b/docs/2-references/quad/cuda.md @@ -10,1166 +10,718 @@ permalink: /2-references/quad/cuda- Below is a test - code for the CUDA functions. CUDA devices cannot directly - compute with the QP FP data type. Thus, you have to - use Sleef_quadx1 data type to retain a QP FP - value in CUDA device codes. This data type has the same structure as - the QP FP data type, and you can directly access the number by - casting the pointer to the QP FP data type supported by the - compiler. Beware of the strict-aliasing rule in this case. -
- ---#include <iostream>
-#include <quadmath.h>
--
#include "sleefquadinline_cuda.h"
--
// Based on the tutorial code at https://developer.nvidia.com/blog/even-easier-introduction-cuda/
--
__global__ void pow_gpu(int n, Sleef_quadx1 *r, Sleef_quadx1 *x, Sleef_quadx1 *y) {
-int index = threadIdx.x, stride = blockDim.x;
--
for (int i = index; i < n; i += stride)
-r[i] = Sleef_powq1_u10cuda(x[i], y[i]);
-}
--
int main(void) {
-int N = 1 << 20;
--
Sleef_quadx1 *rd, *xd, *yd;
-cudaMallocManaged(&rd, N*sizeof(Sleef_quadx1));
-cudaMallocManaged(&xd, N*sizeof(Sleef_quadx1));
-cudaMallocManaged(&yd, N*sizeof(Sleef_quadx1));
--
__float128 *r = (__float128 *)rd, *x = (__float128 *)xd, *y = (__float128 *)yd;
--
for (int i = 0; i < N; i++) {
-r[i] = 0.0;
-x[i] = 1.00001Q;
-y[i] = i;
-}
-pow_gpu<<<1, 256>>>(N, rd, xd, yd);
--
cudaDeviceSynchronize();
--
double maxError = 0.0;
-for (int i = 0; i < N; i++)
-maxError = fmax(maxError, fabsq(r[i]-powq(x[i], y[i])));
-std::cout << "Max error: " << maxError << std::endl;
--
cudaFree(yd);
-cudaFree(xd);
-cudaFree(rd);
--
return 0;
-}
-
- Source code for testing CUDA functions -
- -- You may want to use both CPU and GPU functions in the same source - code. This is possible, as shown in the following test code. You cannot use - the library version of the SLEEF functions in CUDA source - codes. Please include the header files for inlineable functions - along with the header file for CUDA functions. The I/O functions are - defined in sleefquadinline_purec_scalar.h. You cannot - use SLEEF_QUAD_C or sleef_q - in device functions. -
- ---// nvcc -O3 hellocudaquad2.cu -I./include --fmad=false -Xcompiler -ffp-contract=off
--
#include <iostream>
-#include <stdio.h>
-#include <stdint.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <assert.h>
-#include <emmintrin.h>
--
#include "sleefquadinline_sse2.h"
-#include "sleefquadinline_purec_scalar.h"
-#include "sleefquadinline_cuda.h"
-#include "sleefinline_sse2.h"
--
// Based on the tutorial code at https://developer.nvidia.com/blog/even-easier-introduction-cuda/
--
__global__ void pow_gpu(int n, Sleef_quadx1 *r, Sleef_quadx1 *x, Sleef_quadx1 *y) {
-int index = threadIdx.x, stride = blockDim.x;
--
for (int i = index; i < n; i += stride)
-r[i] = Sleef_powq1_u10cuda(x[i], y[i]);
-}
--
int main(void) {
-int N = 1 << 20;
--
Sleef_quadx1 *rd, *xd, *yd;
-cudaMallocManaged(&rd, N*sizeof(Sleef_quadx1));
-cudaMallocManaged(&xd, N*sizeof(Sleef_quadx1));
-cudaMallocManaged(&yd, N*sizeof(Sleef_quadx1));
--
Sleef_quad *r = (Sleef_quad *)rd, *x = (Sleef_quad *)xd, *y = (Sleef_quad *)yd;
--
//
--
for (int i = 0; i < N; i++) {
-r[i] = Sleef_cast_from_doubleq1_purec(0);
-x[i] = Sleef_cast_from_doubleq1_purec(1.00001);
-y[i] = Sleef_cast_from_doubleq1_purec(i);
-}
--
pow_gpu<<<1, 256>>>(N, rd, xd, yd);
--
cudaDeviceSynchronize();
--
Sleef_quadx2 maxError = Sleef_splatq2_sse2(Sleef_strtoq("0.0", NULL));
--
for (int i = 0; i < N; i += 2) {
-Sleef_quadx2 r2 = Sleef_loadq2_sse2(&r[i]);
-Sleef_quadx2 x2 = Sleef_loadq2_sse2(&x[i]);
-Sleef_quadx2 y2 = Sleef_loadq2_sse2(&y[i]);
--
Sleef_quadx2 q = Sleef_fabsq2_sse2(Sleef_subq2_u05sse2(r2, Sleef_powq2_u10sse2(x2, y2)));
-maxError = Sleef_fmaxq2_sse2(maxError, q);
-}
--
Sleef_printf("Max error: %Qg\n",
-Sleef_fmaxq1_purec(Sleef_getq2_sse2(maxError, 0), Sleef_getq2_sse2(maxError, 1)));
--
//
--
cudaFree(yd);
-cudaFree(xd);
-cudaFree(rd);
--
return 0;
-}
-
- Source code for testing CUDA functions with CPU functions -
- - -Convert QP number to double-precision number
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ double Sleef_cast_to_doubleq1_cuda( Sleef_quadx1 a );
-
Description
- -- These functions convert a QP FP value to a double-precision value. -
- -Convert double-precision number to QP number
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_cast_from_doubleq1_cuda( double a );
-
Description
- -- These functions convert a double-precision value to a QP FP value. -
- -Convert QP number to 64-bit signed integer
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ int64_t Sleef_cast_to_int64q1_cuda( Sleef_quadx1 a );
-
Description
- -- These functions convert a QP FP value to a 64-bit signed integer. -
- -Convert 64-bit signed integer to QP number
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_cast_from_int64q1_cuda( int64_t a );
-
Description
- -- These functions convert a 64-bit signed integer to a QP FP value. -
- -Convert QP number to 64-bit unsigned integer
+```c -Synopsis
+#include
-#include <sleefquadinline_cuda.h>
-
-__device__ uint64_t Sleef_cast_to_uint64q1_cuda( Sleef_quadx1 a );
-
Description
- -- These functions convert a QP FP value to a 64-bit signed integer. -
- -Convert 64-bit unsigned integer to QP number
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_cast_from_uint64q1_cuda( uint64_t a );
-
Description
- -- These functions convert a 64-bit unsigned integer to a QP FP value. -
- - -QP comparison functions
- -Synopsis
+#include "sleefquadinline_cuda.h" -
-#include <sleefquadinline_cuda.h>
-
-__device__ int32_t Sleef_icmpltq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ int32_t Sleef_icmpleq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ int32_t Sleef_icmpgtq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ int32_t Sleef_icmpgeq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ int32_t Sleef_icmpeqq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ int32_t Sleef_icmpneq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-
Description
- -- These are the vectorized functions of comparison functions. -
+// Based on the tutorial code at https://developer.nvidia.com/blog/even-easier-introduction-cuda/ -QP comparison functions of the second kind
+ for (int i = index; i < n; i += stride) + r[i] = Sleef_powq1_u10cuda(x[i], y[i]); +} -Synopsis
+int main(void) { + int N = 1 << 20; -
-#include <sleefquadinline_cuda.h>
-
-__device__ int32_t Sleef_icmpq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-
Description
+ __float128 *r = (__float128 *)rd, *x = (__float128 *)xd, *y = (__float128 *)yd; -- These are the vectorized functions - of Sleef_icmpq1_purec. -
+ for (int i = 0; i < N; i++) { + r[i] = 0.0; + x[i] = 1.00001Q; + y[i] = i; + } + pow_gpu<<<1, 256>>> (N, rd, xd, yd); -Check orderedness
+ double maxError = 0.0; + for (int i = 0; i < N; i++) + maxError = fmax(maxError, fabsq(r[i]-powq(x[i], y[i]))); + std::cout << "Max error: " << maxError << std::endl; -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ int32_t Sleef_iunordq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-
Description
- -- These are the vectorized functions - of Sleef_iunordq1_purec. -
- -Select elements
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_iselectq1_cuda( int32_t c, Sleef_quadx1 a, Sleef_quadx1 b );
-
Description
- -- These are the vectorized functions that operate in the same way as the ternary operator. -
- - -QP functions for basic arithmetic operations
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_addq1_u05cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ Sleef_quadx1 Sleef_subq1_u05cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ Sleef_quadx1 Sleef_mulq1_u05cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ Sleef_quadx1 Sleef_divq1_u05cuda( Sleef_quadx1 a, Sleef_quadx1 b );
-__device__ Sleef_quadx1 Sleef_negq1_cuda( Sleef_quadx1 a );
-
Description
- -- These are the vectorized functions of the basic arithmetic operations. -
+ cudaFree(yd); + cudaFree(xd); + cudaFree(rd); -Square root functions
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_sqrtq1_u05cuda( Sleef_quadx1 a );
-
Description
- -- These are the vectorized functions - of Sleef_sqrtq1_u05purec. + return 0; +``` +
+Source code for testing CUDA functions
-Sine functions
+```c -Synopsis
+// nvcc -O3 hellocudaquad2.cu -I./include --fmad=false -Xcompiler -ffp-contract=off -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_sinq1_u10cuda( Sleef_quadx1 a );
-
Description
+#include "sleefquadinline_sse2.h" +#include "sleefquadinline_purec_scalar.h" +#include "sleefquadinline_cuda.h" +#include "sleefinline_sse2.h" -- These are the vectorized functions - of Sleef_sinq1_u10purec. -
+// Based on the tutorial code at https://developer.nvidia.com/blog/even-easier-introduction-cuda/ -Cosine functions
+ for (int i = index; i < n; i += stride) + r[i] = Sleef_powq1_u10cuda(x[i], y[i]); +} -Synopsis
+int main(void) { + int N = 1 << 20; -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_cosq1_u10cuda( Sleef_quadx1 a );
-
Description
+ Sleef_quad *r = (Sleef_quad *)rd, *x = (Sleef_quad *)xd, *y = (Sleef_quad *)yd; -- These are the vectorized functions - of Sleef_cosq1_u10purec. -
+ // -Tangent functions
+ pow_gpu<<<1, 256>>>(N, rd, xd, yd); -Synopsis
+ cudaDeviceSynchronize(); -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_tanq1_u10cuda( Sleef_quadx1 a );
-
Description
+ for (int i = 0; i < N; i += 2) { + Sleef_quadx2 r2 = Sleef_loadq2_sse2(&r[i]); + Sleef_quadx2 x2 = Sleef_loadq2_sse2(&x[i]); + Sleef_quadx2 y2 = Sleef_loadq2_sse2(&y[i]); -- These are the vectorized functions - of Sleef_tanq1_u10purec. -
+ Sleef_quadx2 q = Sleef_fabsq2_sse2(Sleef_subq2_u05sse2(r2, Sleef_powq2_u10sse2(x2, y2))); + maxError = Sleef_fmaxq2_sse2(maxError, q); + } -Arc sine functions
+ // -Synopsis
+ cudaFree(yd); + cudaFree(xd); + cudaFree(rd); -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_asinq1_u10cuda( Sleef_quadx1 a );
+ return 0;
+```
+
+Source code for testing CUDA functions with CPU functions
-Description
+- These are the vectorized functions - of Sleef_asinq1_u10purec. -
+### Convert QP number to double-precision number -Arc cosine functions
+__device__ double Sleef_cast_to_doubleq1_cuda( Sleef_quadx1 a ); +``` -Synopsis
+These functions convert a QP FP value to a double-precision value. -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_acosq1_u10cuda( Sleef_quadx1 a );
-
Description
+```c +#include- These are the vectorized functions - of Sleef_acosq1_u10purec. -
+__device__ Sleef_quadx1 Sleef_cast_from_doubleq1_cuda( double a ); +``` -Arc tangent functions
+### Convert QP number to 64-bit signed integer -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_atanq1_u10cuda( Sleef_quadx1 a );
-
Description
+These functions convert a QP FP value to a 64-bit signed integer. -- These are the vectorized functions - of Sleef_atanq1_u10purec. -
+### Convert 64-bit signed integer to QP number -Base-e exponential functions
+__device__ Sleef_quadx1 Sleef_cast_from_int64q1_cuda( int64_t a ); +``` -Synopsis
+These functions convert a 64-bit signed integer to a QP FP value. -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_expq1_u10cuda( Sleef_quadx1 a );
-
Description
+```c +#include- These are the vectorized functions - of Sleef_expq1_u10purec. -
+__device__ uint64_t Sleef_cast_to_uint64q1_cuda( Sleef_quadx1 a ); +``` -Base-2 exponential functions
+### Convert 64-bit unsigned integer to QP number -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_exp2q1_u10cuda( Sleef_quadx1 a );
-
Description
+These functions convert a 64-bit unsigned integer to a QP FP value. -- These are the vectorized functions - of Sleef_exp2q1_u10purec. -
+Base-10 exponentail
+```c +#includeSynopsis
+__device__ int32_t Sleef_icmpltq1_cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ int32_t Sleef_icmpleq1_cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ int32_t Sleef_icmpgtq1_cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ int32_t Sleef_icmpgeq1_cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ int32_t Sleef_icmpeqq1_cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ int32_t Sleef_icmpneq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_exp10q1_u10cuda( Sleef_quadx1 a );
-
Description
+### QP comparison functions of the second kind -- These are the vectorized functions - of Sleef_exp10q1_u10purec. -
+```c +#includeBase-e exponential functions minus 1
+These are the vectorized functions +of [Sleef_icmpq1_purec](../quad#sleef_icmpq1_purec). -Synopsis
+### Check orderedness -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_expm1q1_u10cuda( Sleef_quadx1 a );
-
Description
+__device__ int32_t Sleef_iunordq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b ); +``` -- These are the vectorized functions - of Sleef_expm1q1_u10purec. -
+These are the vectorized functions +of [Sleef_iunordq1_purec](../quad#sleef_iunordq1_purec). -Natural logarithmic functions
+```c +#includeSynopsis
+__device__ Sleef_quadx1 Sleef_iselectq1_cuda( int32_t c, Sleef_quadx1 a, Sleef_quadx1 b ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_logq1_u10cuda( Sleef_quadx1 a );
-
Description
+- These are the vectorized functions - of Sleef_logq1_u10purec. -
+### QP functions for basic arithmetic operations -Base-2 logarithmic functions
+__device__ Sleef_quadx1 Sleef_addq1_u05cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ Sleef_quadx1 Sleef_subq1_u05cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ Sleef_quadx1 Sleef_mulq1_u05cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ Sleef_quadx1 Sleef_divq1_u05cuda(Sleef_quadx1 a, Sleef_quadx1 b); +__device__ Sleef_quadx1 Sleef_negq1_cuda( Sleef_quadx1 a ); +``` -Synopsis
+These are the vectorized functions of [the basic arithmetic +operations](../quad#basicArithmetic). -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_log2q1_u10cuda( Sleef_quadx1 a );
-
Description
+```c +#include- These are the vectorized functions - of Sleef_log2q1_u10purec. -
+__device__ Sleef_quadx1 Sleef_sqrtq1_u05cuda( Sleef_quadx1 a ); +``` -Base-10 logarithmic functions
+### Sine functions -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_log10q1_u10cuda( Sleef_quadx1 a );
-
Description
+These are the vectorized functions +of [Sleef_sinq1_u10purec](../quad#sleef_sinq1_u10purec). -- These are the vectorized functions - of Sleef_log10q1_u10purec. -
+### Cosine functions -Logarithm of one plus argument
+__device__ Sleef_quadx1 Sleef_cosq1_u10cuda( Sleef_quadx1 a ); +``` -Synopsis
+These are the vectorized functions +of [Sleef_cosq1_u10purec](../quad#sleef_cosq1_u10purec). -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_log1pq1_u10cuda( Sleef_quadx1 a );
-
Description
+```c +#include- These are the vectorized functions - of Sleef_log1pq1_u10purec. -
+__device__ Sleef_quadx1 Sleef_tanq1_u10cuda( Sleef_quadx1 a ); +``` -Power functions
+### Arc sine functions -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_powq1_u10cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+These are the vectorized functions +of [Sleef_asinq1_u10purec](../quad#sleef_asinq1_u10purec). -- These are the vectorized functions - of Sleef_powq1_u10purec. -
+### Arc cosine functions -Hyperbolic sine functions
+__device__ Sleef_quadx1 Sleef_acosq1_u10cuda( Sleef_quadx1 a ); +``` -Synopsis
+These are the vectorized functions +of [Sleef_acosq1_u10purec](../quad#sleef_acosq1_u10purec). -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_sinhq1_u10cuda( Sleef_quadx1 a );
-
-
Description
+```c +#include- These are the vectorized functions - of Sleef_sinhq1_u10purec. -
+__device__ Sleef_quadx1 Sleef_atanq1_u10cuda( Sleef_quadx1 a ); +``` -Hyperbolic cosine functions
+### Base-e exponential functions -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_coshq1_u10cuda( Sleef_quadx1 a );
-
-
Description
+These are the vectorized functions +of [Sleef_expq1_u10purec](../quad#sleef_expq1_u10purec). -- These are the vectorized functions - of Sleef_coshq1_u10purec. -
+### Base-2 exponential functions -Hyperbolic tangent functions
+__device__ Sleef_quadx1 Sleef_exp2q1_u10cuda( Sleef_quadx1 a ); +``` -Synopsis
+These are the vectorized functions +of [Sleef_exp2q1_u10purec](../quad#sleef_exp2q1_u10purec). -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_tanhq1_u10cuda( Sleef_quadx1 a );
-
-
Description
+```c +#include- These are the vectorized functions - of Sleef_tanhq1_u10purec. -
+__device__ Sleef_quadx1 Sleef_exp10q1_u10cuda( Sleef_quadx1 a ); +``` -Inverse hyperbolic sine functions
+### Base-e exponential functions minus 1 -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_asinhq1_u10cuda( Sleef_quadx1 a );
-
-
Description
+These are the vectorized functions +of [Sleef_expm1q1_u10purec](../quad#sleef_expm1q1_u10purec). -- These are the vectorized functions - of Sleef_asinhq1_u10purec. -
+### Natural logarithmic functions -Inverse hyperbolic cosine functions
+__device__ Sleef_quadx1 Sleef_logq1_u10cuda( Sleef_quadx1 a ); +``` -Synopsis
+These are the vectorized functions +of [Sleef_logq1_u10purec](../quad#sleef_logq1_u10purec). -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_acoshq1_u10cuda( Sleef_quadx1 a );
-
-
Description
+```c +#include- These are the vectorized functions - of Sleef_acoshq1_u10purec. -
+__device__ Sleef_quadx1 Sleef_log2q1_u10cuda( Sleef_quadx1 a ); +``` -Inverse hyperbolic tangent functions
+### Base-10 logarithmic functions -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_atanhq1_u10cuda( Sleef_quadx1 a );
-
-
Description
+These are the vectorized functions +of [Sleef_log10q1_u10purec](../quad#sleef_log10q1_u10purec). -- These are the vectorized functions - of Sleef_atanhq1_u10purec. -
+### Logarithm of one plus argument -Round to integer towards zero
+__device__ Sleef_quadx1 Sleef_log1pq1_u10cuda( Sleef_quadx1 a ); +``` -Synopsis
+These are the vectorized functions +of [Sleef_log1pq1_u10purec](../quad#sleef_log1pq1_u10purec). -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_truncq1_cuda( Sleef_quadx1 a );
-
-
Description
+```c +#include- These are the vectorized functions - of Sleef_truncq1_purec. -
+__device__ Sleef_quadx1 Sleef_powq1_u10cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -Round to integer towards minus infinity
+### Hyperbolic sine functions -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_floorq1_cuda( Sleef_quadx1 a );
-
-
Description
+These are the vectorized functions +of [Sleef_sinhq1_u10purec](../quad#sleef_sinhq1_u10purec). -- These are the vectorized functions - of Sleef_floorq1_purec. -
+### Hyperbolic cosine functions -Round to integer towards plus infinity
+__device__ Sleef_quadx1 Sleef_coshq1_u10cuda( Sleef_quadx1 a ); +``` -Synopsis
+These are the vectorized functions +of [Sleef_coshq1_u10purec](../quad#sleef_coshq1_u10purec). -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_ceilq1_cuda( Sleef_quadx1 a );
-
-
Description
+```c +#include- These are the vectorized functions - of Sleef_ceilq1_purec. -
+__device__ Sleef_quadx1 Sleef_tanhq1_u10cuda( Sleef_quadx1 a ); +``` -Round to integer away from zero
+### Inverse hyperbolic sine functions -Synopsis
+```c +#include
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_roundq1_cuda( Sleef_quadx1 a );
-
-
Description
+These are the vectorized functions +of [Sleef_asinhq1_u10purec](../quad#sleef_asinhq1_u10purec). -- These are the vectorized functions - of Sleef_roundq1_purec. -
- -Round to integer, ties round to even
+```c +#includeSynopsis
+__device__ Sleef_quadx1 Sleef_acoshq1_u10cuda( Sleef_quadx1 a ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_rintq1_cuda( Sleef_quadx1 a );
-
-
Description
+### Inverse hyperbolic tangent functions -- These are the vectorized functions - of Sleef_rintq1_purec. -
+```c +#includeAbsolute value
+These are the vectorized functions +of [Sleef_atanhq1_u10purec](../quad#sleef_atanhq1_u10purec). -Synopsis
+### Round to integer towards zero -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_fabsq1_cuda( Sleef_quadx1 a );
-
-
Description
+__device__ Sleef_quadx1 Sleef_truncq1_cuda( Sleef_quadx1 a ); +``` -- These are the vectorized functions - of Sleef_fabsq1_purec. -
- -Copy sign of a number
- -Synopsis
- -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_copysignq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+### Round to integer towards minus infinity -- These are the vectorized functions - of Sleef_copysignq1_purec. -
+```c +#includeMaximum of two numbers
+These are the vectorized functions +of [Sleef_floorq1_purec](../quad#sleef_floorq1_purec). -Synopsis
+### Round to integer towards plus infinity -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_fmaxq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+__device__ Sleef_quadx1 Sleef_ceilq1_cuda( Sleef_quadx1 a ); +``` -- These are the vectorized functions - of Sleef_fmaxq1_purec. -
+These are the vectorized functions +of [Sleef_ceilq1_purec](../quad#sleef_ceilq1_purec). -Minimum of two numbers
+```c +#includeSynopsis
+__device__ Sleef_quadx1 Sleef_roundq1_cuda( Sleef_quadx1 a ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_fminq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+### Round to integer, ties round to even -- These are the vectorized functions - of Sleef_fminq1_purec. -
+```c +#includePositive difference
+These are the vectorized functions +of [Sleef_rintq1_purec](../quad#sleef_rintq1_purec). -Synopsis
+### Absolute value -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_fdimq1_u05cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+__device__ Sleef_quadx1 Sleef_fabsq1_cuda( Sleef_quadx1 a ); +``` -- These are the vectorized functions - of Sleef_fdimq1_u05purec. -
+These are the vectorized functions +of [Sleef_fabsq1_purec](../quad#sleef_fabsq1_purec). -Floating point remainder
+```c +#includeSynopsis
+__device__ Sleef_quadx1 Sleef_copysignq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_fmodq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+### Maximum of two numbers -- These are the vectorized functions - of Sleef_fmodq1_purec. -
+```c +#includeFloating point remainder
+These are the vectorized functions +of [Sleef_fmaxq1_purec](../quad#sleef_fmaxq1_purec). -Synopsis
+### Minimum of two numbers -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_remainderq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+__device__ Sleef_quadx1 Sleef_fminq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -- These are the vectorized functions - of Sleef_remainderq1_purec. -
+These are the vectorized functions +of [Sleef_fminq1_purec](../quad#sleef_fminq1_purec). -Split a number to fractional and integral components
+```c +#includeSynopsis
+__device__ Sleef_quadx1 Sleef_fdimq1_u05cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_frexpq1_cuda( Sleef_quadx1 x, int32_t * ptr );
-
-
Description
+### Floating point remainder -- These are the vectorized functions - of Sleef_frexpq1_purec. -
+```c +#includeBreak a number into integral and fractional parts
+These are the vectorized functions +of [Sleef_fmodq1_purec](../quad#sleef_fmodq1_purec). -Synopsis
+### Floating point remainder -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_modfq1_cuda( Sleef_quadx1 x, Sleef_quadx1 * ptr );
-
-
Description
+__device__ Sleef_quadx1 Sleef_remainderq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -- These are the vectorized functions - of Sleef_modfq1_purec. -
+These are the vectorized functions +of [Sleef_remainderq1_purec](../quad#sleef_remainderq1_purec). -2D Euclidian distance
+```c +#includeSynopsis
+__device__ Sleef_quadx1 Sleef_frexpq1_cuda( Sleef_quadx1 x, int32_t * ptr ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_hypotq1_u05cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-
Description
+### Break a number into integral and fractional parts -- These are the vectorized functions - of Sleef_hypotq1_u05purec. -
+```c +#includeFused multiply and accumulate
+These are the vectorized functions +of [Sleef_modfq1_purec](../quad#sleef_modfq1_purec). -Synopsis
+### 2D Euclidian distance -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_fmaq1_u05cuda( Sleef_quadx1 x, Sleef_quadx1 y, Sleef_quadx1 z );
-
-
Description
+__device__ Sleef_quadx1 Sleef_hypotq1_u05cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -- These are the vectorized functions - of Sleef_fmaq1_u05purec. -
+These are the vectorized functions +of [Sleef_hypotq1_u05purec](../quad#sleef_hypotq1_u05purec). -Multiply by integral power of 2
+```c +#includeSynopsis
+__device__ Sleef_quadx1 Sleef_fmaq1_u05cuda( Sleef_quadx1 x, Sleef_quadx1 y, Sleef_quadx1 z ); +``` -
-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_ldexpq1_cuda( Sleef_quadx1 x, int32_t e );
-
-
Description
+### Multiply by integral power of 2 -- These are the vectorized functions - of Sleef_ldexpq1_purec. -
+```c +#includeInteger exponent of an FP number
+These are the vectorized functions +of [Sleef_ldexpq1_purec](../quad#sleef_ldexpq1_purec). -Synopsis
+### Integer exponent of an FP number -
-#include <sleefquadinline_cuda.h>
-
-__device__ int32_t Sleef_ilogbq1_cuda( Sleef_quadx1 x );
-
-
Description
+__device__ int32_t Sleef_ilogbq1_cuda( Sleef_quadx1 x ); +``` -- These are the vectorized functions - of Sleef_ilogbq1_purec. -
+These are the vectorized functions +of [Sleef_ilogbq1_purec](../quad#sleef_ilogbq1_purec). diff --git a/docs/2-references/quad/ppc64.md b/docs/2-references/quad/ppc64.md index cbf13d28..c5f585d3 100644 --- a/docs/2-references/quad/ppc64.md +++ b/docs/2-references/quad/ppc64.md @@ -10,1344 +10,822 @@ permalink: /2-references/quad/ppc64Sleef_quadx2
- -Description
- -- Sleef_quadx2 is a data type for retaining two QP - FP numbers. Please - use Sleef_loadq2, Sleef_storeq2, Sleef_getq2 - and Sleef_setq2 functions to access the - data inside variables in this data type. -
+### Sleef_quadx2 +`Sleef_quadx2` is a data type for retaining two QP FP numbers. Please use +[Sleef_loadq2](#load), [Sleef_storeq2](#store), [Sleef_getq2](#get) and +[Sleef_setq2](#set) functions to access the data inside variables in this data +type.Load QP FP values into vector variable
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_loadq2( Sleef_quad * ptr );
-Sleef_quadx2 Sleef_loadq2_vsx( Sleef_quad * ptr );
-Sleef_quadx2 Sleef_loadq2_vsx3( Sleef_quad * ptr );
-
-Link with -lsleefquad.
-
Description
- -- These functions load QP FP values from memory and store the results - in a vector variable. -
- -Store QP FP values in a vector variable to memory
- -Synopsis
- -
-#include <sleefquad.h>
-
-void Sleef_storeq2( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq2_vsx( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq2_vsx3( Sleef_quad * ptr, Sleef_quadx2 v );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_loadq2(Sleef_quad * ptr); +Sleef_quadx2 Sleef_loadq2_vsx(Sleef_quad * ptr); +Sleef_quadx2 Sleef_loadq2_vsx3(Sleef_quad * ptr); +``` +Link with `-lsleefquad`. -- These functions store QP FP values in the given variable to memory. -
+These functions load QP FP values from memory and store the results in a vector +variable. -Extract one element from QP FP vector variable
+void Sleef_storeq2(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq2_vsx(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq2_vsx3(Sleef_quad * ptr, Sleef_quadx2 v); +``` +Link with `-lsleefquad`. -Synopsis
+These functions store QP FP values in the given variable to memory. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_getq2( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq2_vsx( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq2_vsx3( Sleef_quadx2 v, int index );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_getq2(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq2_vsx(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq2_vsx3(Sleef_quadx2 v, int index); +``` +Link with `-lsleefquad`. -- These functions extract the index-th element from - a QP FP vector variable. -
+These functions extract the `index`-th element from a QP FP vector variable. -Set one element in QP FP vector variable
+Sleef_quadx2 Sleef_setq2(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx2 Sleef_setq2_vsx(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx2 Sleef_setq2_vsx3(Sleef_quadx2 v, int index, Sleef_quad e); +``` +Link with `-lsleefquad`. -Synopsis
+These functions return a QP FP vector in which the `index`-th element is `e`, +and other elements are the same as `v`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_setq2( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx2 Sleef_setq2_vsx( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx2 Sleef_setq2_vsx3( Sleef_quadx2 v, int index, Sleef_quad e );
-
-Link with -lsleefquad.
-
Description
- -- These functions return a QP FP vector in which - the index-th element is e, and - other elements are the same as v. -
- -Set all elements in QP FP vector to the same value
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_splatq2( Sleef_quad e );
-Sleef_quadx2 Sleef_splatq2_vsx( Sleef_quad e );
-Sleef_quadx2 Sleef_splatq2_vsx3( Sleef_quad e );
-
-Link with -lsleefquad.
-
Description
- -- These functions return a QP FP vector in which all elements are set - to e. -
+Sleef_quadx2 Sleef_splatq2(Sleef_quad e); +Sleef_quadx2 Sleef_splatq2_vsx(Sleef_quad e); +Sleef_quadx2 Sleef_splatq2_vsx3(Sleef_quad e); +``` +Link with `-lsleefquad`. +These functions return a QP FP vector in which all elements are set to `e`.Convert QP number to double-precision number
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector double Sleef_cast_to_doubleq2( Sleef_quadx2 a );
-vector double Sleef_cast_to_doubleq2_vsx( Sleef_quadx2 a );
-vector double Sleef_cast_to_doubleq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions convert a QP FP value to a double-precision value. -
+vector double Sleef_cast_to_doubleq2(Sleef_quadx2 a); +vector double Sleef_cast_to_doubleq2_vsx(Sleef_quadx2 a); +vector double Sleef_cast_to_doubleq2_vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -Convert double-precision number to QP number
+### Convert double-precision number to QP number -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_doubleq2( vector double a );
-Sleef_quadx2 Sleef_cast_from_doubleq2_vsx( vector double a );
-Sleef_quadx2 Sleef_cast_from_doubleq2_vsx3( vector double a );
-
-Link with -lsleefquad.
-
Description
+These functions convert a double-precision value to a QP FP value. -- These functions convert a double-precision value to a QP FP value. -
+### Convert QP number to 64-bit signed integer -Convert QP number to 64-bit signed integer
+These functions convert a QP FP value to a 64-bit signed integer. -Synopsis
+### Convert 64-bit signed integer to QP number -
-#include <sleefquad.h>
-
-vector signed long long Sleef_cast_to_int64q2( Sleef_quadx2 a );
-vector signed long long Sleef_cast_to_int64q2_vsx( Sleef_quadx2 a );
-vector signed long long Sleef_cast_to_int64q2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_cast_from_int64q2(vector signed long long a); +Sleef_quadx2 Sleef_cast_from_int64q2_vsx(vector signed long long a); +Sleef_quadx2 Sleef_cast_from_int64q2_vsx3(vector signed long long a); +``` +Link with `-lsleefquad`. -- These functions convert a QP FP value to a 64-bit signed integer. -
+These functions convert a 64-bit signed integer to a QP FP value. -Convert 64-bit signed integer to QP number
+vector unsigned long long Sleef_cast_to_uint64q2(Sleef_quadx2 a); +vector unsigned long long Sleef_cast_to_uint64q2_vsx(Sleef_quadx2 a); +vector unsigned long long Sleef_cast_to_uint64q2_vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions convert a QP FP value to a 64-bit signed integer. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_int64q2( vector signed long long a );
-Sleef_quadx2 Sleef_cast_from_int64q2_vsx( vector signed long long a );
-Sleef_quadx2 Sleef_cast_from_int64q2_vsx3( vector signed long long a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions convert a 64-bit signed integer to a QP FP value. -
- -Convert QP number to 64-bit unsigned integer
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector unsigned long long Sleef_cast_to_uint64q2( Sleef_quadx2 a );
-vector unsigned long long Sleef_cast_to_uint64q2_vsx( Sleef_quadx2 a );
-vector unsigned long long Sleef_cast_to_uint64q2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These functions convert a QP FP value to a 64-bit signed integer. -
- -Convert 64-bit unsigned integer to QP number
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_uint64q2( vector unsigned long long a );
-Sleef_quadx2 Sleef_cast_from_uint64q2_vsx( vector unsigned long long a );
-Sleef_quadx2 Sleef_cast_from_uint64q2_vsx3( vector unsigned long long a );
-
-Link with -lsleefquad.
-
Description
- -- These functions convert a 64-bit unsigned integer to a QP FP value. -
+Sleef_quadx2 Sleef_cast_from_uint64q2(vector unsigned long long a); +Sleef_quadx2 Sleef_cast_from_uint64q2_vsx(vector unsigned long long a); +Sleef_quadx2 Sleef_cast_from_uint64q2_vsx3(vector unsigned long long a); +``` +Link with `-lsleefquad`. +These functions convert a 64-bit unsigned integer to a QP FP value.QP comparison functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector int Sleef_icmpltq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpleq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgtq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgeq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpeqq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpneq2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-vector int Sleef_icmpltq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpleq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgtq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgeq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpeqq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpneq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-
-vector int Sleef_icmpltq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpleq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgtq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgeq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpeqq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpneq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions of comparison functions. -
- -QP comparison functions of the second kind
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector int Sleef_icmpq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_icmpq1_purec. -
- -Check orderedness
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector int Sleef_iunordq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_iunordq2_vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_iunordq2_vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_iunordq1_purec. -
- -Select elements
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_iselectq2( vector int c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_iselectq2_vsx( vector int c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_iselectq2_vsx3( vector int c, Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions that operate in the same way as the ternary operator. -
- -QP functions for basic arithmetic operations
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_addq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2( Sleef_quadx2 a );
-
-Sleef_quadx2 Sleef_addq2_u05vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05vsx( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2_vsx( Sleef_quadx2 a );
-
-Sleef_quadx2 Sleef_addq2_u05vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05vsx3( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions of the basic arithmetic operations. -
- -Square root functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sqrtq2_u05( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sqrtq2_u05vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sqrtq2_u05vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_sqrtq1_u05purec. -
- -Sine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sinq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_sinq1_u10purec. -
+### QP comparison functions -Cosine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cosq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_cosq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_cosq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_cosq1_u10purec. -
- -Tangent functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_tanq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+vector int Sleef_icmpltq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpleq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgtq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgeq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpeqq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpneq2(Sleef_quadx2 a, Sleef_quadx2 b); -- These are the vectorized functions - of Sleef_tanq1_u10purec. -
+vector int Sleef_icmpltq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpleq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgtq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgeq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpeqq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpneq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); -Arc sine functions
+These are the vectorized functions of [comparison +functions](../quad#basicComparison). -Synopsis
+### QP comparison functions of the second kind -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_asinq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+vector int Sleef_icmpq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpq2_vsx3(Sleef_quadx2 a, Sleef_quadx2 b); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_asinq1_u10purec. -
+These are the vectorized functions +of [Sleef_icmpq1_purec](../quad#sleef_icmpq1_purec). -Arc cosine functions
+```c +#includeSynopsis
+vector int Sleef_iunordq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_iunordq2_vsx(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_iunordq2_vsx3(Sleef_quadx2 a, Sleef_quadx2 b); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_acosq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acosq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acosq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Select elements -- These are the vectorized functions - of Sleef_acosq1_u10purec. -
+```c +#includeArc tangent functions
+These are the vectorized functions that operate in the same way as the ternary +operator. -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_atanq1_u10purec. -
- -Base-e exponential functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_expq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_expq1_u10purec. -
- -Base-2 exponential functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_exp2q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp2q2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp2q2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_exp2q1_u10purec. -
- -Base-10 exponentail
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_exp10q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp10q2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp10q2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_exp10q1_u10purec. -
- -Base-e exponential functions minus 1
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_expm1q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expm1q2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expm1q2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_expm1q1_u10purec. -
- -Natural logarithmic functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_logq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_logq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_logq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_logq1_u10purec. -
- -Base-2 logarithmic functions
+Synopsis
+### QP functions for basic arithmetic operations -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log2q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log2q2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log2q2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_addq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2(Sleef_quadx2 a); -- These are the vectorized functions - of Sleef_log2q1_u10purec. -
+Sleef_quadx2 Sleef_addq2_u05vsx(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05vsx(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05vsx(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05vsx(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2_vsx(Sleef_quadx2 a); -Base-10 logarithmic functions
+These are the vectorized functions of [the basic arithmetic +operations](../quad#basicArithmetic). -Synopsis
+### Square root functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log10q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log10q2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log10q2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_sqrtq2_u05(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sqrtq2_u05vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sqrtq2_u05vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_log10q1_u10purec. -
+These are the vectorized functions +of [Sleef_sqrtq1_u05purec](../quad#sleef_sqrtq1_u05purec). -Logarithm of one plus argument
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_sinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log1pq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log1pq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log1pq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Cosine functions -- These are the vectorized functions - of Sleef_log1pq1_u10purec. -
+```c +#includePower functions
+These are the vectorized functions +of [Sleef_cosq1_u10purec](../quad#sleef_cosq1_u10purec). -Synopsis
+### Tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_powq2_u10( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_powq2_u10vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_powq2_u10vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_tanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_powq1_u10purec. -
+These are the vectorized functions +of [Sleef_tanq1_u10purec](../quad#sleef_tanq1_u10purec). -Hyperbolic sine functions
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_asinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sinhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinhq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinhq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Arc cosine functions -- These are the vectorized functions - of Sleef_sinhq1_u10purec. -
+```c +#includeHyperbolic cosine functions
+These are the vectorized functions +of [Sleef_acosq1_u10purec](../quad#sleef_acosq1_u10purec). -Synopsis
+### Arc tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_coshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_coshq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_coshq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_atanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_coshq1_u10purec. -
+These are the vectorized functions +of [Sleef_atanq1_u10purec](../quad#sleef_atanq1_u10purec). -Hyperbolic tangent functions
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_expq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_tanhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanhq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanhq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Base-2 exponential functions -- These are the vectorized functions - of Sleef_tanhq1_u10purec. -
+```c +#includeInverse hyperbolic sine functions
+These are the vectorized functions +of [Sleef_exp2q1_u10purec](../quad#sleef_exp2q1_u10purec). -Synopsis
+### Base-10 exponentail -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_asinhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinhq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinhq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_exp10q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_exp10q2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_exp10q2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_asinhq1_u10purec. -
+These are the vectorized functions +of [Sleef_exp10q1_u10purec](../quad#sleef_exp10q1_u10purec). -Inverse hyperbolic cosine functions
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_expm1q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expm1q2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expm1q2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_acoshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acoshq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acoshq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Natural logarithmic functions -- These are the vectorized functions - of Sleef_acoshq1_u10purec. -
+```c +#includeInverse hyperbolic tangent functions
+These are the vectorized functions +of [Sleef_logq1_u10purec](../quad#sleef_logq1_u10purec). -Synopsis
+### Base-2 logarithmic functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanhq2_u10vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanhq2_u10vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_log2q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log2q2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log2q2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_atanhq1_u10purec. -
+These are the vectorized functions +of [Sleef_log2q1_u10purec](../quad#sleef_log2q1_u10purec). -Round to integer towards zero
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_log10q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log10q2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log10q2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_truncq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_truncq2_vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_truncq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Logarithm of one plus argument -- These are the vectorized functions - of Sleef_truncq1_purec. -
+```c +#includeRound to integer towards minus infinity
+These are the vectorized functions +of [Sleef_log1pq1_u10purec](../quad#sleef_log1pq1_u10purec). -Synopsis
+### Power functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_floorq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_floorq2_vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_floorq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_powq2_u10(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_powq2_u10vsx(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_powq2_u10vsx3(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_floorq1_purec. -
+These are the vectorized functions +of [Sleef_powq1_u10purec](../quad#sleef_powq1_u10purec). -Round to integer towards plus infinity
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_sinhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinhq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinhq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_ceilq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_ceilq2_vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_ceilq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Hyperbolic cosine functions -- These are the vectorized functions - of Sleef_ceilq1_purec. -
+```c +#includeRound to integer away from zero
+These are the vectorized functions +of [Sleef_coshq1_u10purec](../quad#sleef_coshq1_u10purec). -Synopsis
+### Hyperbolic tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_roundq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_roundq2_vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_roundq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_tanhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanhq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanhq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_roundq1_purec. -
+These are the vectorized functions +of [Sleef_tanhq1_u10purec](../quad#sleef_tanhq1_u10purec). -Round to integer, ties round to even
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_asinhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinhq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinhq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_rintq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_rintq2_vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_rintq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Inverse hyperbolic cosine functions -- These are the vectorized functions - of Sleef_rintq1_purec. -
+```c +#includeAbsolute value
+These are the vectorized functions +of [Sleef_acoshq1_u10purec](../quad#sleef_acoshq1_u10purec). -Synopsis
+### Inverse hyperbolic tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fabsq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_fabsq2_vsx( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_fabsq2_vsx3( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_atanhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanhq2_u10vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanhq2_u10vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fabsq1_purec. -
+These are the vectorized functions +of [Sleef_atanhq1_u10purec](../quad#sleef_atanhq1_u10purec). -Copy sign of a number
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_truncq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_truncq2_vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_truncq2_vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_copysignq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_copysignq2_vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_copysignq2_vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+### Round to integer towards minus infinity -- These are the vectorized functions - of Sleef_copysignq1_purec. -
+```c +#includeMaximum of two numbers
+These are the vectorized functions +of [Sleef_floorq1_purec](../quad#sleef_floorq1_purec). -Synopsis
+### Round to integer towards plus infinity -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmaxq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmaxq2_vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmaxq2_vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_ceilq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_ceilq2_vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_ceilq2_vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fmaxq1_purec. -
+These are the vectorized functions +of [Sleef_ceilq1_purec](../quad#sleef_ceilq1_purec). -Minimum of two numbers
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_roundq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_roundq2_vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_roundq2_vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fminq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fminq2_vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fminq2_vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+### Round to integer, ties round to even -- These are the vectorized functions - of Sleef_fminq1_purec. -
+```c +#includePositive difference
+These are the vectorized functions +of [Sleef_rintq1_purec](../quad#sleef_rintq1_purec). -Synopsis
+### Absolute value -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fdimq2_u05( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fdimq2_u05vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fdimq2_u05vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_fabsq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_fabsq2_vsx(Sleef_quadx2 a); +Sleef_quadx2 Sleef_fabsq2_vsx3(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fdimq1_u05purec. -
+These are the vectorized functions +of [Sleef_fabsq1_purec](../quad#sleef_fabsq1_purec). -Floating point remainder
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_copysignq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_copysignq2_vsx(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_copysignq2_vsx3(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmodq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmodq2_vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmodq2_vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+### Maximum of two numbers -- These are the vectorized functions - of Sleef_fmodq1_purec. -
+```c +#includeFloating point remainder
+These are the vectorized functions +of [Sleef_fmaxq1_purec](../quad#sleef_fmaxq1_purec). -Synopsis
+### Minimum of two numbers -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_remainderq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_remainderq2_vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_remainderq2_vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_fminq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fminq2_vsx(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fminq2_vsx3(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_remainderq1_purec. -
+These are the vectorized functions +of [Sleef_fminq1_purec](../quad#sleef_fminq1_purec). -Split a number to fractional and integral components
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_fdimq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fdimq2_u05vsx(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fdimq2_u05vsx3(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_frexpq2( Sleef_quadx2 x, vector int * ptr );
-Sleef_quadx2 Sleef_frexpq2_vsx( Sleef_quadx2 x, vector int * ptr );
-Sleef_quadx2 Sleef_frexpq2_vsx3( Sleef_quadx2 x, vector int * ptr );
-
-Link with -lsleefquad.
-
Description
+### Floating point remainder -- These are the vectorized functions - of Sleef_frexpq1_purec. -
+```c +#includeBreak a number into integral and fractional parts
+These are the vectorized functions +of [Sleef_fmodq1_purec](../quad#sleef_fmodq1_purec). -Synopsis
+### Floating point remainder -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_modfq2( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_quadx2 Sleef_modfq2_vsx( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_quadx2 Sleef_modfq2_vsx3( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_remainderq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_remainderq2_vsx(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_remainderq2_vsx3(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_modfq1_purec. -
+These are the vectorized functions +of [Sleef_remainderq1_purec](../quad#sleef_remainderq1_purec). -2D Euclidian distance
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_frexpq2(Sleef_quadx2 x, vector int * ptr); +Sleef_quadx2 Sleef_frexpq2_vsx(Sleef_quadx2 x, vector int * ptr); +Sleef_quadx2 Sleef_frexpq2_vsx3(Sleef_quadx2 x, vector int * ptr); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_hypotq2_u05( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_hypotq2_u05vsx( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_hypotq2_u05vsx3( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+### Break a number into integral and fractional parts -- These are the vectorized functions - of Sleef_hypotq1_u05purec. -
+```c +#includeFused multiply and accumulate
+These are the vectorized functions +of [Sleef_modfq1_purec](../quad#sleef_modfq1_purec). -Synopsis
+### 2D Euclidian distance -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmaq2_u05( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_quadx2 Sleef_fmaq2_u05vsx( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_quadx2 Sleef_fmaq2_u05vsx3( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_hypotq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_hypotq2_u05vsx(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_hypotq2_u05vsx3(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_fmaq1_u05purec. -
+These are the vectorized functions +of [Sleef_hypotq1_u05purec](../quad#sleef_hypotq1_u05purec). -Multiply by integral power of 2
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_fmaq2_u05(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx2 Sleef_fmaq2_u05vsx(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx2 Sleef_fmaq2_u05vsx3(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_ldexpq2( Sleef_quadx2 x, vector int e );
-Sleef_quadx2 Sleef_ldexpq2_vsx( Sleef_quadx2 x, vector int e );
-Sleef_quadx2 Sleef_ldexpq2_vsx3( Sleef_quadx2 x, vector int e );
-
-Link with -lsleefquad.
-
Description
+### Multiply by integral power of 2 -- These are the vectorized functions - of Sleef_ldexpq1_purec. -
+```c +#includeInteger exponent of an FP number
+These are the vectorized functions +of [Sleef_ldexpq1_purec](../quad#sleef_ldexpq1_purec). -Synopsis
+### Integer exponent of an FP number -
-#include <sleefquad.h>
-
-vector int Sleef_ilogbq2( Sleef_quadx2 x );
-vector int Sleef_ilogbq2_vsx( Sleef_quadx2 x );
-vector int Sleef_ilogbq2_vsx3( Sleef_quadx2 x );
-
-Link with -lsleefquad.
-
Description
+vector int Sleef_ilogbq2(Sleef_quadx2 x); +vector int Sleef_ilogbq2_vsx(Sleef_quadx2 x); +vector int Sleef_ilogbq2_vsx3(Sleef_quadx2 x); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_ilogbq1_purec. -
+These are the vectorized functions +of [Sleef_ilogbq1_purec](../quad#sleef_ilogbq1_purec). diff --git a/docs/2-references/quad/s390x.md b/docs/2-references/quad/s390x.md index e1a471bc..1293ffe7 100644 --- a/docs/2-references/quad/s390x.md +++ b/docs/2-references/quad/s390x.md @@ -10,1344 +10,822 @@ permalink: /2-references/quad/s390xSleef_quadx2
- -Description
- -- Sleef_quadx2 is a data type for retaining two QP - FP numbers. Please - use Sleef_loadq2, Sleef_storeq2, Sleef_getq2 - and Sleef_setq2 functions to access the - data inside variables in this data type. -
+### Sleef_quadx2 +`Sleef_quadx2` is a data type for retaining two QP FP numbers. Please use +[Sleef_loadq2](#load), [Sleef_storeq2](#store), [Sleef_getq2](#get) and +[Sleef_setq2](#set) functions to access the data inside variables in this data +type.Load QP FP values into vector variable
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_loadq2( Sleef_quad * ptr );
-Sleef_quadx2 Sleef_loadq2_vxe( Sleef_quad * ptr );
-Sleef_quadx2 Sleef_loadq2_vxe2( Sleef_quad * ptr );
-
-Link with -lsleefquad.
-
Description
- -- These functions load QP FP values from memory and store the results - in a vector variable. -
- -Store QP FP values in a vector variable to memory
- -Synopsis
- -
-#include <sleefquad.h>
-
-void Sleef_storeq2( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq2_vxe( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq2_vxe2( Sleef_quad * ptr, Sleef_quadx2 v );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_loadq2(Sleef_quad * ptr); +Sleef_quadx2 Sleef_loadq2_vxe(Sleef_quad * ptr); +Sleef_quadx2 Sleef_loadq2_vxe2(Sleef_quad * ptr); +``` +Link with `-lsleefquad`. -- These functions store QP FP values in the given variable to memory. -
+These functions load QP FP values from memory and store the results in a vector +variable. -Extract one element from QP FP vector variable
+void Sleef_storeq2(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq2_vxe(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq2_vxe2(Sleef_quad * ptr, Sleef_quadx2 v); +``` +Link with `-lsleefquad`. -Synopsis
+These functions store QP FP values in the given variable to memory. -
-#include <sleefquad.h>
-
-Sleef_quad Sleef_getq2( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq2_vxe( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq2_vxe2( Sleef_quadx2 v, int index );
-
-Link with -lsleefquad.
-
Description
+Sleef_quad Sleef_getq2(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq2_vxe(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq2_vxe2(Sleef_quadx2 v, int index); +``` +Link with `-lsleefquad`. -- These functions extract the index-th element from - a QP FP vector variable. -
+These functions extract the `index`-th element from a QP FP vector variable. -Set one element in QP FP vector variable
+Sleef_quadx2 Sleef_setq2(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx2 Sleef_setq2_vxe(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx2 Sleef_setq2_vxe2(Sleef_quadx2 v, int index, Sleef_quad e); +``` +Link with `-lsleefquad`. -Synopsis
+These functions return a QP FP vector in which the `index`-th element is `e`, +and other elements are the same as `v`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_setq2( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx2 Sleef_setq2_vxe( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx2 Sleef_setq2_vxe2( Sleef_quadx2 v, int index, Sleef_quad e );
-
-Link with -lsleefquad.
-
Description
- -- These functions return a QP FP vector in which - the index-th element is e, and - other elements are the same as v. -
- -Set all elements in QP FP vector to the same value
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_splatq2( Sleef_quad e );
-Sleef_quadx2 Sleef_splatq2_vxe( Sleef_quad e );
-Sleef_quadx2 Sleef_splatq2_vxe2( Sleef_quad e );
-
-Link with -lsleefquad.
-
Description
- -- These functions return a QP FP vector in which all elements are set - to e. -
+Sleef_quadx2 Sleef_splatq2(Sleef_quad e); +Sleef_quadx2 Sleef_splatq2_vxe(Sleef_quad e); +Sleef_quadx2 Sleef_splatq2_vxe2(Sleef_quad e); +``` +Link with `-lsleefquad`. +These functions return a QP FP vector in which all elements are set +to `e`.Convert QP number to double-precision number
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector double Sleef_cast_to_doubleq2( Sleef_quadx2 a );
-vector double Sleef_cast_to_doubleq2_vxe( Sleef_quadx2 a );
-vector double Sleef_cast_to_doubleq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions convert a QP FP value to a double-precision value. -
+vector double Sleef_cast_to_doubleq2(Sleef_quadx2 a); +vector double Sleef_cast_to_doubleq2_vxe(Sleef_quadx2 a); +vector double Sleef_cast_to_doubleq2_vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -Convert double-precision number to QP number
+### Convert double-precision number to QP number -Synopsis
+```c +#include
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_doubleq2( vector double a );
-Sleef_quadx2 Sleef_cast_from_doubleq2_vxe( vector double a );
-Sleef_quadx2 Sleef_cast_from_doubleq2_vxe2( vector double a );
-
-Link with -lsleefquad.
-
Description
+These functions convert a double-precision value to a QP FP value. -- These functions convert a double-precision value to a QP FP value. -
+### Convert QP number to 64-bit signed integer -Convert QP number to 64-bit signed integer
+These functions convert a QP FP value to a 64-bit signed integer. -Synopsis
+### Convert 64-bit signed integer to QP number -
-#include <sleefquad.h>
-
-vector signed long long Sleef_cast_to_int64q2( Sleef_quadx2 a );
-vector signed long long Sleef_cast_to_int64q2_vxe( Sleef_quadx2 a );
-vector signed long long Sleef_cast_to_int64q2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_cast_from_int64q2(vector signed long long a); +Sleef_quadx2 Sleef_cast_from_int64q2_vxe(vector signed long long a); +Sleef_quadx2 Sleef_cast_from_int64q2_vxe2(vector signed long long a); +``` +Link with `-lsleefquad`. -- These functions convert a QP FP value to a 64-bit signed integer. -
+These functions convert a 64-bit signed integer to a QP FP value. -Convert 64-bit signed integer to QP number
+vector unsigned long long Sleef_cast_to_uint64q2(Sleef_quadx2 a); +vector unsigned long long Sleef_cast_to_uint64q2_vxe(Sleef_quadx2 a); +vector unsigned long long Sleef_cast_to_uint64q2_vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -Synopsis
+These functions convert a QP FP value to a 64-bit signed integer. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_int64q2( vector signed long long a );
-Sleef_quadx2 Sleef_cast_from_int64q2_vxe( vector signed long long a );
-Sleef_quadx2 Sleef_cast_from_int64q2_vxe2( vector signed long long a );
-
-Link with -lsleefquad.
-
Description
+```c +#include- These functions convert a 64-bit signed integer to a QP FP value. -
- -Convert QP number to 64-bit unsigned integer
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector unsigned long long Sleef_cast_to_uint64q2( Sleef_quadx2 a );
-vector unsigned long long Sleef_cast_to_uint64q2_vxe( Sleef_quadx2 a );
-vector unsigned long long Sleef_cast_to_uint64q2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These functions convert a QP FP value to a 64-bit signed integer. -
- -Convert 64-bit unsigned integer to QP number
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_uint64q2( vector unsigned long long a );
-Sleef_quadx2 Sleef_cast_from_uint64q2_vxe( vector unsigned long long a );
-Sleef_quadx2 Sleef_cast_from_uint64q2_vxe2( vector unsigned long long a );
-
-Link with -lsleefquad.
-
Description
- -- These functions convert a 64-bit unsigned integer to a QP FP value. -
+Sleef_quadx2 Sleef_cast_from_uint64q2(vector unsigned long long a); +Sleef_quadx2 Sleef_cast_from_uint64q2_vxe(vector unsigned long long a); +Sleef_quadx2 Sleef_cast_from_uint64q2_vxe2(vector unsigned long long a); +``` +Link with `-lsleefquad`. +These functions convert a 64-bit unsigned integer to a QP FP value.QP comparison functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector int Sleef_icmpltq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpleq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgtq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgeq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpeqq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpneq2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-vector int Sleef_icmpltq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpleq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgtq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgeq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpeqq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpneq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-
-vector int Sleef_icmpltq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpleq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgtq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpgeq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpeqq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpneq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions of comparison functions. -
- -QP comparison functions of the second kind
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector int Sleef_icmpq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_icmpq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_icmpq1_purec. -
- -Check orderedness
- -Synopsis
- -
-#include <sleefquad.h>
-
-vector int Sleef_iunordq2( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_iunordq2_vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-vector int Sleef_iunordq2_vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_iunordq1_purec. -
- -Select elements
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_iselectq2( vector int c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_iselectq2_vxe( vector int c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_iselectq2_vxe2( vector int c, Sleef_quadx2 a, Sleef_quadx2 b );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions that operate in the same way as the ternary operator. -
- -QP functions for basic arithmetic operations
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_addq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2( Sleef_quadx2 a );
-
-Sleef_quadx2 Sleef_addq2_u05vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05vxe( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2_vxe( Sleef_quadx2 a );
-
-Sleef_quadx2 Sleef_addq2_u05vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05vxe2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions of the basic arithmetic operations. -
- -Square root functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sqrtq2_u05( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sqrtq2_u05vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sqrtq2_u05vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_sqrtq1_u05purec. -
- -Sine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sinq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_sinq1_u10purec. -
+### QP comparison functions -Cosine functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cosq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_cosq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_cosq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_cosq1_u10purec. -
- -Tangent functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_tanq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+vector int Sleef_icmpltq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpleq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgtq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgeq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpeqq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpneq2(Sleef_quadx2 a, Sleef_quadx2 b); -- These are the vectorized functions - of Sleef_tanq1_u10purec. -
+vector int Sleef_icmpltq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpleq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgtq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpgeq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpeqq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpneq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); -Arc sine functions
+These are the vectorized functions of [comparison +functions](../quad#basicComparison). -Synopsis
+### QP comparison functions of the second kind -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_asinq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+vector int Sleef_icmpq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_icmpq2_vxe2(Sleef_quadx2 a, Sleef_quadx2 b); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_asinq1_u10purec. -
+These are the vectorized functions +of [Sleef_icmpq1_purec](../quad#sleef_icmpq1_purec). -Arc cosine functions
+```c +#includeSynopsis
+vector int Sleef_iunordq2(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_iunordq2_vxe(Sleef_quadx2 a, Sleef_quadx2 b); +vector int Sleef_iunordq2_vxe2(Sleef_quadx2 a, Sleef_quadx2 b); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_acosq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acosq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acosq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Select elements -- These are the vectorized functions - of Sleef_acosq1_u10purec. -
+```c +#includeArc tangent functions
+These are the vectorized functions that operate in the same way as the ternary operator. -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_atanq1_u10purec. -
- -Base-e exponential functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_expq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_expq1_u10purec. -
- -Base-2 exponential functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_exp2q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp2q2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp2q2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_exp2q1_u10purec. -
- -Base-10 exponentail
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_exp10q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp10q2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp10q2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_exp10q1_u10purec. -
- -Base-e exponential functions minus 1
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_expm1q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expm1q2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expm1q2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_expm1q1_u10purec. -
- -Natural logarithmic functions
- -Synopsis
- -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_logq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_logq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_logq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
- -- These are the vectorized functions - of Sleef_logq1_u10purec. -
- -Base-2 logarithmic functions
+Synopsis
+### QP functions for basic arithmetic operations -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log2q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log2q2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log2q2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_addq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2(Sleef_quadx2 a); -- These are the vectorized functions - of Sleef_log2q1_u10purec. -
+Sleef_quadx2 Sleef_addq2_u05vxe(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05vxe(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05vxe(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05vxe(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2_vxe(Sleef_quadx2 a); -Base-10 logarithmic functions
+These are the vectorized functions of [the basic arithmetic +operations](../quad#basicArithmetic). -Synopsis
+### Square root functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log10q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log10q2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log10q2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_sqrtq2_u05(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sqrtq2_u05vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sqrtq2_u05vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_log10q1_u10purec. -
+These are the vectorized functions +of [Sleef_sqrtq1_u05purec](../quad#sleef_sqrtq1_u05purec). -Logarithm of one plus argument
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_sinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinq2_u10vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log1pq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log1pq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log1pq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Cosine functions -- These are the vectorized functions - of Sleef_log1pq1_u10purec. -
+```c +#includePower functions
+These are the vectorized functions +of [Sleef_cosq1_u10purec](../quad#sleef_cosq1_u10purec). -Synopsis
+### Tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_powq2_u10( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_powq2_u10vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_powq2_u10vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_tanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanq2_u10vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -- These are the vectorized functions - of Sleef_powq1_u10purec. -
+These are the vectorized functions +of [Sleef_tanq1_u10purec](../quad#sleef_tanq1_u10purec). -Hyperbolic sine functions
+```c +#includeSynopsis
+Sleef_quadx2 Sleef_asinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinq2_u10vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sinhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinhq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinhq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+### Arc cosine functions -- These are the vectorized functions - of Sleef_sinhq1_u10purec. -
+```c +#includeHyperbolic cosine functions
+These are the vectorized functions +of [Sleef_acosq1_u10purec](../quad#sleef_acosq1_u10purec). -Synopsis
+### Arc tangent functions -
-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_coshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_coshq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_coshq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad.
-
Description
+Sleef_quadx2 Sleef_atanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanq2_u10vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -