Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7744 Discussions

Reference/information/manual for _Quad mathematical functions and constants

Deltavelez
Beginner
622 Views

Hello everyone,

 

I've been trying finding information on the _Quad (128bit) floating point functions supported by the Intel Compiler. with no success.  All I have been able to come up with are references to using, for example __sqrtq (instead of the float version  sqrt), which I managed to get working.

 

Although I could possibly "guess" some other supported functions, I would like to know if there is a list, a header file, or for that matter any document with the definition of the supported functions and constants.

 

Much appreciated !


Diego.

0 Kudos
6 Replies
DitiD_Intel
Moderator
603 Views

Hi,

 

Thank you for posting in Intel Communities.

 

Could you please let us know your OS details and the Intel oneAPI version so that we can investigate your issue from our end?

 

Meanwhile, could you please try compiling the below code using '-Qoption,cpp,--extended_float_types'.

 


#include <iostream>
#include "float.h"
#include "stdio.h"
#include <windows.h>

int main()
{
    _Quad a = 1.1;
    _Quad b = 2.2;
    _Quad c = a + b;
    std::cout << "a + b = " << (double)c << std::endl;

    std::cout << "Hello World!\n";
}

 

For more information on Qoption, please refer to the link mentioned below.

 

https://www.intel.com/content/www/us/en/develop/documentation/cpp-compiler-developer-guide-and-refer...

 

Thanks and Regards,

Ditipriya.

 

Deltavelez
Beginner
586 Views

Hello Ditipriya,

 

Thanks for your reply.  I'm using Windows, Visual Studio 2019, the Intel C++ compiler version 19.2.  I am able to compile and run the  program below, which is a very good start.   What I'm looking for is a complete list of the supported quad functions and constants in Intel's C++ Compiler math library.  I am puzzled they do not seem to be described or possibly not even mentioned in the Compiler's Documentation, since quad functions are an AWESOME feature for certain fields such as advanced physics, numerical computing or statistics.  

 

I would really appreciate if you'd please help me find documentation.  For now, some functions have been "guessed" from the names of the standard 'double' mathematical library.

 

Kind regards,


Diego 

-------------------------------------------------------------------------------------------------------------------

#include <iostream>
#include "float.h"
#include "stdio.h"
#include <windows.h>

extern "C" {
_Quad __ldexpq(_Quad, int);
_Quad __frexpq(_Quad, int*);
_Quad __fabsq(_Quad);
_Quad __floorq(_Quad);
_Quad __ceilq(_Quad);
_Quad __sqrtq(_Quad);
_Quad __truncq(_Quad);
_Quad __expq(_Quad);
_Quad __powq(_Quad, _Quad);
_Quad __logq(_Quad);
_Quad __log10q(_Quad);
_Quad __sinq(_Quad);
_Quad __cosq(_Quad);
_Quad __tanq(_Quad);
_Quad __asinq(_Quad);
_Quad __acosq(_Quad);
_Quad __atanq(_Quad);
_Quad __sinhq(_Quad);
_Quad __coshq(_Quad);
_Quad __tanhq(_Quad);
_Quad __fmodq(_Quad, _Quad);
_Quad __atan2q(_Quad, _Quad);
}

int main()
{
_Quad a = 2.71828;
printf("%f", (float)__logq(a));  /* Shows 0.999999 on screen*/
}

Deltavelez
Beginner
477 Views

Hello !

 

Excuseme, are there any updates about this ?

 

Regards,

 

Diego Velez

DitiD_Intel
Moderator
551 Views

Hi,

 

>>I would really appreciate if you'd please help me find documentation. 

We have reported this issue to the concerned development team. They are looking into your issue and will get back to you soon.

 

Thanks & Regards,

Ditipriya.

 

 

Deltavelez
Beginner
518 Views

Hello,

I did some research and I think I have an idea of the functions which are supported by Intel's amazing compiler (please see list below).  I would like to get some information on them  (doing it by trial an error doesnt' seem to be the right/best wat to do it), including at the very least the types and number of arguments, for example.   If this is difficult to get together, the C/C++ header would probably help.

---------------------------------------------------------------------------------------------------------------------------

__asinq:  Computes the Inverse Sine of a 128-bit floating point number.

                 Argument:  _Quad x

                 Returns:  _Quad  y

                 Error conditions:  sets flag "errno" to XX if value is smaller than -1.000000 or larger than +1.00000000

---------------------------------------------------------------------------------------------------------------------------

 

Best regards,

 

Diego Velez

 

INTEL's MATHEMATICAL FUNCTIONS

-----------------------------------------

__acosdq
__acoshq
__acosq
__annuityq
__asindq
__asinhq
__asinq
__atan2dq
__atan2q
__atand2q
__atandq
__atanhq
__atanq
__bwr_acos
__bwr_acosd
__bwr_acosdf
__bwr_acosf
__bwr_acosh
__bwr_acoshf
__bwr_acospi
__bwr_acospif
__bwr_annuity
__bwr_annuityf
__bwr_asin
__bwr_asind
__bwr_asindf
__bwr_asinf
__bwr_asinh
__bwr_asinhf
__bwr_asinpi
__bwr_asinpif
__bwr_atan
__bwr_atan2
__bwr_atan2d
__bwr_atan2df
__bwr_atan2f
__bwr_atan2pi
__bwr_atan2pif
__bwr_atand
__bwr_atand2
__bwr_atand2f
__bwr_atandf
__bwr_atanf
__bwr_atanh
__bwr_atanhf
__bwr_atanpi
__bwr_atanpif
__bwr_cbrt
__bwr_cbrtf
__bwr_cdfnorminv
__bwr_cdfnorminvf
__bwr_ceil
__bwr_ceilf
__bwr_compound
__bwr_compoundf
__bwr_copysign
__bwr_copysignf
__bwr_cos
__bwr_cosd
__bwr_cosdf
__bwr_cosf
__bwr_cosh
__bwr_coshf
__bwr_cospi
__bwr_cospif
__bwr_cot
__bwr_cotd
__bwr_cotdf
__bwr_cotf
__bwr_erf
__bwr_erfc
__bwr_erfcf
__bwr_erfcx
__bwr_erfcxf
__bwr_erff
__bwr_erfinv
__bwr_erfinvf
__bwr_exp
__bwr_exp10
__bwr_exp10f
__bwr_exp2
__bwr_exp2f
__bwr_expf
__bwr_expm1
__bwr_expm1f
__bwr_fabs
__bwr_fabsf
__bwr_fdim
__bwr_fdimf
__bwr_floor
__bwr_floorf
__bwr_fma
__bwr_fmaf
__bwr_fmax
__bwr_fmaxf
__bwr_fmin
__bwr_fminf
__bwr_fmod
__bwr_fmodf
__bwr_frexp
__bwr_frexpf
__bwr_gamma
__bwr_gamma_r
__bwr_gammaf
__bwr_gammaf_r
__bwr_hypot
__bwr_hypotf
__bwr_ilogb
__bwr_ilogbf
__bwr_invsqrt
__bwr_invsqrtf
__bwr_j0
__bwr_j0f
__bwr_j1
__bwr_j1f
__bwr_jn
__bwr_jnf
__bwr_ldexp
__bwr_ldexpf
__bwr_lgamma
__bwr_lgamma_r
__bwr_lgammaf
__bwr_lgammaf_r
__bwr_llrint
__bwr_llrintf
__bwr_llround
__bwr_llroundf
__bwr_log
__bwr_log10
__bwr_log10f
__bwr_log1p
__bwr_log1pf
__bwr_log2
__bwr_log2f
__bwr_logb
__bwr_logbf
__bwr_logf
__bwr_lrint
__bwr_lrintf
__bwr_lround
__bwr_lroundf
__bwr_modf
__bwr_modff
__bwr_nearbyint
__bwr_nearbyintf
__bwr_nextafter
__bwr_nextafterf
__bwr_nexttoward
__bwr_nexttowardf
__bwr_pow
__bwr_pow2o3
__bwr_pow2o3f
__bwr_pow3o2
__bwr_pow3o2f
__bwr_powf
__bwr_powr
__bwr_powrf
__bwr_remainder
__bwr_remainderf
__bwr_remquo
__bwr_remquof
__bwr_rint
__bwr_rintf
__bwr_round
__bwr_roundf
__bwr_scalb
__bwr_scalbf
__bwr_scalbln
__bwr_scalblnf
__bwr_scalbn
__bwr_scalbnf
__bwr_significand
__bwr_significandf
__bwr_sin
__bwr_sincos
__bwr_sincosd
__bwr_sincosdf
__bwr_sincosf
__bwr_sincospi
__bwr_sincospif
__bwr_sind
__bwr_sindf
__bwr_sinf
__bwr_sinh
__bwr_sinhcosh
__bwr_sinhcoshf
__bwr_sinhf
__bwr_sinpi
__bwr_sinpif
__bwr_sqrt
__bwr_sqrtf
__bwr_tan
__bwr_tand
__bwr_tandf
__bwr_tanf
__bwr_tanh
__bwr_tanhf
__bwr_tanpi
__bwr_tanpif
__bwr_tgamma
__bwr_tgammaf
__bwr_trunc
__bwr_truncf
__bwr_y0
__bwr_y0f
__bwr_y1
__bwr_y1f
__bwr_yn
__bwr_ynf
__cabsq
__cacoshq
__cacosq
__cargq
__casinhq
__casinq
__catanhq
__catanq
__cbrtq
__ccoshq
__ccosq
__ceilq
__cexp10q
__cexp2q
__cexpm1q
__cexpq
__cimagq
__cisdq
__cisq
__clog10q
__clog1pq
__clog2q
__clog_f90
__clogf_f90
__clogq
__clogq_f90
__compoundq
__conjq
__copysignq
__cosdq
__coshq
__cosq
__cotdq
__cotq
__cpowq
__cprojq
__crealq
__csinhq
__csinq
__csqrt_f90
__csqrtf_f90
__csqrtq
__csqrtq_f90
__ctanhq
__ctanq
__dremq
__erfcq
__erfcxq
__erfq
__exp10q
__exp2q
__expm1q
__expq
__fabsq
__fdimq
__finite
__finited
__finitef
__finitel
__floorq
__fmaq
__fmaxq
__fminq
__fmodq
__fpclassify
__fpclassifyd
__fpclassifyf
__fpclassifyl
__fpclassifyq
__frexpq
__gammaq
__gammaq_r
__hypotq
__ilogbq
__invsqrtq
__isfinite
__isfinited
__isfinitef
__isfinitel
__isfiniteq
__isgreater
__isgreaterequal
__isgreaterequalf
__isgreaterequall
__isgreaterequalq
__isgreaterf
__isgreaterl
__isgreaterq
__isinf
__isinfd
__isinff
__isinfl
__isinfq
__isless
__islessequal
__islessequalf
__islessequall
__islessequalq
__islessf
__islessgreater
__islessgreaterf
__islessgreaterl
__islessgreaterq
__islessl
__islessq
__isnan
__isnand
__isnanf
__isnanl
__isnanq
__isnormal
__isnormald
__isnormalf
__isnormall
__isnormalq
__isunordered
__isunorderedf
__isunorderedl
__isunorderedq
__j0q
__j1q
__jnq
__ldexpq
__lgammaq
__lgammaq_r
__libm128_nexttoward128
__libm128_nexttoward128f
__libm128_nexttoward128l
__libm_f_pow2i
__libm_f_powc16i8
__libm_f_powc32i8
__libm_f_powc8i8
__libm_f_powcc
__libm_f_powci
__libm_f_powdd
__libm_f_powdi
__libm_f_powi8i4
__libm_f_powi8i8
__libm_f_powii
__libm_f_powji
__libm_f_powr16i8
__libm_f_powr4i8
__libm_f_powr8i8
__libm_f_powri
__libm_f_powrr
__libm_f_powzi
__libm_f_powzz
__libm_flt_rounds
__libm_logl
__libm_nexttoward64
__libm_nexttoward64f
__libm_nexttoward64l
__libm_pow_bb
__libm_pow_cc_val
__libm_pow_ci
__libm_pow_ci_val
__libm_pow_cr_val
__libm_pow_dd
__libm_pow_di_val
__libm_pow_dz_val
__libm_pow_hh
__libm_pow_ii_val
__libm_pow_rc_val
__libm_pow_ri_val
__libm_pow_zd_val
__libm_pow_zi_val
__libm_pow_zz_val
__libm_setusermatherr
__libm_setusermatherrf
__libm_setusermatherrl
__libm_sse2_sincos
__libm_sse2_sincosf
__llrintq
__llroundq
__log10q
__log1pq
__log2q
__logbq
__logq
__lrintq
__lroundq
__modfq
__nanq
__nearbyintq
__nextafterq
__nexttowardq
__nintq
__pow_eq
__powc16i4
__powc16i8
__powc32i4
__powc32i8
__powc8i4
__powc8i8
__powi4i4
__powi8i8
__powi_eq
__powiq
__powq
__powr10i4
__powr10i8
__powr16i4
__powr16i8
__powr4i4
__powr4i8
__powr8i4
__powr8i8
__remainderq
__remquoq
__rintq
__roundq
__rsqrtq
__scalblnq
__scalbnq
__scalbq
__signbit
__signbitd
__signbitf
__signbitl
__signbitq
__signgamq
__significandq
__sincosdq
__sincosq
__sindq
__sinhcoshq
__sinhq
__sinq
__sqrtq
__tandq
__tanhq
__tanq
__tgammaq
__truncq
__y0q
__y1q
__ynq
_cvtsh_ss
_cvtss_sh
_mm_cvtph_ps
_mm_cvtps_ph
acos
acosd
acosdf
acosdl
acosf
acosh
acoshf
acoshl
acosl
acospi
acospif
annuity
annuityf
annuityl
asin
asind
asindf
asindl
asinf
asinh
asinhf
asinhl
asinl
asinpi
asinpif
atan
atan2
atan2d
atan2df
atan2dl
atan2f
atan2l
atan2pi
atan2pif
atand
atand2
atand2f
atand2l
atandf
atandl
atanf
atanh
atanhf
atanhl
atanl
atanpi
atanpif
cabs
cabsf
cabsl
cacos
cacosf
cacosh
cacoshf
cacoshl
cacosl
carg
cargf
cargl
casin
casinf
casinh
casinhf
casinhl
casinl
catan
catanf
catanh
catanhf
catanhl
catanl
cbrt
cbrtf
cbrtl
ccos
ccosf
ccosh
ccoshf
ccoshl
ccosl
cdfnorm
cdfnormf
cdfnorminv
cdfnorminvf
ceil
ceilf
ceill
cexp
cexp10
cexp10f
cexp10l
cexp2
cexp2f
cexp2l
cexpf
cexpl
cimag
cimagf
cimagl
cis
cisd
cisdf
cisdl
cisf
cisl
clog
clog10
clog10f
clog10l
clog2
clog2f
clog2l
clogf
clogl
compound
compoundf
compoundl
conj
conjf
conjl
copysign
copysignf
copysignl
cos
cosd
cosdf
cosdl
cosf
cosh
coshf
coshl
cosl
cospi
cospif
cot
cotd
cotdf
cotdl
cotf
cotl
cpow
cpowf
cpowl
cproj
cprojf
cprojl
creal
crealf
creall
csin
csinf
csinh
csinhf
csinhl
csinl
csqrt
csqrtf
csqrtl
ctan
ctanf
ctanh
ctanhf
ctanhl
ctanl
erf
erfc
erfcf
erfcinv
erfcinvf
erfcl
erfcx
erfcxf
erff
erfinv
erfinvf
erfinvl
erfl
exp
exp10
exp10f
exp10l
exp2
exp2f
exp2l
expf
expl
expm1
expm1f
expm1l
f_pow2i
f_powc16i8
f_powc32i8
f_powc8i8
f_powcc
f_powci
f_powdd
f_powdi
f_powi8i4
f_powi8i8
f_powii
f_powji
f_powr16i8
f_powr4i8
f_powr8i8
f_powri
f_powrr
f_powzi
f_powzz
fabs
fabsf
fabsl
fdim
fdimf
fdiml
feclearexcept
fedisableexcept
feenableexcept
fegetenv
fegetexcept
fegetexceptflag
fegetround
feholdexcept
feraiseexcept
fesetenv
fesetexceptflag
fesetround
fetestexcept
feupdateenv
finite
finited
finitef
finitel
floor
floorf
floorl
fma
fmaf
fmal
fmax
fmaxf
fmaxl
fmin
fminf
fminl
fmod
fmodf
fmodl
fpclassify
fpclassifyd
fpclassifyf
fpclassifyl
frexp
frexpf
frexpl
gamma
gamma_r
gammaf
gammaf_r
gammal
gammal_r
hypot
hypotf
hypotl
ilogb
ilogbf
ilogbl
invsqrt
invsqrtf
invsqrtl
isfinite
isfinited
isfinitef
isfinitel
isgreater
isgreaterequal
isgreaterequalf
isgreaterequall
isgreaterf
isgreaterl
isinf
isinfd
isinff
isinfl
isless
islessequal
islessequalf
islessequall
islessf
islessgreater
islessgreaterf
islessgreaterl
islessl
isnan
isnand
isnanf
isnanl
isnormal
isnormald
isnormalf
isnormall
isunordered
isunorderedf
isunorderedl
j0
j0f
j0l
j1
j1f
j1l
jn
jnf
jnl
ldexp
ldexpf
ldexpl
lgamma
lgamma_r
lgammaf
lgammaf_r
lgammal
lgammal_r
llrint
llrintf
llrintl
llround
llroundf
llroundl
log
log10
log10f
log10l
log1p
log1pf
log1pl
log2
log2f
log2l
logb
logbf
logbl
logf
logl
lrint
lrintf
lrintl
lround
lroundf
lroundl
matherr
matherrf
matherrl
maxmag
maxmagf
minmag
minmagf
modf
modff
modfl
nan
nanf
nanl
nearbyint
nearbyintf
nearbyintl
nextafter
nextafterf
nextafterl
nexttoward
nexttowardf
nexttowardl
pow
pow2o3
pow2o3f
pow3o2
pow3o2f
pow_bb
pow_cc_val
pow_ci
pow_ci_val
pow_cr_val
pow_dd
pow_di_val
pow_dz_val
pow_hh
pow_ii_val
pow_rc_val
pow_ri_val
pow_zd_val
pow_zi_val
pow_zz_val
powf
powl
powr
powrf
remainder
remainderf
remainderl
remquo
remquof
remquol
rint
rintf
rintl
round
roundf
roundl
scalb
scalbf
scalbl
scalbln
scalblnf
scalblnl
scalbn
scalbnf
scalbnl
signbit
signbitd
signbitf
signbitl
signgam
signgamq
significand
significandf
significandl
sin
sincos
sincosd
sincosdf
sincosdl
sincosf
sincosl
sincospi
sincospif
sind
sindf
sindl
sinf
sinh
sinhcosh
sinhcoshf
sinhcoshl
sinhf
sinhl
sinl
sinpi
sinpif
sqrt
sqrtf
sqrtl
tan
tand
tandf
tandl
tanf
tanh
tanhf
tanhl
tanl
tanpi
tanpif
tgamma
tgammaf
tgammal
trunc
truncf
truncl
y0
y0f
y0l
y1
y1f
y1l
yn
ynf
ynl

 

  

 

 

 

DitiD_Intel
Moderator
411 Views

Hi,


This issue has been reported to the relevant development team. They are investigating your issue and will get back to you soon.


Thanks and Regards,

Ditipriya.


Reply