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/

Table of contents

- +* [Introduction](#introduction) +* [Data types](#datatypes) +* [Convenience macros and constants](#macro) +* [Conversion and output functions](#conversion) +* [Comparison functions](#comparison) +* [Math functions](#mathfunctions) +* [Tutorial](#tutorial)

Introduction

-

- 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.

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.

Convenience function, macro and constants

-

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. -

- -
+Function to define any QP FP constant -

SLEEF_QUAD_C - Macro for appending the correct suffix to a QP FP literal

+```c +#include -

Synopsis

+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 );
-
-

+### `SLEEF_QUAD_C` -

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 +#include -
- -

Constants

- -

-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. -
+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. - - - + + +
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SymbolMeaningValue
SLEEF_M_EqThe base e of natural logarithm2.7182818284590452353...
SLEEF_M_LOG2EqThe logarithm to base 2 of e1.4426950408889634073...
SLEEF_M_LOG10EqThe logarithm to base 10 of e0.4342944819032518276...
SLEEF_M_LN2qThe natural logarithm of 20.6931471805599453094...
SLEEF_M_LN10qThe natural logarithm of 102.3025850929940456840...
SLEEF_M_PIqπ, the ratio of a circle’s circumference to its diameter3.1415926535897932384...
SLEEF_M_PI_2qπ divided by two1.5707963267948966192...
SLEEF_M_PI_4qπ divided by four0.7853981633974483096...
SLEEF_M_1_PIq1/π, the receiprocal of π0.3183098861837906715...
SLEEF_M_2_PIq2/π, two times the receiprocal of π0.6366197723675813430...
SLEEF_M_2_SQRTPIqTwo times the reciprocal of the square root of π1.1283791670955125738...
SLEEF_M_SQRT2qThe square root of two1.4142135623730950488...
SLEEF_M_SQRT3qThe square root of three1.7320508075688772935...
SLEEF_M_INV_SQRT3qThe reciprocal of the square root of three0.5773502691896257645...
SLEEF_M_SQRT1_2qThe reciprocal of the square root of two0.7071067811865475244...
SLEEF_M_INV_SQRTPIqThe reciprocal of the square root of π0.5641895835477562869...
SLEEF_M_EGAMMAqThe Euler-Mascheroni constant0.5772156649015328606...
SLEEF_M_PHIqThe golden ratio constant1.6180339887498948482...
SLEEF_QUAD_MAXThe largest finite QP FP number216383 × (2 - 2-112) = 1.18973... × 104932
SLEEF_QUAD_MINThe smallest positive normal QP FP number2-16382 × (1 - 2-112) = 3.36210... × 10-4932
SLEEF_QUAD_EPSILONThe difference between 1 and the least QP FP number greater than 12-112 = 1.92592... × 10-34
SLEEF_QUAD_DENORM_MINThe smallest positive QP FP number2-16494 = 6.47517... × 10-4966
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolMeaningValue
SLEEF_M_EqThe base `e` of natural logarithm2.7182818284590452353...
SLEEF_M_LOG2EqThe logarithm to base 2 of `e`1.4426950408889634073...
SLEEF_M_LOG10EqThe logarithm to base 10 of `e`0.4342944819032518276...
SLEEF_M_LN2qThe natural logarithm of 20.6931471805599453094...
SLEEF_M_LN10qThe natural logarithm of 102.3025850929940456840...
SLEEF_M_PIqπ, the ratio of a circle’s circumference to its diameter3.1415926535897932384...
SLEEF_M_PI_2qπ divided by two1.5707963267948966192...
SLEEF_M_PI_4qπ divided by four0.7853981633974483096...
SLEEF_M_1_PIq1/π, the receiprocal of π0.3183098861837906715...
SLEEF_M_2_PIq2/π, two times the receiprocal of π0.6366197723675813430...
SLEEF_M_2_SQRTPIqTwo times the reciprocal of the square root of π1.1283791670955125738...
SLEEF_M_SQRT2qThe square root of two1.4142135623730950488...
SLEEF_M_SQRT3qThe square root of three1.7320508075688772935...
SLEEF_M_INV_SQRT3qThe reciprocal of the square root of three0.5773502691896257645...
SLEEF_M_SQRT1_2qThe reciprocal of the square root of two0.7071067811865475244...
SLEEF_M_INV_SQRTPIqThe reciprocal of the square root of π0.5641895835477562869...
SLEEF_M_EGAMMAqThe Euler-Mascheroni constant0.5772156649015328606...
SLEEF_M_PHIqThe golden ratio constant1.6180339887498948482...
SLEEF_QUAD_MAXThe largest finite QP FP number216383 × (2 - 2-112) = 1.18973... × 104932
SLEEF_QUAD_MINThe smallest positive normal QP FP number2-16382 × (1 - 2-112) = 3.36210... × 10-4932
SLEEF_QUAD_EPSILONThe difference between 1 and the least QP FP number greater than 12-112 = 1.92592... × 10-34
SLEEF_QUAD_DENORM_MINThe smallest positive QP FP number2-16494 = 6.47517... × 10-4966
+
-

Conversion and output functions

-

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. -

+convert ASCII string to QP FP number -

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`. -
+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_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. -

+```c +#include -

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_unregisterPrintfHook` -

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. -

+void Sleef_registerPrintfHook( void ); +void Sleef_unregisterPrintfHook( void ); +``` +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` -
+Convert QP number to double-precision number +```c +#include -

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. -

+### `Sleef_cast_from_doubleq1` +### `Sleef_cast_from_doubleq1_purec` +### `Sleef_cast_from_doubleq1_purecfma` -

Description

+Convert double-precision number to QP number -

- These functions convert a QP FP value to a 64-bit signed integer. -

+```c +#include -
+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`. +These functions convert a double-precision value to a QP FP value. -

Sleef_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. -

+```c +#include -

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_from_int64q1` +### `Sleef_cast_from_int64q1_purec` +### `Sleef_cast_from_int64q1_purecfma` +Convert 64-bit signed integer to QP number -

Sleef_cast_to_uint64q1, Sleef_cast_to_uint64q1_purec, Sleef_cast_to_uint64q1_purecfma - Convert QP number to 64-bit unsigned integer

+```c +#include -

Synopsis

+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. -

+These functions convert a 64-bit signed integer to a QP FP value. -

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 -
+```c +#include +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`. -

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. -

+Convert 64-bit unsigned integer to QP number -

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.

Comparison functions

-

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 +#include + +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`. + +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 + +```c +#include + +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`. + +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 + +```c +#include + +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`. + +These functions return 1 if either argument is NaN, otherwise 0.

Math functions

-

QP 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. -

+```c +#include -

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_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`. -

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. -

+square root functions -

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`. -
+These functions return nonnegative square root of a value in `a`. The error +bound of the returned value is 0.5000000001 ULP. -

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. -

+```c +#include -

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` -

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. -

+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` -
+tangent functions -

Sleef_tanq1_u10, Sleef_tanq1_u10purec, Sleef_tanq1_u10purecfma - tangent functions

+```c +#include -

Synopsis

+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. -

+These functions evaluate the tangent function of a value in `a`. The error +bound of the returned value is 1.0 ULP. -

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 -
+```c +#include -

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. -

+### `Sleef_acosq1_u10` +### `Sleef_acosq1_u10purec` +### `Sleef_acosq1_u10purecfma` -

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 +#include -
+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`. -

Sleef_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. -

+arc tangent functions -

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`. -
+These functions evaluate the arc tangent function of a value in `a`. The error +bound of the returned value is 1.0 ULP. -

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. -

+```c +#include -

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_expq1_u10` +### `Sleef_expq1_u10purec` +### `Sleef_expq1_u10purecfma` -

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. -

+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

+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` -
+base-2 exponential functions -

Sleef_expq1_u10, Sleef_expq1_u10purec, Sleef_expq1_u10purecfma - base-e exponential functions

+```c +#include -

Synopsis

+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. -

+These functions return 2 raised to `a`. The error bound of the returned value +is 1.0 ULP. -

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 -
+```c +#include -

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. -

+### `Sleef_expm1q1_u10` +### `Sleef_expm1q1_u10purec` +### `Sleef_expm1q1_u10purecfma` -

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 +#include -
+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`. -

Sleef_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. -

+natural logarithmic functions -

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`. -
+These functions return the natural logarithm of `a`. The error bound of the +returned value is 1.0 ULP. -

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. -

+```c +#include -

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_log10q1_u10` +### `Sleef_log10q1_u10purec` +### `Sleef_log10q1_u10purecfma` -

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. -

+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

+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` -
+logarithm of one plus argument -

Sleef_log2q1_u10, Sleef_log2q1_u10purec, Sleef_log2q1_u10purecfma - base-2 logarithmic functions

+```c +#include -

Synopsis

+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. -

+These functions return the natural logarithm of `(1 + a)`. The error bound +of the returned value is 1.0 ULP. -

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 -
+```c +#include -

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. -

+### `Sleef_sinhq1_u10` +### `Sleef_sinhq1_u10purec` +### `Sleef_sinhq1_u10purecfma` -

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. -

- -
+```c +#include -

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. -

+### `Sleef_coshq1_u10` +### `Sleef_coshq1_u10purec` +### `Sleef_coshq1_u10purecfma` -

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 +#include -
+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`. -

Sleef_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. -

+hyperbolic tangent functions -

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`. -
+These functions evaluate the hyperbolic tangent function of a value in `a`. The +error bound of the returned value is 1.0 ULP. -

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. -

+```c +#include -

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` -

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. -

+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`. -
+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_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. -

+```c +#include -

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` -

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. -

+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` -
+round to integer towards plus infinity -

Sleef_ceilq1, Sleef_ceilq1_purec, Sleef_ceilq1_purecfma - round to integer towards plus infinity

+```c +#include -

Synopsis

+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. -

+These functions return the smallest integer value not less than `a`. -

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 -
+```c +#include -

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. -

+### `Sleef_rintq1` +### `Sleef_rintq1_purec` +### `Sleef_rintq1_purecfma` -

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 +#include -
+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`. -

Sleef_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. -

+absolute value -

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`. -
+These functions return the absolute value of `a`. -

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. -

+```c +#include -

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_fmaxq1` +### `Sleef_fmaxq1_purec` +### `Sleef_fmaxq1_purecfma` -

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. -

+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`. -

-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. -

+### `Sleef_fminq1` +### `Sleef_fminq1_purec` +### `Sleef_fminq1_purecfma` -

Description

+minimum of two numbers -

-These functions return the smaller value of a -and b. -

+```c +#include -
+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`. -

Sleef_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. -

+positive difference -

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`. -
+These functions return the positive difference between `a` and `b`. The error +bound of these functions are 0.5000000001 ULP. -

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. -

+```c +#include -

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` -

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. -

+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` -

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. -

+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` -
+break a number into integral and fractional parts -

Sleef_modfq1, Sleef_modfq1_purec, Sleef_modfq1_purecfma - break a number into integral and fractional parts

+```c +#include -

Synopsis

+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. -

+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`. -

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 -
+```c +#include -

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. -

+```c +#include -

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. -

+```c +#include -

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` -

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.

Tutorial

-

- 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. -

- -
-#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);
-}
-
+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 + +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. -

- -
-#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.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 + +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

Table of contents

- +* [Data types](#datatypes) +* [Functions for accessing elements inside vector variable](#access) +* [Conversion functions](#conversion) +* [Comparison and selection functions](#comparison) +* [Math functions](#mathfunctions)

Data types

-

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.

Functions for accessing elements inside vector variable

-

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`. -
+These functions load QP FP values from memory and store the results in a vector +variable. -

Set one element in QP FP vector variable

+```c +#include -

Synopsis

+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. -

+These functions store QP FP values in the given variable to memory. -

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`. -
+These functions extract the `index`-th element from a QP FP vector variable. -

Set all elements in QP FP vector to the same value

+```c +#include -

Synopsis

+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. -

+These functions return a QP FP vector in which the `index`-th element is `e`, +and other elements are the same as `v`. -

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`.

Conversion functions

-

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. -

+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 -
+```c +#include -

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. -

+### Convert QP number to 64-bit signed integer -

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`. -
+These functions convert a QP FP value to a 64-bit signed integer. +### Convert 64-bit signed integer to QP number -

Convert QP number to 64-bit signed integer

+```c +#include -

Synopsis

+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. -

+These functions convert a 64-bit signed integer to a QP FP value. -

Description

+### Convert QP number to 64-bit unsigned integer -

- These functions convert a QP FP value to a 64-bit signed integer. -

+```c +#include -
+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`. +These functions convert a QP FP value to a 64-bit signed integer. -

Convert 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.

Comparison and selection functions

-

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. -

- - -

Math functions

- -

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. -

+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); -

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`. -
+These are the vectorized functions of [comparison +functions](../quad#basicComparison). -

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. -

+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](../quad#sleef_icmpq1_purec). -

- These are the vectorized functions - of Sleef_expq1_u10purec. -

+### Check orderedness -
+```c +#include -

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. -

+### Select elements -

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`. -
+These are the vectorized functions that operate in the same way as the ternary +operator. -

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

+

Math 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. -

+```c +#include -

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); -
+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`. -

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. -

+```c +#include -

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). -
+### Sine functions -

Logarithm of one plus argument

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_sinq1_u10purec](../quad#sleef_sinq1_u10purec). -

Description

+### Cosine functions -

- These are the vectorized functions - of Sleef_log1pq1_u10purec. -

+```c +#include -
+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`. -

Power 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. -

+```c +#include -

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). -
+### Arc sine functions -

Hyperbolic sine functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_asinq1_u10purec](../quad#sleef_asinq1_u10purec). -

Description

+### Arc cosine functions -

- These are the vectorized functions - of Sleef_sinhq1_u10purec. -

+```c +#include -
+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`. -

Hyperbolic 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. -

+```c +#include -

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). -
+### Base-e exponential functions -

Hyperbolic tangent functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_expq1_u10purec](../quad#sleef_expq1_u10purec). -

Description

+### Base-2 exponential functions -

- These are the vectorized functions - of Sleef_tanhq1_u10purec. -

+```c +#include -
+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`. -

Inverse 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. -

+```c +#include -

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). -
+### Base-e exponential functions minus 1 -

Inverse hyperbolic cosine functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_expm1q1_u10purec](../quad#sleef_expm1q1_u10purec). -

Description

+### Natural logarithmic functions -

- These are the vectorized functions - of Sleef_acoshq1_u10purec. -

+```c +#include -
+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`. -

Inverse 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. -

+```c +#include -

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). -
+### Base-10 logarithmic functions -

Round to integer towards zero

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_log10q1_u10purec](../quad#sleef_log10q1_u10purec). -

Description

+### Logarithm of one plus argument -

- These are the vectorized functions - of Sleef_truncq1_purec. -

+```c +#include -
+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`. -

Round 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. -

+```c +#include -

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). -
+### Hyperbolic sine functions -

Round to integer towards plus infinity

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_sinhq1_u10purec](../quad#sleef_sinhq1_u10purec). -

Description

+### Hyperbolic cosine functions -

- These are the vectorized functions - of Sleef_ceilq1_purec. -

+```c +#include -
+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`. -

Round 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. -

+```c +#include -

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). -
+### Inverse hyperbolic sine functions -

Round to integer, ties round to even

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_asinhq1_u10purec](../quad#sleef_asinhq1_u10purec). -

Description

+### Inverse hyperbolic cosine functions -

- These are the vectorized functions - of Sleef_rintq1_purec. -

+```c +#include -
+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`. -

Absolute 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. -

+```c +#include -

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). -
+### Round to integer towards zero -

Copy sign of a number

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_truncq1_purec](../quad#sleef_truncq1_purec). -

Description

+### Round to integer towards minus infinity -

- These are the vectorized functions - of Sleef_copysignq1_purec. -

+```c +#include -
+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`. -

Maximum 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. -

+```c +#include -

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). -
+### Round to integer away from zero -

Minimum of two numbers

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_roundq1_purec](../quad#sleef_roundq1_purec). -

Description

+### Round to integer, ties round to even -

- These are the vectorized functions - of Sleef_fminq1_purec. -

+```c +#include -
+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`. -

Positive 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. -

+```c +#include -

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). -
+### Copy sign of a number -

Floating point remainder

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_copysignq1_purec](../quad#sleef_copysignq1_purec). -

Description

+### Maximum of two numbers -

- These are the vectorized functions - of Sleef_fmodq1_purec. -

+```c +#include -
+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`. -

Floating 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. -

+```c +#include -

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). -
+### Positive difference -

Split a number to fractional and integral components

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_fdimq1_u05purec](../quad#sleef_fdimq1_u05purec). -

Description

+### Floating point remainder -

- These are the vectorized functions - of Sleef_frexpq1_purec. -

+```c +#include -
+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`. -

Break 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. -

+```c +#include -

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). -
+### Split a number to fractional and integral components -

2D Euclidian distance

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_frexpq1_purec](../quad#sleef_frexpq1_purec). -

Description

+### Break a number into integral and fractional parts -

- These are the vectorized functions - of Sleef_hypotq1_u05purec. -

+```c +#include -
+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`. -

Fused 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. -

+```c +#include -

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). -
+### Fused multiply and accumulate -

Multiply by integral power of 2

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_fmaq1_u05purec](../quad#sleef_fmaq1_u05purec). -

Description

+### Multiply by integral power of 2 -

- These are the vectorized functions - of Sleef_ldexpq1_purec. -

+```c +#include -
+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`. -

Integer 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. -

+```c +#include -

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

Table of contents

- +* [Tutorial](#tutorial) +* [Conversion functions](#conversion) +* [Comparison and selection functions](#comparison) +* [Math functions](#mathfunctions)

Tutorial

-

- 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 -

- - -

Conversion 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. -

- -
- +Below is a [test code](../../src/hellocudaquad.cu) 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. -

Convert QP number to 64-bit unsigned integer

+```c -

Synopsis

+#include +#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. -

- - -

Comparison and selection functions

- -

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/ -
+__global__ void pow_gpu(int n, Sleef_quadx1 *r, Sleef_quadx1 *x, Sleef_quadx1 *y) { + int index = threadIdx.x, stride = blockDim.x; -

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 );
-

+ Sleef_quadx1 *rd, *xd, *yd; + cudaMallocManaged(&rd, N*sizeof(Sleef_quadx1)); + cudaMallocManaged(&xd, N*sizeof(Sleef_quadx1)); + cudaMallocManaged(&yd, N*sizeof(Sleef_quadx1)); -

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); -
+ cudaDeviceSynchronize(); -

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. -

- - -

Math functions

- -

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

-
+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](../../src/hellocudaquad2.cu). +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. -

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 );
-

+#include +#include +#include +#include +#include +#include +#include -

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/ -
+__global__ void pow_gpu(int n, Sleef_quadx1 *r, Sleef_quadx1 *x, Sleef_quadx1 *y) { + int index = threadIdx.x, stride = blockDim.x; -

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 );
-

+ Sleef_quadx1 *rd, *xd, *yd; + cudaMallocManaged(&rd, N*sizeof(Sleef_quadx1)); + cudaMallocManaged(&xd, N*sizeof(Sleef_quadx1)); + cudaMallocManaged(&yd, N*sizeof(Sleef_quadx1)); -

Description

+ Sleef_quad *r = (Sleef_quad *)rd, *x = (Sleef_quad *)xd, *y = (Sleef_quad *)yd; -

- These are the vectorized functions - of Sleef_cosq1_u10purec. -

+ // -
+ 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); + } -

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 );
-

+ Sleef_quadx2 maxError = Sleef_splatq2_sse2(Sleef_strtoq("0.0", NULL)); -

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); + } -
+ Sleef_printf("Max error: %Qg\n", + Sleef_fmaxq1_purec(Sleef_getq2_sse2(maxError, 0), Sleef_getq2_sse2(maxError, 1))); -

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

+

Conversion functions

-

- These are the vectorized functions - of Sleef_asinq1_u10purec. -

+### Convert QP number to double-precision number -
+```c +#include -

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 );
-

+### Convert double-precision number to QP number -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_acosq1_u10purec. -

+__device__ Sleef_quadx1 Sleef_cast_from_doubleq1_cuda( double a ); +``` -
+These functions convert a double-precision value to a QP FP value. -

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 );
-

+__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. -

- These are the vectorized functions - of Sleef_atanq1_u10purec. -

+### Convert 64-bit signed integer to QP number -
+```c +#include -

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 );
-

+### Convert QP number to 64-bit unsigned integer -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_expq1_u10purec. -

+__device__ uint64_t Sleef_cast_to_uint64q1_cuda( Sleef_quadx1 a ); +``` -
+These functions convert a QP FP value to a 64-bit signed integer. -

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 );
-

+__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. -

- These are the vectorized functions - of Sleef_exp2q1_u10purec. -

+

Comparison and selection functions

-
+### QP comparison functions -

Base-10 exponentail

+```c +#include -

Synopsis

+__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 );
-

+These are the vectorized functions of [comparison +functions](../quad#basicComparison). -

Description

+### QP comparison functions of the second kind -

- These are the vectorized functions - of Sleef_exp10q1_u10purec. -

+```c +#include -
+__device__ int32_t Sleef_icmpq1_cuda( Sleef_quadx1 a, Sleef_quadx1 b ); +``` -

Base-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 );
-

+```c +#include -

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). -
+### Select elements -

Natural logarithmic functions

+```c +#include -

Synopsis

+__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 );
-

+These are the vectorized functions that operate in the same way as the ternary operator. -

Description

+

Math functions

-

- These are the vectorized functions - of Sleef_logq1_u10purec. -

+### QP functions for basic arithmetic operations -
+```c +#include -

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 );
-

+### Square root functions -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_log2q1_u10purec. -

+__device__ Sleef_quadx1 Sleef_sqrtq1_u05cuda( Sleef_quadx1 a ); +``` -
+These are the vectorized functions +of [Sleef_sqrtq1_u05purec](../quad#sleef_sqrtq1_u05purec). -

Base-10 logarithmic functions

+### Sine functions -

Synopsis

+```c +#include -

-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_log10q1_u10cuda( Sleef_quadx1 a );
-

+__device__ Sleef_quadx1 Sleef_sinq1_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 -
+```c +#include -

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 );
-

+### Tangent functions -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_log1pq1_u10purec. -

+__device__ Sleef_quadx1 Sleef_tanq1_u10cuda( Sleef_quadx1 a ); +``` -
+These are the vectorized functions +of [Sleef_tanq1_u10purec](../quad#sleef_tanq1_u10purec). -

Power functions

+### Arc sine functions -

Synopsis

+```c +#include -

-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_powq1_u10cuda( Sleef_quadx1 x, Sleef_quadx1 y );
-
-

+__device__ Sleef_quadx1 Sleef_asinq1_u10cuda( Sleef_quadx1 a ); +``` -

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 -
+```c +#include -

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 );
-
-

+### Arc tangent functions -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_sinhq1_u10purec. -

+__device__ Sleef_quadx1 Sleef_atanq1_u10cuda( Sleef_quadx1 a ); +``` -
+These are the vectorized functions +of [Sleef_atanq1_u10purec](../quad#sleef_atanq1_u10purec). -

Hyperbolic cosine functions

+### Base-e exponential functions -

Synopsis

+```c +#include -

-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_coshq1_u10cuda( Sleef_quadx1 a );
-
-

+__device__ Sleef_quadx1 Sleef_expq1_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 -
+```c +#include -

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 );
-
-

+### Base-10 exponentail -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_tanhq1_u10purec. -

+__device__ Sleef_quadx1 Sleef_exp10q1_u10cuda( Sleef_quadx1 a ); +``` -
+These are the vectorized functions +of [Sleef_exp10q1_u10purec](../quad#sleef_exp10q1_u10purec). -

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 );
-
-

+__device__ Sleef_quadx1 Sleef_expm1q1_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 -
+```c +#include -

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 );
-
-

+### Base-2 logarithmic functions -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_acoshq1_u10purec. -

+__device__ Sleef_quadx1 Sleef_log2q1_u10cuda( Sleef_quadx1 a ); +``` -
+These are the vectorized functions +of [Sleef_log2q1_u10purec](../quad#sleef_log2q1_u10purec). -

Inverse hyperbolic tangent functions

+### Base-10 logarithmic functions -

Synopsis

+```c +#include -

-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_atanhq1_u10cuda( Sleef_quadx1 a );
-
-

+__device__ Sleef_quadx1 Sleef_log10q1_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 -
+```c +#include -

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 );
-
-

+### Power functions -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_truncq1_purec. -

+__device__ Sleef_quadx1 Sleef_powq1_u10cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -
+These are the vectorized functions +of [Sleef_powq1_u10purec](../quad#sleef_powq1_u10purec). -

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 );
-
-

+__device__ Sleef_quadx1 Sleef_sinhq1_u10cuda( 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 -
+```c +#include -

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 );
-
-

+### Hyperbolic tangent functions -

Description

+```c +#include -

- These are the vectorized functions - of Sleef_ceilq1_purec. -

+__device__ Sleef_quadx1 Sleef_tanhq1_u10cuda( Sleef_quadx1 a ); +``` -
+These are the vectorized functions +of [Sleef_tanhq1_u10purec](../quad#sleef_tanhq1_u10purec). -

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 );
-
-

+__device__ Sleef_quadx1 Sleef_asinhq1_u10cuda( 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. -

- -
+### Inverse hyperbolic cosine functions -

Round to integer, ties round to even

+```c +#include -

Synopsis

+__device__ Sleef_quadx1 Sleef_acoshq1_u10cuda( Sleef_quadx1 a ); +``` -

-#include <sleefquadinline_cuda.h>
-
-__device__ Sleef_quadx1 Sleef_rintq1_cuda( Sleef_quadx1 a );
-
-

+These are the vectorized functions +of [Sleef_acoshq1_u10purec](../quad#sleef_acoshq1_u10purec). -

Description

+### Inverse hyperbolic tangent functions -

- These are the vectorized functions - of Sleef_rintq1_purec. -

+```c +#include -
+__device__ Sleef_quadx1 Sleef_atanhq1_u10cuda( Sleef_quadx1 a ); +``` -

Absolute 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 );
-
-

+```c +#include -

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 );
-
-

+These are the vectorized functions +of [Sleef_truncq1_purec](../quad#sleef_truncq1_purec). -

Description

+### Round to integer towards minus infinity -

- These are the vectorized functions - of Sleef_copysignq1_purec. -

+```c +#include -
+__device__ Sleef_quadx1 Sleef_floorq1_cuda( Sleef_quadx1 a ); +``` -

Maximum 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 );
-
-

+```c +#include -

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). -
+### Round to integer away from zero -

Minimum of two numbers

+```c +#include -

Synopsis

+__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 );
-
-

+These are the vectorized functions +of [Sleef_roundq1_purec](../quad#sleef_roundq1_purec). -

Description

+### Round to integer, ties round to even -

- These are the vectorized functions - of Sleef_fminq1_purec. -

+```c +#include -
+__device__ Sleef_quadx1 Sleef_rintq1_cuda( Sleef_quadx1 a ); +``` -

Positive 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 );
-
-

+```c +#include -

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). -
+### Copy sign of a number -

Floating point remainder

+```c +#include -

Synopsis

+__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 );
-
-

+These are the vectorized functions +of [Sleef_copysignq1_purec](../quad#sleef_copysignq1_purec). -

Description

+### Maximum of two numbers -

- These are the vectorized functions - of Sleef_fmodq1_purec. -

+```c +#include -
+__device__ Sleef_quadx1 Sleef_fmaxq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -

Floating 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 );
-
-

+```c +#include -

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). -
+### Positive difference -

Split a number to fractional and integral components

+```c +#include -

Synopsis

+__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 );
-
-

+These are the vectorized functions +of [Sleef_fdimq1_u05purec](../quad#sleef_fdimq1_u05purec). -

Description

+### Floating point remainder -

- These are the vectorized functions - of Sleef_frexpq1_purec. -

+```c +#include -
+__device__ Sleef_quadx1 Sleef_fmodq1_cuda( Sleef_quadx1 x, Sleef_quadx1 y ); +``` -

Break 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 );
-
-

+```c +#include -

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). -
+### Split a number to fractional and integral components -

2D Euclidian distance

+```c +#include -

Synopsis

+__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 );
-
-

+These are the vectorized functions +of [Sleef_frexpq1_purec](../quad#sleef_frexpq1_purec). -

Description

+### Break a number into integral and fractional parts -

- These are the vectorized functions - of Sleef_hypotq1_u05purec. -

+```c +#include -
+__device__ Sleef_quadx1 Sleef_modfq1_cuda( Sleef_quadx1 x, Sleef_quadx1 * ptr ); +``` -

Fused 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 );
-
-

+```c +#include -

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). -
+### Fused multiply and accumulate -

Multiply by integral power of 2

+```c +#include -

Synopsis

+__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 );
-
-

+These are the vectorized functions +of [Sleef_fmaq1_u05purec](../quad#sleef_fmaq1_u05purec). -

Description

+### Multiply by integral power of 2 -

- These are the vectorized functions - of Sleef_ldexpq1_purec. -

+```c +#include -
+__device__ Sleef_quadx1 Sleef_ldexpq1_cuda( Sleef_quadx1 x, int32_t e ); +``` -

Integer 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 );
-
-

+```c +#include -

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/ppc64

Table of contents

- +* [Data types](#datatypes) +* [Functions for accessing elements inside vector variable](#access) +* [Conversion functions](#conversion) +* [Comparison and selection functions](#comparison) +* [Math functions](#mathfunctions)

Data types

-

Sleef_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.

Functions for accessing elements inside vector variable

-

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. -

+```c +#include -

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. -
+```c +#include -

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. -

+```c +#include -

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. -
+```c +#include -

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. -

+```c +#include -

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`.

Conversion functions

-

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. -

+### Convert QP number to double-precision number -

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`. -
+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 -

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. -

+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 -
+```c +#include +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`. -

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. -

+```c +#include -

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 QP number to 64-bit unsigned integer +```c +#include -

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. -

+### Convert 64-bit unsigned integer to QP number -

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.

Comparison and selection functions

-

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. -

- -

Math functions

- -

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. -

+```c +#include -

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); -
+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`. -

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. -

+```c +#include -

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). -
+### Check orderedness -

Arc cosine functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_iunordq1_purec](../quad#sleef_iunordq1_purec). -

Description

+### Select elements -

- These are the vectorized functions - of Sleef_acosq1_u10purec. -

+```c +#include -
+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`. -

Arc 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

+

Math 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. -

+```c +#include -

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); -
+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`. -

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. -

+```c +#include -

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). -
+### Sine functions -

Logarithm of one plus argument

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_sinq1_u10purec](../quad#sleef_sinq1_u10purec). -

Description

+### Cosine functions -

- These are the vectorized functions - of Sleef_log1pq1_u10purec. -

+```c +#include -
+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`. -

Power 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. -

+```c +#include -

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). -
+### Arc sine functions -

Hyperbolic sine functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_asinq1_u10purec](../quad#sleef_asinq1_u10purec). -

Description

+### Arc cosine functions -

- These are the vectorized functions - of Sleef_sinhq1_u10purec. -

+```c +#include -
+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`. -

Hyperbolic 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. -

+```c +#include -

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). -
+### Base-e exponential functions -

Hyperbolic tangent functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_expq1_u10purec](../quad#sleef_expq1_u10purec). -

Description

+### Base-2 exponential functions -

- These are the vectorized functions - of Sleef_tanhq1_u10purec. -

+```c +#include -
+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`. -

Inverse 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. -

+```c +#include -

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). -
+### Base-e exponential functions minus 1 -

Inverse hyperbolic cosine functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_expm1q1_u10purec](../quad#sleef_expm1q1_u10purec). -

Description

+### Natural logarithmic functions -

- These are the vectorized functions - of Sleef_acoshq1_u10purec. -

+```c +#include -
+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`. -

Inverse 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. -

+```c +#include -

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). -
+### Base-10 logarithmic functions -

Round to integer towards zero

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_log10q1_u10purec](../quad#sleef_log10q1_u10purec). -

Description

+### Logarithm of one plus argument -

- These are the vectorized functions - of Sleef_truncq1_purec. -

+```c +#include -
+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`. -

Round 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. -

+```c +#include -

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). -
+### Hyperbolic sine functions -

Round to integer towards plus infinity

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_sinhq1_u10purec](../quad#sleef_sinhq1_u10purec). -

Description

+### Hyperbolic cosine functions -

- These are the vectorized functions - of Sleef_ceilq1_purec. -

+```c +#include -
+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`. -

Round 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. -

+```c +#include -

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). -
+### Inverse hyperbolic sine functions -

Round to integer, ties round to even

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_asinhq1_u10purec](../quad#sleef_asinhq1_u10purec). -

Description

+### Inverse hyperbolic cosine functions -

- These are the vectorized functions - of Sleef_rintq1_purec. -

+```c +#include -
+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`. -

Absolute 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. -

+```c +#include -

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). -
+### Round to integer towards zero -

Copy sign of a number

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_truncq1_purec](../quad#sleef_truncq1_purec). -

Description

+### Round to integer towards minus infinity -

- These are the vectorized functions - of Sleef_copysignq1_purec. -

+```c +#include -
+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`. -

Maximum 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. -

+```c +#include -

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). -
+### Round to integer away from zero -

Minimum of two numbers

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_roundq1_purec](../quad#sleef_roundq1_purec). -

Description

+### Round to integer, ties round to even -

- These are the vectorized functions - of Sleef_fminq1_purec. -

+```c +#include -
+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`. -

Positive 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. -

+```c +#include -

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). -
+### Copy sign of a number -

Floating point remainder

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_copysignq1_purec](../quad#sleef_copysignq1_purec). -

Description

+### Maximum of two numbers -

- These are the vectorized functions - of Sleef_fmodq1_purec. -

+```c +#include -
+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`. -

Floating 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. -

+```c +#include -

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). -
+### Positive difference -

Split a number to fractional and integral components

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_fdimq1_u05purec](../quad#sleef_fdimq1_u05purec). -

Description

+### Floating point remainder -

- These are the vectorized functions - of Sleef_frexpq1_purec. -

+```c +#include -
+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`. -

Break 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. -

+```c +#include -

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). -
+### Split a number to fractional and integral components -

2D Euclidian distance

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_frexpq1_purec](../quad#sleef_frexpq1_purec). -

Description

+### Break a number into integral and fractional parts -

- These are the vectorized functions - of Sleef_hypotq1_u05purec. -

+```c +#include -
+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`. -

Fused 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. -

+```c +#include -

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). -
+### Fused multiply and accumulate -

Multiply by integral power of 2

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_fmaq1_u05purec](../quad#sleef_fmaq1_u05purec). -

Description

+### Multiply by integral power of 2 -

- These are the vectorized functions - of Sleef_ldexpq1_purec. -

+```c +#include -
+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`. -

Integer 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. -

+```c +#include -

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/s390x

Table of contents

- +* [Data types](#datatypes) +* [Functions for accessing elements inside vector variable](#access) +* [Conversion functions](#conversion) +* [Comparison and selection functions](#comparison) +* [Math functions](#mathfunctions)

Data types

-

Sleef_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.

Functions for accessing elements inside vector variable

-

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. -

+```c +#include -

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. -
+```c +#include -

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. -

+```c +#include -

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. -
+```c +#include -

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. -

+```c +#include -

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`.

Conversion functions

-

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. -

+### Convert QP number to double-precision number -

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`. -
+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 -

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. -

+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 -
+```c +#include +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`. -

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. -

+```c +#include -

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 QP number to 64-bit unsigned integer +```c +#include -

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. -

+### Convert 64-bit unsigned integer to QP number -

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.

Comparison and selection functions

-

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. -

- -

Math functions

- -

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. -

+```c +#include -

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); -
+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`. -

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. -

+```c +#include -

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). -
+### Check orderedness -

Arc cosine functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_iunordq1_purec](../quad#sleef_iunordq1_purec). -

Description

+### Select elements -

- These are the vectorized functions - of Sleef_acosq1_u10purec. -

+```c +#include -
+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`. -

Arc 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

+

Math 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. -

+```c +#include -

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); -
+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`. -

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. -

+```c +#include -

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). -
+### Sine functions -

Logarithm of one plus argument

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_sinq1_u10purec](../quad#sleef_sinq1_u10purec). -

Description

+### Cosine functions -

- These are the vectorized functions - of Sleef_log1pq1_u10purec. -

+```c +#include -
+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`. -

Power 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. -

+```c +#include -

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). -
+### Arc sine functions -

Hyperbolic sine functions

+```c +#include -

Synopsis

+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. -

+These are the vectorized functions +of [Sleef_asinq1_u10purec](../quad#sleef_asinq1_u10purec). -

Description

+### Arc cosine functions -

- These are the vectorized functions - of Sleef_sinhq1_u10purec. -

+```c +#include -
+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`. -

Hyperbolic 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. -

+```c +#include -

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`. -

- These are the vectorized functions - of Sleef_coshq1_u10purec. -

+These are the vectorized functions +of [Sleef_atanq1_u10purec](../quad#sleef_atanq1_u10purec). -
+### Base-e exponential functions -

Hyperbolic tangent functions

+```c +#include -

Synopsis

+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`. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_tanhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanhq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanhq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_expq1_u10purec](../quad#sleef_expq1_u10purec). -

Description

+### Base-2 exponential functions -

- These are the vectorized functions - of Sleef_tanhq1_u10purec. -

+```c +#include -
+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`. -

Inverse 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_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinhq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+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`. -

- These are the vectorized functions - of Sleef_asinhq1_u10purec. -

+These are the vectorized functions +of [Sleef_exp10q1_u10purec](../quad#sleef_exp10q1_u10purec). -
+### Base-e exponential functions minus 1 -

Inverse hyperbolic cosine functions

+```c +#include -

Synopsis

+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`. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_acoshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acoshq2_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acoshq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_expm1q1_u10purec](../quad#sleef_expm1q1_u10purec). -

Description

+### Natural logarithmic functions -

- These are the vectorized functions - of Sleef_acoshq1_u10purec. -

+```c +#include -
+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`. -

Inverse 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_u10vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanhq2_u10vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+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`. -

- These are the vectorized functions - of Sleef_atanhq1_u10purec. -

+These are the vectorized functions +of [Sleef_log2q1_u10purec](../quad#sleef_log2q1_u10purec). -
+### Base-10 logarithmic functions -

Round to integer towards zero

+```c +#include -

Synopsis

+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`. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_truncq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_truncq2_vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_truncq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_log10q1_u10purec](../quad#sleef_log10q1_u10purec). -

Description

+### Logarithm of one plus argument -

- These are the vectorized functions - of Sleef_truncq1_purec. -

+```c +#include -
+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`. -

Round 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_vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_floorq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+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`. -

- These are the vectorized functions - of Sleef_floorq1_purec. -

+These are the vectorized functions +of [Sleef_powq1_u10purec](../quad#sleef_powq1_u10purec). -
+### Hyperbolic sine functions -

Round to integer towards plus infinity

+```c +#include -

Synopsis

+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`. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_ceilq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_ceilq2_vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_ceilq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_sinhq1_u10purec](../quad#sleef_sinhq1_u10purec). -

Description

+### Hyperbolic cosine functions -

- These are the vectorized functions - of Sleef_ceilq1_purec. -

+```c +#include -
+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`. -

Round 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_vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_roundq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_tanhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanhq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanhq2_u10vxe2(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). -
+### Inverse hyperbolic sine functions -

Round to integer, ties round to even

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_asinhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinhq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinhq2_u10vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_rintq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_rintq2_vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_rintq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_asinhq1_u10purec](../quad#sleef_asinhq1_u10purec). -

Description

+### Inverse hyperbolic cosine functions -

- These are the vectorized functions - of Sleef_rintq1_purec. -

+```c +#include -
+Sleef_quadx2 Sleef_acoshq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_acoshq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_acoshq2_u10vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -

Absolute 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_vxe( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_fabsq2_vxe2( Sleef_quadx2 a );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_atanhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanhq2_u10vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanhq2_u10vxe2(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). -
+### Round to integer towards zero -

Copy sign of a number

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_truncq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_truncq2_vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_truncq2_vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_copysignq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_copysignq2_vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_copysignq2_vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_truncq1_purec](../quad#sleef_truncq1_purec). -

Description

+### Round to integer towards minus infinity -

- These are the vectorized functions - of Sleef_copysignq1_purec. -

+```c +#include -
+Sleef_quadx2 Sleef_floorq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_floorq2_vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_floorq2_vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -

Maximum 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_vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmaxq2_vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_ceilq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_ceilq2_vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_ceilq2_vxe2(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). -
+### Round to integer away from zero -

Minimum of two numbers

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_roundq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_roundq2_vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_roundq2_vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fminq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fminq2_vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fminq2_vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_roundq1_purec](../quad#sleef_roundq1_purec). -

Description

+### Round to integer, ties round to even -

- These are the vectorized functions - of Sleef_fminq1_purec. -

+```c +#include -
+Sleef_quadx2 Sleef_rintq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_rintq2_vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_rintq2_vxe2(Sleef_quadx2 a); +``` +Link with `-lsleefquad`. -

Positive 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_u05vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fdimq2_u05vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_fabsq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_fabsq2_vxe(Sleef_quadx2 a); +Sleef_quadx2 Sleef_fabsq2_vxe2(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). -
+### Copy sign of a number -

Floating point remainder

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_copysignq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_copysignq2_vxe(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_copysignq2_vxe2(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_vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmodq2_vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_copysignq1_purec](../quad#sleef_copysignq1_purec). -

Description

+### Maximum of two numbers -

- These are the vectorized functions - of Sleef_fmodq1_purec. -

+```c +#include -
+Sleef_quadx2 Sleef_fmaxq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmaxq2_vxe(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmaxq2_vxe2(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -

Floating 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_vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_remainderq2_vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_fminq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fminq2_vxe(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fminq2_vxe2(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). -
+### Positive difference -

Split a number to fractional and integral components

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_fdimq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fdimq2_u05vxe(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fdimq2_u05vxe2(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_vxe( Sleef_quadx2 x, vector int * ptr );
-Sleef_quadx2 Sleef_frexpq2_vxe2( Sleef_quadx2 x, vector int * ptr );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_fdimq1_u05purec](../quad#sleef_fdimq1_u05purec). -

Description

+### Floating point remainder -

- These are the vectorized functions - of Sleef_frexpq1_purec. -

+```c +#include -
+Sleef_quadx2 Sleef_fmodq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmodq2_vxe(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmodq2_vxe2(Sleef_quadx2 x, Sleef_quadx2 y); +``` +Link with `-lsleefquad`. -

Break 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_vxe( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_quadx2 Sleef_modfq2_vxe2( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_remainderq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_remainderq2_vxe(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_remainderq2_vxe2(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). -
+### Split a number to fractional and integral components -

2D Euclidian distance

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_frexpq2(Sleef_quadx2 x, vector int * ptr); +Sleef_quadx2 Sleef_frexpq2_vxe(Sleef_quadx2 x, vector int * ptr); +Sleef_quadx2 Sleef_frexpq2_vxe2(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_u05vxe( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_hypotq2_u05vxe2( Sleef_quadx2 x, Sleef_quadx2 y );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_frexpq1_purec](../quad#sleef_frexpq1_purec). -

Description

+### Break a number into integral and fractional parts -

- These are the vectorized functions - of Sleef_hypotq1_u05purec. -

+```c +#include -
+Sleef_quadx2 Sleef_modfq2(Sleef_quadx2 x, Sleef_quadx2 * ptr); +Sleef_quadx2 Sleef_modfq2_vxe(Sleef_quadx2 x, Sleef_quadx2 * ptr); +Sleef_quadx2 Sleef_modfq2_vxe2(Sleef_quadx2 x, Sleef_quadx2 * ptr); +``` +Link with `-lsleefquad`. -

Fused 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_u05vxe( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_quadx2 Sleef_fmaq2_u05vxe2( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_hypotq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_hypotq2_u05vxe(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_hypotq2_u05vxe2(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). -
+### Fused multiply and accumulate -

Multiply by integral power of 2

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_fmaq2_u05(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx2 Sleef_fmaq2_u05vxe(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx2 Sleef_fmaq2_u05vxe2(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_vxe( Sleef_quadx2 x, vector int e );
-Sleef_quadx2 Sleef_ldexpq2_vxe2( Sleef_quadx2 x, vector int e );
-
-Link with -lsleefquad. -

+These are the vectorized functions +of [Sleef_fmaq1_u05purec](../quad#sleef_fmaq1_u05purec). -

Description

+### Multiply by integral power of 2 -

- These are the vectorized functions - of Sleef_ldexpq1_purec. -

+```c +#include -
+Sleef_quadx2 Sleef_ldexpq2(Sleef_quadx2 x, vector int e); +Sleef_quadx2 Sleef_ldexpq2_vxe(Sleef_quadx2 x, vector int e); +Sleef_quadx2 Sleef_ldexpq2_vxe2(Sleef_quadx2 x, vector int e); +``` +Link with `-lsleefquad`. -

Integer 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_vxe( Sleef_quadx2 x );
-vector int Sleef_ilogbq2_vxe2( Sleef_quadx2 x );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+vector int Sleef_ilogbq2(Sleef_quadx2 x); +vector int Sleef_ilogbq2_vxe(Sleef_quadx2 x); +vector int Sleef_ilogbq2_vxe2(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/x86.md b/docs/2-references/quad/x86.md index b4088308..b5eddd37 100644 --- a/docs/2-references/quad/x86.md +++ b/docs/2-references/quad/x86.md @@ -10,1542 +10,992 @@ permalink: /2-references/quad/x86

Table of contents

- +* [Data types](#datatypes) +* [Functions for accessing elements inside vector variable](#access) +* [Conversion functions](#conversion) +* [Comparison and selection functions](#comparison) +* [Math functions](#mathfunctions)

Data types

-

- Two vector registers are combined to retain a vector of QP FP - numbers. One of these registers holds the upper part of QP numbers, - and the other register holds the lower part. You have to use the - dedicated functions to access each element in a vector variable. -

+Two vector registers are combined to retain a vector of QP FP numbers. One of +these registers holds the upper part of QP numbers, and the other register +holds the lower part. You have to use the dedicated functions to access each +element in a vector variable. -
+### Sleef_quadx2 -

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. -

Description

+### Sleef_quadx4 -

- 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_quadx4` is a data type for retaining four QP FP numbers. Please use +[`Sleef_loadq4_avx2`](#load), [`Sleef_storeq4_avx2`](#store), +[`Sleef_getq4_avx2`](#get) and [`Sleef_setq4_avx2`](#set) functions to access +the data inside variables in this data type. -
+### Sleef_quadx8 -

Sleef_quadx4

+`Sleef_quadx8` is a data type for retaining eight QP FP numbers. Please use +[`Sleef_loadq8_avx512f`](#load), [`Sleef_storeq8_avx512f`](#store), +[`Sleef_getq8_avx512f`](#get) and [`Sleef_setq8_avx512f`](#set) functions to +access the data inside variables in this data type. -

Description

+

Functions for accessing elements inside vector variable

-

- Sleef_quadx4 is a data type for retaining four QP - FP numbers. Please - use Sleef_loadq4_avx2, Sleef_storeq4_avx2, Sleef_getq4_avx2 - and Sleef_setq4_avx2 functions to access the - data inside variables in this data type. -

+```c +#include + +Sleef_quadx2 Sleef_loadq2(Sleef_quad * ptr); +Sleef_quadx2 Sleef_loadq2_sse2(Sleef_quad * ptr); +Sleef_quadx2 Sleef_loadq2_avx2128(Sleef_quad * ptr); +Sleef_quadx4 Sleef_loadq4_avx2(Sleef_quad * ptr); +Sleef_quadx8 Sleef_loadq8_avx512f(Sleef_quad * ptr); +``` +Link with `-lsleefquad`. + +These functions load QP FP values from memory and store the results +in a vector variable. + +```c +#include + +void Sleef_storeq2(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq2_sse2(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq2_avx2128(Sleef_quad * ptr, Sleef_quadx2 v); +void Sleef_storeq4_avx2(Sleef_quad * ptr, Sleef_quadx4 v); +void Sleef_storeq8_avx512f(Sleef_quad * ptr, Sleef_quadx8 v); +``` +Link with `-lsleefquad`. + +These functions store QP FP values in the given variable to memory. + +```c +#include + +Sleef_quad Sleef_getq2(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq2_sse2(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq2_avx2128(Sleef_quadx2 v, int index); +Sleef_quad Sleef_getq4_avx2(Sleef_quadx4 v, int index); +Sleef_quad Sleef_getq8_avx512f(Sleef_quadx8 v, int index); +``` +Link with `-lsleefquad`. + +These functions extract the `index`-th element from +a QP FP vector variable. + +```c +#include + +Sleef_quadx2 Sleef_setq2(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx2 Sleef_setq2_sse2(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx2 Sleef_setq2_avx2128(Sleef_quadx2 v, int index, Sleef_quad e); +Sleef_quadx4 Sleef_setq4_avx2(Sleef_quadx4 v, int index, Sleef_quad e); +Sleef_quadx8 Sleef_setq8_avx512f(Sleef_quadx8 v, int index, Sleef_quad e); +``` +Link with `-lsleefquad`. + +These functions return a QP FP vector in which the `index`-th element is `e`, +and other elements are the same as `v`. + +```c +#include + +Sleef_quadx2 Sleef_splatq2(Sleef_quad e); +Sleef_quadx2 Sleef_splatq2_sse2(Sleef_quad e); +Sleef_quadx2 Sleef_splatq2_avx2128(Sleef_quad e); +Sleef_quadx4 Sleef_splatq4_avx2(Sleef_quad e); +Sleef_quadx8 Sleef_splatq8_avx512f(Sleef_quad e); +``` +Link with `-lsleefquad`. + +These functions return a QP FP vector in which all elements are set to `e`. -
+

Conversion functions

-

Sleef_quadx8

+### Convert QP number to double-precision number -

Description

+```c +#include -

- Sleef_quadx8 is a data type for retaining eight QP - FP numbers. Please - use Sleef_loadq8_avx512f, Sleef_storeq8_avx512f, Sleef_getq8_avx512f - and Sleef_setq8_avx512f functions to access the - data inside variables in this data type. -

+__m128d Sleef_cast_to_doubleq2(Sleef_quadx2 a); +__m128d Sleef_cast_to_doubleq2_sse2(Sleef_quadx2 a); +__m128d Sleef_cast_to_doubleq2_avx2128(Sleef_quadx2 a); +__m256d Sleef_cast_to_doubleq4_avx2(Sleef_quadx4 a); +__m512d Sleef_cast_to_doubleq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. +These functions convert a QP FP value to a double-precision value. +### Convert double-precision number to QP number -

Functions for accessing elements inside vector variable

+```c +#include -

Load QP FP values into vector variable

+Sleef_quadx2 Sleef_cast_from_doubleq2(__m128d a); +Sleef_quadx2 Sleef_cast_from_doubleq2_sse2(__m128d a); +Sleef_quadx2 Sleef_cast_from_doubleq2_avx2128(__m128d a); +Sleef_quadx4 Sleef_cast_from_doubleq4_avx2(__m256d a); +Sleef_quadx8 Sleef_cast_from_doubleq8_avx512f(__m512d a); +``` +Link with `-lsleefquad`. -

Synopsis

+These functions convert a double-precision value to a QP FP value. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_loadq2( Sleef_quad * ptr );
-Sleef_quadx2 Sleef_loadq2_sse2( Sleef_quad * ptr );
-Sleef_quadx2 Sleef_loadq2_avx2128( Sleef_quad * ptr );
-Sleef_quadx4 Sleef_loadq4_avx2( Sleef_quad * ptr );
-Sleef_quadx8 Sleef_loadq8_avx512f( Sleef_quad * ptr );
-
-Link with -lsleefquad. -

- -

Description

+### Convert QP number to 64-bit signed integer -

- These functions load QP FP values from memory and store the results - in a vector variable. -

- -
+```c +#include -

Store QP FP values in a vector variable to memory

+__m128i Sleef_cast_to_int64q2(Sleef_quadx2 a); +__m128i Sleef_cast_to_int64q2_sse2(Sleef_quadx2 a); +__m128i Sleef_cast_to_int64q2_avx2128(Sleef_quadx2 a); +__m256i Sleef_cast_to_int64q4_avx2(Sleef_quadx4 a); +__m512i Sleef_cast_to_int64q8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

Synopsis

+These functions convert a QP FP value to a 64-bit signed integer. -

-#include <sleefquad.h>
-
-void Sleef_storeq2( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq2_sse2( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq2_avx2128( Sleef_quad * ptr, Sleef_quadx2 v );
-void Sleef_storeq4_avx2( Sleef_quad * ptr, Sleef_quadx4 v );
-void Sleef_storeq8_avx512f( Sleef_quad * ptr, Sleef_quadx8 v );
-
-Link with -lsleefquad. -

+### Convert 64-bit signed integer to QP number -

Description

+```c +#include -

- These functions store QP FP values in the given variable to memory. -

+Sleef_quadx2 Sleef_cast_from_int64q2(__m128i a); +Sleef_quadx2 Sleef_cast_from_int64q2_sse2(__m128i a); +Sleef_quadx2 Sleef_cast_from_int64q2_avx2128(__m128i a); +Sleef_quadx4 Sleef_cast_from_int64q4_avx2(__m256i a); +Sleef_quadx8 Sleef_cast_from_int64q8_avx512f(__m512i a); +``` +Link with `-lsleefquad`. -
+These functions convert a 64-bit signed integer to a QP FP value. -

Extract one element from QP FP vector variable

+### Convert QP number to 64-bit unsigned integer -

Synopsis

+```c +#include -

-#include <sleefquad.h>
-
-Sleef_quad Sleef_getq2( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq2_sse2( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq2_avx2128( Sleef_quadx2 v, int index );
-Sleef_quad Sleef_getq4_avx2( Sleef_quadx4 v, int index );
-Sleef_quad Sleef_getq8_avx512f( Sleef_quadx8 v, int index );
-
-Link with -lsleefquad. -

+__m128i Sleef_cast_to_uint64q2(Sleef_quadx2 a); +__m128i Sleef_cast_to_uint64q2_sse2(Sleef_quadx2 a); +__m128i Sleef_cast_to_uint64q2_avx2128(Sleef_quadx2 a); +__m256i Sleef_cast_to_uint64q4_avx2(Sleef_quadx4 a); +__m512i Sleef_cast_to_uint64q8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

Description

+These functions convert a QP FP value to a 64-bit signed integer. -

- These functions extract the index-th element from - a QP FP vector variable. -

+### Convert 64-bit unsigned integer to QP number -
+```c +#include -

Set one element in QP FP vector variable

+Sleef_quadx2 Sleef_cast_from_uint64q2(__m128i a); +Sleef_quadx2 Sleef_cast_from_uint64q2_sse2(__m128i a); +Sleef_quadx2 Sleef_cast_from_uint64q2_avx2128(__m128i a); +Sleef_quadx4 Sleef_cast_from_uint64q4_avx2(__m256i a); +Sleef_quadx8 Sleef_cast_from_uint64q8_avx512f(__m512i a); +``` +Link with `-lsleefquad`. -

Synopsis

+These functions convert a 64-bit unsigned integer to a QP FP value. -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_setq2( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx2 Sleef_setq2_sse2( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx2 Sleef_setq2_avx2128( Sleef_quadx2 v, int index, Sleef_quad e );
-Sleef_quadx4 Sleef_setq4_avx2( Sleef_quadx4 v, int index, Sleef_quad e );
-Sleef_quadx8 Sleef_setq8_avx512f( Sleef_quadx8 v, int index, Sleef_quad e );
-
-Link with -lsleefquad. -

+

Comparison and selection functions

-

Description

+### QP comparison functions + +```c +#include + +__m128i Sleef_icmpltq2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpleq2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpgtq2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpgeq2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpeqq2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpneq2(Sleef_quadx2 a, Sleef_quadx2 b); + +__m128i Sleef_icmpltq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpleq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpgtq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpgeq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpeqq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpneq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); + +__m128i Sleef_icmpltq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpleq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpgtq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpgeq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpeqq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpneq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); + +__m128i Sleef_icmpltq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); +__m128i Sleef_icmpleq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); +__m128i Sleef_icmpgtq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); +__m128i Sleef_icmpgeq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); +__m128i Sleef_icmpeqq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); +__m128i Sleef_icmpneq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); + +__m256i Sleef_icmpltq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +__m256i Sleef_icmpleq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +__m256i Sleef_icmpgtq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +__m256i Sleef_icmpgeq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +__m256i Sleef_icmpeqq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +__m256i Sleef_icmpneq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of [comparison +functions](../quad#basicComparison). + +### QP comparison functions of the second kind + +```c +#include + +__m128i Sleef_icmpq2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_icmpq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); +__m256i Sleef_icmpq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_icmpq1_purec](../quad#sleef_icmpq1_purec). + +### Check orderedness + +```c +#include + +__m128i Sleef_iunordq2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_iunordq2_sse2(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_iunordq2_avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +__m128i Sleef_iunordq4_avx2(Sleef_quadx4 a, Sleef_quadx4 b); +__m256i Sleef_iunordq8_avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_iunordq1_purec](../quad#sleef_iunordq1_purec). + +### Select elements + +```c +#include + +Sleef_quadx2 Sleef_iselectq2(__m128i c, Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_iselectq2_sse2(__m128i c, Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_iselectq2_avx2128(__m128i c, Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx4 Sleef_iselectq4_avx2(__m128i c, Sleef_quadx4 a, Sleef_quadx4 b); +Sleef_quadx8 Sleef_iselectq8_avx512f(__m256i c, Sleef_quadx8 a, Sleef_quadx8 b); +``` +Link with `-lsleefquad`. + +These are the vectorized functions that operate in the same way as the ternary +operator. -

- These functions return a QP FP vector in which - the index-th element is e, and - other elements are the same as v. -

+

Math functions

-
+### QP functions for basic arithmetic operations + +```c +#include + +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_u05sse2(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05sse2(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05sse2(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05sse2(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2_sse2(Sleef_quadx2 a); + +Sleef_quadx2 Sleef_addq2_u05avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_subq2_u05avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_mulq2_u05avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_divq2_u05avx2128(Sleef_quadx2 a, Sleef_quadx2 b); +Sleef_quadx2 Sleef_negq2_avx2128(Sleef_quadx2 a); + +Sleef_quadx4 Sleef_addq4_u05avx2(Sleef_quadx4 a, Sleef_quadx4 b); +Sleef_quadx4 Sleef_subq4_u05avx2(Sleef_quadx4 a, Sleef_quadx4 b); +Sleef_quadx4 Sleef_mulq4_u05avx2(Sleef_quadx4 a, Sleef_quadx4 b); +Sleef_quadx4 Sleef_divq4_u05avx2(Sleef_quadx4 a, Sleef_quadx4 b); +Sleef_quadx4 Sleef_negq4_avx2(Sleef_quadx4 a); + +Sleef_quadx8 Sleef_addq8_u05avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +Sleef_quadx8 Sleef_subq8_u05avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +Sleef_quadx8 Sleef_mulq8_u05avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +Sleef_quadx8 Sleef_divq8_u05avx512f(Sleef_quadx8 a, Sleef_quadx8 b); +Sleef_quadx8 Sleef_negq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of [the basic arithmetic +operations](../quad#basicArithmetic). + +### Square root functions -

Set all elements in QP FP vector to the same value

+```c +#include + +Sleef_quadx2 Sleef_sqrtq2_u05(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sqrtq2_u05sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sqrtq2_u05avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_sqrtq4_u05avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_sqrtq8_u05avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_sqrtq1_u05purec](../quad#sleef_sqrtq1_u05purec). + +### Sine functions -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_splatq2( Sleef_quad e );
-Sleef_quadx2 Sleef_splatq2_sse2( Sleef_quad e );
-Sleef_quadx2 Sleef_splatq2_avx2128( Sleef_quad e );
-Sleef_quadx4 Sleef_splatq4_avx2( Sleef_quad e );
-Sleef_quadx8 Sleef_splatq8_avx512f( Sleef_quad e );
-
-Link with -lsleefquad. -

+```c +#include + +Sleef_quadx2 Sleef_sinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_sinq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_sinq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_sinq1_u10purec](../quad#sleef_sinq1_u10purec). + +### Cosine functions -

Description

+```c +#include + +Sleef_quadx2 Sleef_cosq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_cosq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_cosq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_cosq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_cosq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_cosq1_u10purec](../quad#sleef_cosq1_u10purec). + +### Tangent functions -

- These functions return a QP FP vector in which all elements are set - to e. -

+```c +#include + +Sleef_quadx2 Sleef_tanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_tanq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_tanq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_tanq1_u10purec](../quad#sleef_tanq1_u10purec). + +### Arc sine functions + +```c +#include + +Sleef_quadx2 Sleef_asinq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_asinq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_asinq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_asinq1_u10purec](../quad#sleef_asinq1_u10purec). + +### Arc cosine functions +```c +#include + +Sleef_quadx2 Sleef_acosq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_acosq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_acosq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_acosq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_acosq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

Conversion functions

+These are the vectorized functions of +[Sleef_acosq1_u10purec](../quad#sleef_acosq1_u10purec). -

Convert QP number to double-precision number

+### Arc tangent functions -

Synopsis

+```c +#include -

-#include <sleefquad.h>
-
-__m128d Sleef_cast_to_doubleq2( Sleef_quadx2 a );
-__m128d Sleef_cast_to_doubleq2_sse2( Sleef_quadx2 a );
-__m128d Sleef_cast_to_doubleq2_avx2128( Sleef_quadx2 a );
-__m256d Sleef_cast_to_doubleq4_avx2( Sleef_quadx4 a );
-__m512d Sleef_cast_to_doubleq8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

+Sleef_quadx2 Sleef_atanq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_atanq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_atanq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

Description

+These are the vectorized functions of +[Sleef_atanq1_u10purec](../quad#sleef_atanq1_u10purec). -

- These functions convert a QP FP value to a double-precision value. -

+### Arc tangent functions of two variables -
+```c +#include -

Convert double-precision number to QP number

+Sleef_quadx2 Sleef_atanq2_u10(Sleef_quadx2 y, Sleef_quadx2 x); +Sleef_quadx2 Sleef_atanq2_u10sse2(Sleef_quadx2 y, Sleef_quadx2 x); +Sleef_quadx2 Sleef_atanq2_u10avx2128(Sleef_quadx2 y, Sleef_quadx2 x); +Sleef_quadx4 Sleef_atanq4_u10avx2(Sleef_quadx4 y, Sleef_quadx4 x); +Sleef_quadx8 Sleef_atanq8_u10avx512f(Sleef_quadx8 y, Sleef_quadx8 x); +``` +Link with `-lsleefquad`. -

Synopsis

+These are the vectorized functions of +[Sleef_atan2q1_u10purec](../quad#sleef_atanq1_u10purec). -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_doubleq2( __m128d a );
-Sleef_quadx2 Sleef_cast_from_doubleq2_sse2( __m128d a );
-Sleef_quadx2 Sleef_cast_from_doubleq2_avx2128( __m128d a );
-Sleef_quadx4 Sleef_cast_from_doubleq4_avx2( __m256d a );
-Sleef_quadx8 Sleef_cast_from_doubleq8_avx512f( __m512d a );
-
-Link with -lsleefquad. -

+### Base-e exponential functions -

Description

+```c +#include -

- These functions convert a double-precision value to a QP FP value. -

+Sleef_quadx2 Sleef_expq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_expq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_expq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -
+These are the vectorized functions of +[Sleef_expq1_u10purec](../quad#sleef_expq1_u10purec). +### Base-2 exponential functions -

Convert QP number to 64-bit signed integer

+```c +#include -

Synopsis

+Sleef_quadx2 Sleef_exp2q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_exp2q2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_exp2q2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_exp2q4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_exp2q8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

-#include <sleefquad.h>
-
-__m128i Sleef_cast_to_int64q2( Sleef_quadx2 a );
-__m128i Sleef_cast_to_int64q2_sse2( Sleef_quadx2 a );
-__m128i Sleef_cast_to_int64q2_avx2128( Sleef_quadx2 a );
-__m256i Sleef_cast_to_int64q4_avx2( Sleef_quadx4 a );
-__m512i Sleef_cast_to_int64q8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

+These are the vectorized functions of +[Sleef_exp2q1_u10purec](../quad#sleef_exp2q1_u10purec). -

Description

+### Base-10 exponentail -

- These functions convert a QP FP value to a 64-bit signed integer. -

+```c +#include -
+Sleef_quadx2 Sleef_exp10q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_exp10q2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_exp10q2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_exp10q4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_exp10q8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. +These are the vectorized functions of +[Sleef_exp10q1_u10purec](../quad#sleef_exp10q1_u10purec). -

Convert 64-bit signed integer to QP number

+### Base-e exponential functions minus 1 -

Synopsis

+```c +#include -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_int64q2( __m128i a );
-Sleef_quadx2 Sleef_cast_from_int64q2_sse2( __m128i a );
-Sleef_quadx2 Sleef_cast_from_int64q2_avx2128( __m128i a );
-Sleef_quadx4 Sleef_cast_from_int64q4_avx2( __m256i a );
-Sleef_quadx8 Sleef_cast_from_int64q8_avx512f( __m512i a );
-
-Link with -lsleefquad. -

+Sleef_quadx2 Sleef_expm1q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expm1q2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_expm1q2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_expm1q4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_expm1q8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

Description

+These are the vectorized functions of +[Sleef_expm1q1_u10purec](../quad#sleef_expm1q1_u10purec). -

- These functions convert a 64-bit signed integer to a QP FP value. -

+### Natural logarithmic functions -
+```c +#include +Sleef_quadx2 Sleef_logq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_logq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_logq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_logq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_logq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

Convert QP number to 64-bit unsigned integer

+These are the vectorized functions of +[Sleef_logq1_u10purec](../quad#sleef_logq1_u10purec). -

Synopsis

+### Base-2 logarithmic functions -

-#include <sleefquad.h>
-
-__m128i Sleef_cast_to_uint64q2( Sleef_quadx2 a );
-__m128i Sleef_cast_to_uint64q2_sse2( Sleef_quadx2 a );
-__m128i Sleef_cast_to_uint64q2_avx2128( Sleef_quadx2 a );
-__m256i Sleef_cast_to_uint64q4_avx2( Sleef_quadx4 a );
-__m512i Sleef_cast_to_uint64q8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

+```c +#include -

Description

+Sleef_quadx2 Sleef_log2q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log2q2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log2q2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_log2q4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_log2q8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

- These functions convert a QP FP value to a 64-bit signed integer. -

+These are the vectorized functions of +[Sleef_log2q1_u10purec](../quad#sleef_log2q1_u10purec). -
+### Base-10 logarithmic functions +```c +#include -

Convert 64-bit unsigned integer to QP number

+Sleef_quadx2 Sleef_log10q2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log10q2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log10q2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_log10q4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_log10q8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. -

Synopsis

+These are the vectorized functions of +[Sleef_log10q1_u10purec](../quad#sleef_log10q1_u10purec). -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_cast_from_uint64q2( __m128i a );
-Sleef_quadx2 Sleef_cast_from_uint64q2_sse2( __m128i a );
-Sleef_quadx2 Sleef_cast_from_uint64q2_avx2128( __m128i a );
-Sleef_quadx4 Sleef_cast_from_uint64q4_avx2( __m256i a );
-Sleef_quadx8 Sleef_cast_from_uint64q8_avx512f( __m512i a );
-
-Link with -lsleefquad. -

+### Logarithm of one plus argument -

Description

+```c +#include -

- These functions convert a 64-bit unsigned integer to a QP FP value. -

+Sleef_quadx2 Sleef_log1pq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log1pq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_log1pq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_log1pq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_log1pq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. +These are the vectorized functions of +[Sleef_log1pq1_u10purec](../quad#sleef_log1pq1_u10purec). -

Comparison and selection functions

+### Power functions -

QP comparison functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-__m128i Sleef_icmpltq2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpleq2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpgtq2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpgeq2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpeqq2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpneq2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-__m128i Sleef_icmpltq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpleq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpgtq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpgeq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpeqq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpneq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-
-__m128i Sleef_icmpltq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpleq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpgtq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpgeq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpeqq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpneq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-
-__m128i Sleef_icmpltq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-__m128i Sleef_icmpleq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-__m128i Sleef_icmpgtq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-__m128i Sleef_icmpgeq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-__m128i Sleef_icmpeqq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-__m128i Sleef_icmpneq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-
-__m256i Sleef_icmpltq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-__m256i Sleef_icmpleq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-__m256i Sleef_icmpgtq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-__m256i Sleef_icmpgeq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-__m256i Sleef_icmpeqq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-__m256i Sleef_icmpneq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions of comparison functions. -

- -
- -

QP comparison functions of the second kind

- -

Synopsis

- -

-#include <sleefquad.h>
-
-__m128i Sleef_icmpq2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_icmpq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-__m256i Sleef_icmpq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_icmpq1_purec. -

- -
- -

Check orderedness

- -

Synopsis

- -

-#include <sleefquad.h>
-
-__m128i Sleef_iunordq2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_iunordq2_sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_iunordq2_avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-__m128i Sleef_iunordq4_avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-__m256i Sleef_iunordq8_avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_iunordq1_purec. -

- -
- -

Select elements

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_iselectq2( __m128i c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_iselectq2_sse2( __m128i c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_iselectq2_avx2128( __m128i c, Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx4 Sleef_iselectq4_avx2( __m128i c, Sleef_quadx4 a, Sleef_quadx4 b );
-Sleef_quadx8 Sleef_iselectq8_avx512f( __m256i c, Sleef_quadx8 a, Sleef_quadx8 b );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions that operate in the same way as the ternary operator. -

+```c +#include +Sleef_quadx2 Sleef_powq2_u10(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_powq2_u10sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_powq2_u10avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_powq4_u10avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_powq8_u10avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. -

Math functions

+These are the vectorized functions of +[Sleef_powq1_u10purec](../quad#sleef_powq1_u10purec). + +### Hyperbolic sine functions + +```c +#include + +Sleef_quadx2 Sleef_sinhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinhq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_sinhq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_sinhq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_sinhq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_sinhq1_u10purec](../quad#sleef_sinhq1_u10purec). + +### Hyperbolic cosine functions + +```c +#include + +Sleef_quadx2 Sleef_coshq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_coshq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_coshq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_coshq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_coshq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_coshq1_u10purec](../quad#sleef_coshq1_u10purec). + +### Hyperbolic tangent functions + +```c +#include + +Sleef_quadx2 Sleef_tanhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanhq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_tanhq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_tanhq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_tanhq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_tanhq1_u10purec](../quad#sleef_tanhq1_u10purec). + +### Inverse hyperbolic sine functions + +```c +#include + +Sleef_quadx2 Sleef_asinhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinhq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_asinhq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_asinhq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_asinhq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_asinhq1_u10purec](../quad#sleef_asinhq1_u10purec). + +### Inverse hyperbolic cosine functions + +```c +#include + +Sleef_quadx2 Sleef_acoshq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_acoshq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_acoshq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_acoshq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_acoshq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_acoshq1_u10purec](../quad#sleef_acoshq1_u10purec). + +### Inverse hyperbolic tangent functions + +```c +#include + +Sleef_quadx2 Sleef_atanhq2_u10(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanhq2_u10sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_atanhq2_u10avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_atanhq4_u10avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_atanhq8_u10avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_atanhq1_u10purec](../quad#sleef_atanhq1_u10purec). + +### Round to integer towards zero + +```c +#include + +Sleef_quadx2 Sleef_truncq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_truncq2_sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_truncq2_avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_truncq4_avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_truncq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_truncq1_purec](../quad#sleef_truncq1_purec). + +### Round to integer towards minus infinity + +```c +#include + +Sleef_quadx2 Sleef_floorq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_floorq2_sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_floorq2_avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_floorq4_avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_floorq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_floorq1_purec](../quad#sleef_floorq1_purec). + +### Round to integer towards plus infinity + +```c +#include + +Sleef_quadx2 Sleef_ceilq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_ceilq2_sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_ceilq2_avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_ceilq4_avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_ceilq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_ceilq1_purec](../quad#sleef_ceilq1_purec). + +### Round to integer away from zero + +```c +#include + +Sleef_quadx2 Sleef_roundq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_roundq2_sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_roundq2_avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_roundq4_avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_roundq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_roundq1_purec](../quad#sleef_roundq1_purec). + +### Round to integer, ties round to even + +```c +#include + +Sleef_quadx2 Sleef_rintq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_rintq2_sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_rintq2_avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_rintq4_avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_rintq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_rintq1_purec](../quad#sleef_rintq1_purec). + +### Absolute value + +```c +#include + +Sleef_quadx2 Sleef_fabsq2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_fabsq2_sse2(Sleef_quadx2 a); +Sleef_quadx2 Sleef_fabsq2_avx2128(Sleef_quadx2 a); +Sleef_quadx4 Sleef_fabsq4_avx2(Sleef_quadx4 a); +Sleef_quadx8 Sleef_fabsq8_avx512f(Sleef_quadx8 a); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_fabsq1_purec](../quad#sleef_fabsq1_purec). + +### Copy sign of a number + +```c +#include + +Sleef_quadx2 Sleef_copysignq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_copysignq2_sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_copysignq2_avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_copysignq4_avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_copysignq8_avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_copysignq1_purec](../quad#sleef_copysignq1_purec). + +### Maximum of two numbers + +```c +#include + +Sleef_quadx2 Sleef_fmaxq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmaxq2_sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmaxq2_avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_fmaxq4_avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_fmaxq8_avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. + +These are the vectorized functions +of [Sleef_fmaxq1_purec](../quad#sleef_fmaxq1_purec). + +### Minimum of two numbers + +```c +#include + +Sleef_quadx2 Sleef_fminq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fminq2_sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fminq2_avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_fminq4_avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_fminq8_avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_fminq1_purec](../quad#sleef_fminq1_purec). + +### Positive difference + +```c +#include + +Sleef_quadx2 Sleef_fdimq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fdimq2_u05sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fdimq2_u05avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_fdimq4_u05avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_fdimq8_u05avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_fdimq1_u05purec](../quad#sleef_fdimq1_u05purec). + +### Floating point remainder + +```c +#include + +Sleef_quadx2 Sleef_fmodq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmodq2_sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_fmodq2_avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_fmodq4_avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_fmodq8_avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_fmodq1_purec](../quad#sleef_fmodq1_purec). + +### Floating point remainder + +```c +#include + +Sleef_quadx2 Sleef_remainderq2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_remainderq2_sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_remainderq2_avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_remainderq4_avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_remainderq8_avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_remainderq1_purec](../quad#sleef_remainderq1_purec). + +### Split a number to fractional and integral components + +```c +#include + +Sleef_quadx2 Sleef_frexpq2(Sleef_quadx2 x, __m128i * ptr); +Sleef_quadx2 Sleef_frexpq2_sse2(Sleef_quadx2 x, __m128i * ptr); +Sleef_quadx2 Sleef_frexpq2_avx2128(Sleef_quadx2 x, __m128i * ptr); +Sleef_quadx4 Sleef_frexpq4_avx2(Sleef_quadx4 x, __m128i * ptr); +Sleef_quadx8 Sleef_frexpq8_avx512f(Sleef_quadx8 x, __m256i * ptr); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_frexpq1_purec](../quad#sleef_frexpq1_purec). + +### Break a number into integral and fractional parts + +```c +#include + +Sleef_quadx2 Sleef_modfq2(Sleef_quadx2 x, Sleef_quadx2 * ptr); +Sleef_quadx2 Sleef_modfq2_sse2(Sleef_quadx2 x, Sleef_quadx2 * ptr); +Sleef_quadx2 Sleef_modfq2_avx2128(Sleef_quadx2 x, Sleef_quadx2 * ptr); +Sleef_quadx4 Sleef_modfq4_avx2(Sleef_quadx4 x, Sleef_quadx4 * ptr); +Sleef_quadx8 Sleef_modfq8_avx512f(Sleef_quadx8 x, Sleef_quadx8 * ptr); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_modfq1_purec](../quad#sleef_modfq1_purec). + +### 2D Euclidian distance + +```c +#include + +Sleef_quadx2 Sleef_hypotq2_u05(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_hypotq2_u05sse2(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx2 Sleef_hypotq2_u05avx2128(Sleef_quadx2 x, Sleef_quadx2 y); +Sleef_quadx4 Sleef_hypotq4_u05avx2(Sleef_quadx4 x, Sleef_quadx4 y); +Sleef_quadx8 Sleef_hypotq8_u05avx512f(Sleef_quadx8 x, Sleef_quadx8 y); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_hypotq1_u05purec](../quad#sleef_hypotq1_u05purec). + +### Fused multiply and accumulate + +```c +#include + +Sleef_quadx2 Sleef_fmaq2_u05(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx2 Sleef_fmaq2_u05sse2(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx2 Sleef_fmaq2_u05avx2128(Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z); +Sleef_quadx4 Sleef_fmaq4_u05avx2(Sleef_quadx4 x, Sleef_quadx4 y, Sleef_quadx4 z); +Sleef_quadx8 Sleef_fmaq8_u05avx512f(Sleef_quadx8 x, Sleef_quadx8 y, Sleef_quadx8 z); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_fmaq1_u05purec](../quad#sleef_fmaq1_u05purec). + +### Multiply by integral power of 2 + +```c +#include + +Sleef_quadx2 Sleef_ldexpq2(Sleef_quadx2 x, __m128i e); +Sleef_quadx2 Sleef_ldexpq2_sse2(Sleef_quadx2 x, __m128i e); +Sleef_quadx2 Sleef_ldexpq2_avx2128(Sleef_quadx2 x, __m128i e); +Sleef_quadx4 Sleef_ldexpq4_avx2(Sleef_quadx4 x, __m128i e); +Sleef_quadx8 Sleef_ldexpq8_avx512f(Sleef_quadx8 x, __m256i e); +``` +Link with `-lsleefquad`. + +These are the vectorized functions of +[Sleef_ldexpq1_purec](../quad#sleef_ldexpq1_purec). + +### Integer exponent of an FP number + +```c +#include -

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_u05sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05sse2( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2_sse2( Sleef_quadx2 a );
-
-Sleef_quadx2 Sleef_addq2_u05avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_subq2_u05avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_mulq2_u05avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_divq2_u05avx2128( Sleef_quadx2 a, Sleef_quadx2 b );
-Sleef_quadx2 Sleef_negq2_avx2128( Sleef_quadx2 a );
-
-Sleef_quadx4 Sleef_addq4_u05avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-Sleef_quadx4 Sleef_subq4_u05avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-Sleef_quadx4 Sleef_mulq4_u05avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-Sleef_quadx4 Sleef_divq4_u05avx2( Sleef_quadx4 a, Sleef_quadx4 b );
-Sleef_quadx4 Sleef_negq4_avx2( Sleef_quadx4 a );
-
-Sleef_quadx8 Sleef_addq8_u05avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-Sleef_quadx8 Sleef_subq8_u05avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-Sleef_quadx8 Sleef_mulq8_u05avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-Sleef_quadx8 Sleef_divq8_u05avx512f( Sleef_quadx8 a, Sleef_quadx8 b );
-Sleef_quadx8 Sleef_negq8_avx512f( Sleef_quadx8 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_u05sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sqrtq2_u05avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_sqrtq4_u05avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_sqrtq8_u05avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_sinq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_sinq8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_cosq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_cosq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_cosq8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_tanq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_tanq8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_asinq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_asinq8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acosq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_acosq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_acosq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_acosq1_u10purec. -

- -
- -

Arc tangent functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_atanq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_atanq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_atanq1_u10purec. -

- -
- -

Arc tangent functions of two variables

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanq2_u10( Sleef_quadx2 y, Sleef_quadx2 x );
-Sleef_quadx2 Sleef_atanq2_u10sse2( Sleef_quadx2 y, Sleef_quadx2 x );
-Sleef_quadx2 Sleef_atanq2_u10avx2128( Sleef_quadx2 y, Sleef_quadx2 x );
-Sleef_quadx4 Sleef_atanq4_u10avx2( Sleef_quadx4 y, Sleef_quadx4 x );
-Sleef_quadx8 Sleef_atanq8_u10avx512f( Sleef_quadx8 y, Sleef_quadx8 x );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_atan2q1_u10purec. -

- -
- -

Base-e exponential functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_expq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_expq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_expq8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp2q2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_exp2q4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_exp2q8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_exp10q2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_exp10q4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_exp10q8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_expm1q2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_expm1q4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_expm1q8_u10avx512f( Sleef_quadx8 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_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_logq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_logq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_logq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_logq1_u10purec. -

- -
- -

Base-2 logarithmic functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log2q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log2q2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log2q2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_log2q4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_log2q8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_log2q1_u10purec. -

- -
- -

Base-10 logarithmic functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log10q2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log10q2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log10q2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_log10q4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_log10q8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_log10q1_u10purec. -

- -
- -

Logarithm of one plus argument

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_log1pq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log1pq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_log1pq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_log1pq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_log1pq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_log1pq1_u10purec. -

- -
- -

Power functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_powq2_u10( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_powq2_u10sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_powq2_u10avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_powq4_u10avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_powq8_u10avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_powq1_u10purec. -

- -
- -

Hyperbolic sine functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_sinhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinhq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_sinhq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_sinhq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_sinhq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_sinhq1_u10purec. -

- -
- -

Hyperbolic cosine functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_coshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_coshq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_coshq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_coshq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_coshq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_coshq1_u10purec. -

- -
- -

Hyperbolic tangent functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_tanhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanhq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_tanhq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_tanhq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_tanhq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_tanhq1_u10purec. -

- -
- -

Inverse hyperbolic sine functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_asinhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinhq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_asinhq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_asinhq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_asinhq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_asinhq1_u10purec. -

- -
- -

Inverse hyperbolic cosine functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_acoshq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acoshq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_acoshq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_acoshq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_acoshq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_acoshq1_u10purec. -

- -
- -

Inverse hyperbolic tangent functions

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_atanhq2_u10( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanhq2_u10sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_atanhq2_u10avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_atanhq4_u10avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_atanhq8_u10avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_atanhq1_u10purec. -

- -
- -

Round to integer towards zero

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_truncq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_truncq2_sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_truncq2_avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_truncq4_avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_truncq8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_truncq1_purec. -

- -
- -

Round to integer towards minus infinity

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_floorq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_floorq2_sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_floorq2_avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_floorq4_avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_floorq8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_floorq1_purec. -

- -
- -

Round to integer towards plus infinity

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_ceilq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_ceilq2_sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_ceilq2_avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_ceilq4_avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_ceilq8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_ceilq1_purec. -

- -
- -

Round to integer away from zero

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_roundq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_roundq2_sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_roundq2_avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_roundq4_avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_roundq8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_roundq1_purec. -

- -
- -

Round to integer, ties round to even

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_rintq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_rintq2_sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_rintq2_avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_rintq4_avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_rintq8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_rintq1_purec. -

- -
- -

Absolute value

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fabsq2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_fabsq2_sse2( Sleef_quadx2 a );
-Sleef_quadx2 Sleef_fabsq2_avx2128( Sleef_quadx2 a );
-Sleef_quadx4 Sleef_fabsq4_avx2( Sleef_quadx4 a );
-Sleef_quadx8 Sleef_fabsq8_avx512f( Sleef_quadx8 a );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_fabsq1_purec. -

- -
- -

Copy sign of a number

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_copysignq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_copysignq2_sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_copysignq2_avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_copysignq4_avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_copysignq8_avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_copysignq1_purec. -

- -
- -

Maximum of two numbers

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmaxq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmaxq2_sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmaxq2_avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_fmaxq4_avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_fmaxq8_avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_fmaxq1_purec. -

- -
- -

Minimum of two numbers

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fminq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fminq2_sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fminq2_avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_fminq4_avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_fminq8_avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_fminq1_purec. -

- -
- -

Positive difference

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fdimq2_u05( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fdimq2_u05sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fdimq2_u05avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_fdimq4_u05avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_fdimq8_u05avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_fdimq1_u05purec. -

- -
- -

Floating point remainder

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmodq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmodq2_sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_fmodq2_avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_fmodq4_avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_fmodq8_avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_fmodq1_purec. -

- -
- -

Floating point remainder

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_remainderq2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_remainderq2_sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_remainderq2_avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_remainderq4_avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_remainderq8_avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_remainderq1_purec. -

- -
- -

Split a number to fractional and integral components

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_frexpq2( Sleef_quadx2 x, __m128i * ptr );
-Sleef_quadx2 Sleef_frexpq2_sse2( Sleef_quadx2 x, __m128i * ptr );
-Sleef_quadx2 Sleef_frexpq2_avx2128( Sleef_quadx2 x, __m128i * ptr );
-Sleef_quadx4 Sleef_frexpq4_avx2( Sleef_quadx4 x, __m128i * ptr );
-Sleef_quadx8 Sleef_frexpq8_avx512f( Sleef_quadx8 x, __m256i * ptr );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_frexpq1_purec. -

- -
- -

Break a number into integral and fractional parts

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_modfq2( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_quadx2 Sleef_modfq2_sse2( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_quadx2 Sleef_modfq2_avx2128( Sleef_quadx2 x, Sleef_quadx2 * ptr );
-Sleef_quadx4 Sleef_modfq4_avx2( Sleef_quadx4 x, Sleef_quadx4 * ptr );
-Sleef_quadx8 Sleef_modfq8_avx512f( Sleef_quadx8 x, Sleef_quadx8 * ptr );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_modfq1_purec. -

- -
- -

2D Euclidian distance

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_hypotq2_u05( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_hypotq2_u05sse2( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx2 Sleef_hypotq2_u05avx2128( Sleef_quadx2 x, Sleef_quadx2 y );
-Sleef_quadx4 Sleef_hypotq4_u05avx2( Sleef_quadx4 x, Sleef_quadx4 y );
-Sleef_quadx8 Sleef_hypotq8_u05avx512f( Sleef_quadx8 x, Sleef_quadx8 y );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_hypotq1_u05purec. -

- -
- -

Fused multiply and accumulate

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_fmaq2_u05( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_quadx2 Sleef_fmaq2_u05sse2( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_quadx2 Sleef_fmaq2_u05avx2128( Sleef_quadx2 x, Sleef_quadx2 y, Sleef_quadx2 z );
-Sleef_quadx4 Sleef_fmaq4_u05avx2( Sleef_quadx4 x, Sleef_quadx4 y, Sleef_quadx4 z );
-Sleef_quadx8 Sleef_fmaq8_u05avx512f( Sleef_quadx8 x, Sleef_quadx8 y, Sleef_quadx8 z );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_fmaq1_u05purec. -

- -
- -

Multiply by integral power of 2

- -

Synopsis

- -

-#include <sleefquad.h>
-
-Sleef_quadx2 Sleef_ldexpq2( Sleef_quadx2 x, __m128i e );
-Sleef_quadx2 Sleef_ldexpq2_sse2( Sleef_quadx2 x, __m128i e );
-Sleef_quadx2 Sleef_ldexpq2_avx2128( Sleef_quadx2 x, __m128i e );
-Sleef_quadx4 Sleef_ldexpq4_avx2( Sleef_quadx4 x, __m128i e );
-Sleef_quadx8 Sleef_ldexpq8_avx512f( Sleef_quadx8 x, __m256i e );
-
-Link with -lsleefquad. -

- -

Description

- -

- These are the vectorized functions - of Sleef_ldexpq1_purec. -

- -
- -

Integer exponent of an FP number

- -

Synopsis

- -

-#include <sleefquad.h>
-
-__m128i Sleef_ilogbq2( Sleef_quadx2 x );
-__m128i Sleef_ilogbq2_sse2( Sleef_quadx2 x );
-__m128i Sleef_ilogbq2_avx2128( Sleef_quadx2 x );
-__m128i Sleef_ilogbq4_avx2( Sleef_quadx4 x );
-__m256i Sleef_ilogbq8_avx512f( Sleef_quadx8 x );
-
-Link with -lsleefquad. -

+__m128i Sleef_ilogbq2(Sleef_quadx2 x); +__m128i Sleef_ilogbq2_sse2(Sleef_quadx2 x); +__m128i Sleef_ilogbq2_avx2128(Sleef_quadx2 x); +__m128i Sleef_ilogbq4_avx2(Sleef_quadx4 x); +__m256i Sleef_ilogbq8_avx512f(Sleef_quadx8 x); +``` +Link with `-lsleefquad`. -

Description

- -

- These are the vectorized functions - of Sleef_ilogbq1_purec. -

+These are the vectorized functions of +[Sleef_ilogbq1_purec](../quad#sleef_ilogbq1_purec).