IntelRDFPMathLib20U5/0000755€­ Q00042560000000000015256550700014330 5ustar aakkasintelallIntelRDFPMathLib20U5/EXAMPLES/0000755€­ Q00042560000000000015256550700015546 5ustar aakkasintelallIntelRDFPMathLib20U5/EXAMPLES/README0000644€­ Q00042560000000414415256550700016431 0ustar aakkasintelallNote: 000, 001, ..., 111 are associated with the following three conditions: bit 2 [msb]: 0 = call by value (except for the pointer to the status flags, passed by reference unless global) 1 = call by reference; bit 1 : 0 = rounding mode passed as a parameter 1 = rounding mode passed in global variable _IDEC_glbround (fixed name) bit 0 [lsb]: 0 = pointer to status flags passed as a parameter 1 = status flags passed in global variable _IDEC_glbflags (fixed name) Example (one of eight possible, for Linux only; similar for other OS-es): Build libbid.a in ../LIBRARY with '...CALL_BY_REF=0 GLOBAL_RND=0 GLOBAL_FLAGS=0' $ cp main.c_000 main.c $ cp decimal.h_000 decimal.h $ icc main.c ../LIBRARY/libbid.a $ ./a.out Begin Decimal Floating-Point Sanity Check TEST CASE 1 FOR bid128_mul 000 () PASSED TEST CASE 2 FOR bid128_mul 000 () PASSED TEST CASE 3 FOR bid128_mul 000 () PASSED End Decimal Floating-Point Sanity Check $ rm main.c decimal.h a.out Note: The scripts and makefiles provided here may need adjustments, depending on the environment in which they are used; for example if moving files from Windows to Linux, running dos2unix on the Linux script files may be necessary. Note: For other operating systems and architecture combinations see for example the following command files (or other RUN* command files provided here), as well as any command files invoked from these ones: RUNLINUXINTEL64_ICX RUNWINDOWSINTEL64_CL.bat These command files build and run all eight examples from this directory, possibly using more than one compiler. Changes may be needed for certain environments. However, prior to building these examples the similar RUN* command has to be executed in ../LIBRARY/ in order to build all the necessary versions of the Intel(R) Decimal Floating-Point Math Library V2.5 (Version 2, Update 5). The tests [when built correctly] pass if the word FAIL does not appear in the output. * Other names and brands may be claimed as the property of others. IntelRDFPMathLib20U5/EXAMPLES/RUNLINUXINTEL64_GCC0000755€­ Q00042560000000045615256550700020407 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN LINUX..." rm linuxout a.out ./linuxbuild_gcc > linuxout # grep PASS linuxout cat linuxout grep FAIL linuxout rm linuxout main.c decimal.h echo "END BUILDING AND RUNNING EXAMPLES IN LINUX..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/RUNLINUXINTEL64_ICC0000755€­ Q00042560000000045615256550700020411 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN LINUX..." rm linuxout a.out ./linuxbuild_icc > linuxout # grep PASS linuxout cat linuxout grep FAIL linuxout rm linuxout main.c decimal.h echo "END BUILDING AND RUNNING EXAMPLES IN LINUX..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/RUNLINUXINTEL64_ICX0000755€­ Q00042560000000045615256550700020436 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN LINUX..." rm linuxout a.out ./linuxbuild_icx > linuxout # grep PASS linuxout cat linuxout grep FAIL linuxout rm linuxout main.c decimal.h echo "END BUILDING AND RUNNING EXAMPLES IN LINUX..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/RUNLINUXMACOSINTEL64_CLANG0000755€­ Q00042560000000046015256550700021415 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN LINUX..." rm linuxout a.out ./linuxbuild_clang > linuxout # grep PASS linuxout cat linuxout grep FAIL linuxout rm linuxout main.c decimal.h echo "END BUILDING AND RUNNING EXAMPLES IN LINUX..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/RUNWINDOWSINTEL64_CL.bat0000755€­ Q00042560000000031215256550700021300 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN WINDOWS..." call windowsbuild_cl.bat echo "END BUILDING AND RUNNING EXAMPLES IN WINDOWS..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/RUNWINDOWSINTEL64_CLANG.bat0000755€­ Q00042560000000031515256550700021631 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN WINDOWS..." call windowsbuild_clang.bat echo "END BUILDING AND RUNNING EXAMPLES IN WINDOWS..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/RUNWINDOWSINTEL64_ICL.bat0000755€­ Q00042560000000031315256550700021412 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN WINDOWS..." call windowsbuild_icl.bat echo "END BUILDING AND RUNNING EXAMPLES IN WINDOWS..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/RUNWINDOWSINTEL64_ICX.bat0000755€­ Q00042560000000031315256550700021426 0ustar aakkasintelallecho "BEGIN BUILDING AND RUNNING EXAMPLES IN WINDOWS..." call windowsbuild_icx.bat echo "END BUILDING AND RUNNING EXAMPLES IN WINDOWS..." echo "THE TESTS PASSED IF THE WORD 'FAIL' WAS NOT PRINTED ABOVE" IntelRDFPMathLib20U5/EXAMPLES/decimal.h_0000000644€­ Q00042560000000636315256550700017704 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 000: // 0 arguments passed by value (except fpsf) // 0 rounding mode passed as argument // 0 pointer to status flags passed as argument #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern Decimal128 __bid128_mul ( Decimal128, Decimal128, _IDEC_round, _IDEC_flags * ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/decimal.h_0010000644€­ Q00042560000000702215256550700017676 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 001: // 0 arguments passed by value (except fpsf) // 0 rounding mode passed as argument // 1 status flags in global variable #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif #ifndef BID_THREAD #if defined (_MSC_VER) //Windows #define BID_THREAD __declspec(thread) #else #if !defined(__APPLE__) //Linux, FreeBSD #define BID_THREAD __thread #else //Mac OSX, TBD #define BID_THREAD #endif //Linux or Mac #endif //Windows #endif //BID_THREAD /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern BID_THREAD _IDEC_flags __bid_IDEC_glbflags; extern Decimal128 __bid128_mul ( Decimal128, Decimal128, _IDEC_round ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/decimal.h_0100000644€­ Q00042560000000704415256550700017702 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 010: // 0 arguments passed by value (except fpsf) // 1 rounding mode passed in global variable // 0 pointer to status flags passed as argument #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif #ifndef BID_THREAD #if defined (_MSC_VER) //Windows #define BID_THREAD __declspec(thread) #else #if !defined(__APPLE__) //Linux, FreeBSD #define BID_THREAD __thread #else //Mac OSX, TBD #define BID_THREAD #endif //Linux or Mac #endif //Windows #endif //BID_THREAD /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; extern BID_THREAD _IDEC_round __bid_IDEC_glbround; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern Decimal128 __bid128_mul ( Decimal128, Decimal128, _IDEC_flags * ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/decimal.h_0110000644€­ Q00042560000000707115256550700017703 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 011: // 0 arguments passed by value (except fpsf) // 1 rounding mode passed in global variable // 1 status flags in global variable #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif #ifndef BID_THREAD #if defined (_MSC_VER) //Windows #define BID_THREAD __declspec(thread) #else #if !defined(__APPLE__) //Linux, FreeBSD #define BID_THREAD __thread #else //Mac OSX, TBD #define BID_THREAD #endif //Linux or Mac #endif //Windows #endif //BID_THREAD /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; extern BID_THREAD _IDEC_round __bid_IDEC_glbround; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern BID_THREAD _IDEC_flags __bid_IDEC_glbflags; extern Decimal128 __bid128_mul ( Decimal128, Decimal128 ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/decimal.h_1000000644€­ Q00042560000000637315256550700017706 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 100: // 1 arguments passed by reference // 0 rounding mode passed as argument // 0 pointer to status flags passed as argument #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern void __bid128_mul ( Decimal128 *, Decimal128 *, Decimal128 *, _IDEC_round *, _IDEC_flags * ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/decimal.h_1010000644€­ Q00042560000000703415256550700017702 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 101: // 1 arguments passed by reference // 0 rounding mode passed as argument // 1 status flags in global variable #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif #ifndef BID_THREAD #if defined (_MSC_VER) //Windows #define BID_THREAD __declspec(thread) #else #if !defined(__APPLE__) //Linux, FreeBSD #define BID_THREAD __thread #else //Mac OSX, TBD #define BID_THREAD #endif //Linux or Mac #endif //Windows #endif //BID_THREAD /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern BID_THREAD _IDEC_flags __bid_IDEC_glbflags; extern void __bid128_mul ( Decimal128 *, Decimal128 *, Decimal128 *, _IDEC_round * ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/decimal.h_1100000644€­ Q00042560000000705315256550700017703 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 110: // 1 arguments passed by reference // 1 rounding mode passed in global variable // 0 pointer to status flags passed as argument #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif #ifndef BID_THREAD #if defined (_MSC_VER) //Windows #define BID_THREAD __declspec(thread) #else #if !defined(__APPLE__) //Linux, FreeBSD #define BID_THREAD __thread #else //Mac OSX, TBD #define BID_THREAD #endif //Linux or Mac #endif //Windows #endif //BID_THREAD /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; extern BID_THREAD _IDEC_round __bid_IDEC_glbround; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern void __bid128_mul ( Decimal128 *, Decimal128 *, Decimal128 *, _IDEC_flags * ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/decimal.h_1110000644€­ Q00042560000000707715256550700017712 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 111: // 1 arguments passed by reference // 1 rounding mode passed in global variable // 1 status flags in global variable #if defined(__clang__) #define LX "%llx" #else #ifdef WINDOWS #define LX "%I64x" #else #if defined(HPUX_OS) #define LX "%llx" #else #define LX "%Lx" #endif #endif #endif #ifndef BID_THREAD #if defined (_MSC_VER) //Windows #define BID_THREAD __declspec(thread) #else #if !defined(__APPLE__) //Linux, FreeBSD #define BID_THREAD __thread #else //Mac OSX, TBD #define BID_THREAD #endif //Linux or Mac #endif //Windows #endif //BID_THREAD /* basic decimal floating-point types */ #if defined _MSC_VER #if defined _M_IX86 && !defined __INTEL_COMPILER // Win IA-32, MS compiler #define ALIGN(n) #else #define ALIGN(n) __declspec(align(n)) #endif #else #define ALIGN(n) __attribute__ ((aligned(n))) #endif typedef unsigned int Decimal32; typedef unsigned long long Decimal64; typedef struct ALIGN(16) { unsigned long long w[2]; } Decimal128; /* rounding modes */ typedef enum _IDEC_roundingmode { _IDEC_nearesteven = 0, _IDEC_downward = 1, _IDEC_upward = 2, _IDEC_towardzero = 3, _IDEC_nearestaway = 4, _IDEC_dflround = _IDEC_nearesteven } _IDEC_roundingmode; typedef unsigned int _IDEC_round; extern BID_THREAD _IDEC_round __bid_IDEC_glbround; /* exception flags */ typedef enum _IDEC_flagbits { _IDEC_invalid = 0x01, _IDEC_zerodivide = 0x04, _IDEC_overflow = 0x08, _IDEC_underflow = 0x10, _IDEC_inexact = 0x20, _IDEC_allflagsclear = 0x00 } _IDEC_flagbits; typedef unsigned int _IDEC_flags; // could be a struct with diagnostic info extern BID_THREAD _IDEC_flags __bid_IDEC_glbflags; extern void __bid128_mul ( Decimal128 *, Decimal128 *, Decimal128 * ); #if BID_BIG_ENDIAN #define HIGH_128W 0 #define LOW_128W 1 #else #define HIGH_128W 1 #define LOW_128W 0 #endif IntelRDFPMathLib20U5/EXAMPLES/linuxbuild_clang0000755€­ Q00042560000001040015256550700021012 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 000 **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/clang000libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 001 **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/clang001libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 010 **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/clang010libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 011 **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/clang011libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 100 **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/clang100libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 101 **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/clang101libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 110 **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/clang110libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 111 **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/clang111libbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out rm ../LIBRARY/libbid.a echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 000b **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/clang000blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 001b **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/clang001blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 010b **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/clang010blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 011b **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/clang011blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 100b **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/clang100blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 101b **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/clang101blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 110b **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/clang110blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 111b **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/clang111blibbid.a ../LIBRARY/libbid.a clang $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out rm ../LIBRARY/libbid.a IntelRDFPMathLib20U5/EXAMPLES/linuxbuild_gcc0000755€­ Q00042560000001024015256550700020464 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 000 **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/gcc000libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 001 **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/gcc001libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 010 **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/gcc010libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 011 **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/gcc011libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 100 **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/gcc100libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 101 **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/gcc101libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 110 **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/gcc110libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 111 **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/gcc111libbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out rm ../LIBRARY/libbid.a echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 000b **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/gcc000blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 001b **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/gcc001blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 010b **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/gcc010blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 011b **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/gcc011blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 100b **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/gcc100blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 101b **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/gcc101blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 110b **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/gcc110blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR gcc 111b **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/gcc111blibbid.a ../LIBRARY/libbid.a gcc $1 main.c ../LIBRARY/libbid.a -lm ./a.out rm a.out rm ../LIBRARY/libbid.a IntelRDFPMathLib20U5/EXAMPLES/linuxbuild_icc0000755€­ Q00042560000001020015256550700020462 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 000 **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/icc000libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 001 **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/icc001libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 010 **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/icc010libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 011 **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/icc011libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 100 **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/icc100libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 101 **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/icc101libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 110 **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/icc110libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 111 **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/icc111libbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out rm ../LIBRARY/libbid.a echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 000b **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/icc000blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 001b **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/icc001blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 010b **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/icc010blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 011b **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/icc011blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 100b **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/icc100blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 101b **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/icc101blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 110b **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/icc110blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icc 111b **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/icc111blibbid.a ../LIBRARY/libbid.a icc $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out rm ../LIBRARY/libbid.a IntelRDFPMathLib20U5/EXAMPLES/linuxbuild_icx0000755€­ Q00042560000001020015256550700020507 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 000 **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/icx000libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 001 **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/icx001libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 010 **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/icx010libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 011 **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/icx011libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 100 **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/icx100libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 101 **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/icx101libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 110 **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/icx110libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 111 **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/icx111libbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out rm ../LIBRARY/libbid.a echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 000b **************************" echo "" echo "" cp main.c_000 main.c cp decimal.h_000 decimal.h cp ../LIBRARY/icx000blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 001b **************************" echo "" echo "" cp main.c_001 main.c cp decimal.h_001 decimal.h cp ../LIBRARY/icx001blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 010b **************************" echo "" echo "" cp main.c_010 main.c cp decimal.h_010 decimal.h cp ../LIBRARY/icx010blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 011b **************************" echo "" echo "" cp main.c_011 main.c cp decimal.h_011 decimal.h cp ../LIBRARY/icx011blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 100b **************************" echo "" echo "" cp main.c_100 main.c cp decimal.h_100 decimal.h cp ../LIBRARY/icx100blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 101b **************************" echo "" echo "" cp main.c_101 main.c cp decimal.h_101 decimal.h cp ../LIBRARY/icx101blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 110b **************************" echo "" echo "" cp main.c_110 main.c cp decimal.h_110 decimal.h cp ../LIBRARY/icx110blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 111b **************************" echo "" echo "" cp main.c_111 main.c cp decimal.h_111 decimal.h cp ../LIBRARY/icx111blibbid.a ../LIBRARY/libbid.a icx $1 main.c ../LIBRARY/libbid.a ./a.out rm a.out rm ../LIBRARY/libbid.a IntelRDFPMathLib20U5/EXAMPLES/main.c_0000000644€­ Q00042560000001240015256550700017212 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 000: // 0 arguments passed by value (except fpsf) // 0 rounding mode passed as argument // 0 pointer to status flags passed as argument #include #include #include "decimal.h" int main () { Decimal128 x, y, z; _IDEC_round my_rnd_mode = _IDEC_dflround; _IDEC_flags my_fpsf = _IDEC_allflagsclear; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 my_rnd_mode = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 z = __bid128_mul (x, y, my_rnd_mode, &my_fpsf); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || my_fpsf != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=3040000000000000 0000000000000006 my_fpsf=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 000 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 000 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y, my_rnd_mode, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 000 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 000 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_towardzero; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y, my_rnd_mode, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 000 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 000 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/main.c_0010000644€­ Q00042560000001263015256550700017220 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 001: // 0 arguments passed by value (except fpsf) // 0 rounding mode passed as argument // 1 status flags in global variable #include #include #include "decimal.h" int main () { Decimal128 x, y, z; _IDEC_round my_rnd_mode = _IDEC_dflround; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 my_rnd_mode = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 z = __bid128_mul (x, y, my_rnd_mode); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || __bid_IDEC_glbflags != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=3040000000000000 0000000000000006 " "__bid_IDEC_glbflags=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 001 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 001 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y, my_rnd_mode); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 001 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 001 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_towardzero; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y, my_rnd_mode); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 001 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 001 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/main.c_0100000644€­ Q00042560000001231615256550700017221 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 010: // 0 arguments passed by value (except fpsf) // 1 rounding mode passed in a global variable // 0 pointer to status flags passed as argument #include #include #include "decimal.h" int main () { Decimal128 x, y, z; _IDEC_flags my_fpsf = _IDEC_allflagsclear; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 __bid_IDEC_glbround = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 z = __bid128_mul (x, y, &my_fpsf); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || my_fpsf != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=3040000000000000 0000000000000006 my_fpsf=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 010 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 010 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 010 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 010 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_towardzero; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 010 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 010 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/main.c_0110000644€­ Q00042560000001254415256550700017225 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 011: // 0 arguments passed by value (except fpsf) // 1 rounding mode passed in global variable // 1 status flags in global variable #include #include #include "decimal.h" int main () { Decimal128 x, y, z; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 __bid_IDEC_glbround = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 z = __bid128_mul (x, y); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || __bid_IDEC_glbflags != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=3040000000000000 0000000000000006 " "__bid_IDEC_glbflags=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 011 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 011 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 011 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 011 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_towardzero; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits z = __bid128_mul (x, y); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 011 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 011 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/main.c_1000000644€­ Q00042560000001237715256550700017230 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 100: // 1 arguments passed by reference // 0 rounding mode passed as argument // 0 pointer to status flags passed as argument #include #include #include "decimal.h" int main () { Decimal128 x, y, z; _IDEC_round my_rnd_mode = _IDEC_dflround; _IDEC_flags my_fpsf = _IDEC_allflagsclear; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 my_rnd_mode = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 __bid128_mul (&z, &x, &y, &my_rnd_mode, &my_fpsf); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || my_fpsf != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=3040000000000000 0000000000000006 my_fpsf=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 100 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 100 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y, &my_rnd_mode, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 100 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 100 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_towardzero; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y, &my_rnd_mode, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 100 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 100 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/main.c_1010000644€­ Q00042560000001263515256550700017226 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 101: // 1 arguments passed by value reference // 0 rounding mode passed as argument // 1 status flags in global variable #include #include #include "decimal.h" int main () { Decimal128 x, y, z; _IDEC_round my_rnd_mode = _IDEC_dflround; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 my_rnd_mode = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 __bid128_mul (&z, &x, &y, &my_rnd_mode); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || __bid_IDEC_glbflags != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=3040000000000000 0000000000000006 " "__bid_IDEC_glbflags=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 101 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 101 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y, &my_rnd_mode); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 101 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 101 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint my_rnd_mode = _IDEC_towardzero; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y, &my_rnd_mode); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 101 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 101 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/main.c_1100000644€­ Q00042560000001231215256550700017216 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 110: // 1 arguments passed by reference // 1 rounding mode passed in a global variable // 0 pointer to status flags passed as argument #include #include #include "decimal.h" int main () { Decimal128 x, y, z; _IDEC_flags my_fpsf = _IDEC_allflagsclear; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 __bid_IDEC_glbround = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 __bid128_mul (&z, &x, &y, &my_fpsf); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || my_fpsf != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=3040000000000000 0000000000000006 my_fpsf=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 110 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 110 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_nearesteven; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 110 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 110 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_towardzero; my_fpsf = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y, &my_fpsf); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || my_fpsf != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" my_fpsf=%x\n", z.w[HIGH_128W], z.w[LOW_128W], my_fpsf); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 my_fpsf=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 110 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 110 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/main.c_1110000644€­ Q00042560000001254015256550700017222 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ // 111: // 1 arguments passed by reference // 1 rounding mode passed in global variable // 1 status flags in global variable #include #include #include "decimal.h" int main () { Decimal128 x, y, z; printf ("Begin Decimal Floating-Point Sanity Check\n"); // 2 * 3 = 6 __bid_IDEC_glbround = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x3040000000000000ull; x.w[LOW_128W] = 0x0000000000000002ull; // x = 2 y.w[HIGH_128W] = 0x3040000000000000ull; y.w[LOW_128W] = 0x0000000000000003ull; // y = 3 __bid128_mul (&z, &x, &y); if (z.w[HIGH_128W] != 0x3040000000000000ull || z.w[LOW_128W] != 0x0000000000000006ull || __bid_IDEC_glbflags != _IDEC_allflagsclear) { printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=3040000000000000 0000000000000006 " "__bid_IDEC_glbflags=00000000\n"); printf ("ERROR: TEST CASE 1 FOR __bid128_mul 111 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 1 FOR __bid128_mul 111 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_nearesteven; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000051 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec33ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000051 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec33 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 2 FOR __bid128_mul 111 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 2 FOR __bid128_mul 111 () PASSED\n"); } // (x * y)RN is inexact and > MidPoint __bid_IDEC_glbround = _IDEC_towardzero; __bid_IDEC_glbflags = _IDEC_allflagsclear; z.w[HIGH_128W] = 0xbaddbaddbaddbaddull; z.w[LOW_128W] = 0xbaddbaddbaddbaddull; x.w[HIGH_128W] = 0x310800000000021eull; x.w[LOW_128W] = 0x19e0c9bab235ede1ull; // x = 9999999999999999340001 * 10^100; q1 = 22 <- 128 bits y.w[HIGH_128W] = 0x310800000000d3c2ull; y.w[LOW_128W] = 0x1bcecced9c69132full; // y = 999999999999999923000111 * 10^100; q2 = 24 <- 128 bits __bid128_mul (&z, &x, &y); // 9999999999999999340001 * 10^100 * 999999999999999923000111 * 10^100 =(RN) // 9999999999999998570002110000000050 * 10^200 if (z.w[HIGH_128W] != 0x31e9ed09bead87c0ull || z.w[LOW_128W] != 0x23b52ee2d8fdec32ull || __bid_IDEC_glbflags != _IDEC_inexact) { // 9999999999999998570002110000000050 * 10^212, inexact printf ("RECEIVED z="LX" "LX" __bid_IDEC_glbflags=%x\n", z.w[HIGH_128W], z.w[LOW_128W], __bid_IDEC_glbflags); printf ("EXPECTED z=31e9ed09bead87c0 23b52ee2d8fdec32 " "__bid_IDEC_glbflags=00000020\n"); printf ("ERROR: TEST CASE 3 FOR __bid128_mul 111 () FAILED\n\n"); exit (1); } else { printf ("TEST CASE 3 FOR __bid128_mul 111 () PASSED\n"); } printf ("End Decimal Floating-Point Sanity Check\n"); } IntelRDFPMathLib20U5/EXAMPLES/windowsbuild_cl.bat0000755€­ Q00042560000001100315256550700021424 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 000 **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\cl000libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 001 **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\cl001libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 010 **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\cl010libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 011 **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\cl011libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 100 **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\cl100libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 101 **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\cl101libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 110 **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\cl110libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 111 **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\cl111libbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 000b **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\cl000blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 001b **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\cl001blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 010b **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\cl010blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 011b **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\cl011blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 100b **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\cl100blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 101b **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\cl101blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 110b **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\cl110blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR cl 111b **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\cl111blibbid.lib ..\LIBRARY\libbid.lib cl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib IntelRDFPMathLib20U5/EXAMPLES/windowsbuild_clang.bat0000755€­ Q00042560000001126315256550700022122 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 000 **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\clang000libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 001 **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\clang001libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 010 **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\clang010libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 011 **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\clang011libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 100 **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\clang100libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 101 **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\clang101libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 110 **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\clang110libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 111 **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\clang111libbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 000b **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\clang000blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 001b **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\clang001blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 010b **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\clang010blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 011b **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\clang011blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 100b **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\clang100blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 101b **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\clang101blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 110b **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\clang110blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR clang 111b **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\clang111blibbid.lib ..\LIBRARY\libbid.lib clang -o main.exe main.c ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib IntelRDFPMathLib20U5/EXAMPLES/windowsbuild_icl.bat0000755€­ Q00042560000001106315256550700021603 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 000 **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\icl000libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 001 **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\icl001libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 010 **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\icl010libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 011 **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\icl011libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 100 **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\icl100libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 101 **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\icl101libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 110 **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\icl110libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 111 **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\icl111libbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 000b **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\icl000blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 001b **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\icl001blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 010b **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\icl010blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 011b **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\icl011blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 100b **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\icl100blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 101b **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\icl101blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 110b **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\icl110blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icl 111b **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\icl111blibbid.lib ..\LIBRARY\libbid.lib icl main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib IntelRDFPMathLib20U5/EXAMPLES/windowsbuild_icx.bat0000755€­ Q00042560000001106315256550700021617 0ustar aakkasintelallecho "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 000 **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\icx000libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 001 **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\icx001libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 010 **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\icx010libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 011 **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\icx011libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 100 **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\icx100libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 101 **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\icx101libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 110 **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\icx110libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 111 **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\icx111libbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 000b **************************" echo "" echo "" copy /Y main.c_000 main.c copy /Y decimal.h_000 decimal.h copy /Y ..\LIBRARY\icx000blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 001b **************************" echo "" echo "" copy /Y main.c_001 main.c copy /Y decimal.h_001 decimal.h copy /Y ..\LIBRARY\icx001blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 010b **************************" echo "" echo "" copy /Y main.c_010 main.c copy /Y decimal.h_010 decimal.h copy /Y ..\LIBRARY\icx010blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 011b **************************" echo "" echo "" copy /Y main.c_011 main.c copy /Y decimal.h_011 decimal.h copy /Y ..\LIBRARY\icx011blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 100b **************************" echo "" echo "" copy /Y main.c_100 main.c copy /Y decimal.h_100 decimal.h copy /Y ..\LIBRARY\icx100blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 101b **************************" echo "" echo "" copy /Y main.c_101 main.c copy /Y decimal.h_101 decimal.h copy /Y ..\LIBRARY\icx101blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 110b **************************" echo "" echo "" copy /Y main.c_110 main.c copy /Y decimal.h_110 decimal.h copy /Y ..\LIBRARY\icx110blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe echo "" echo "" echo "***************** RUNNING EXAMPLE FOR icx 111b **************************" echo "" echo "" copy /Y main.c_111 main.c copy /Y decimal.h_111 decimal.h copy /Y ..\LIBRARY\icx111blibbid.lib ..\LIBRARY\libbid.lib icx main.c /DWINDOWS ..\LIBRARY\libbid.lib %1 main.exe del main.exe main.c decimal.h del ..\LIBRARY\libbid.lib IntelRDFPMathLib20U5/LIBRARY/0000755€­ Q00042560000000000015256550700015434 5ustar aakkasintelallIntelRDFPMathLib20U5/LIBRARY/README0000755€­ Q00042560000000647115256550700016327 0ustar aakkasintelallTo build the Intel(R) Decimal Floating-Point Math Library V2.5 (Version 2, Update 5) (conforming to the IEEE Standard 754-2019 for Floating-Point Arithmetic) on processors that are implementations of the Intel(R) 64 Architecture: In Linux* with the icx (Intel(R) Compiler 2025.0 or newer) or gcc: make clean make CC=icx CALL_BY_REF=0 GLOBAL_RND=0 GLOBAL_FLAGS=0 UNCHANGED_BINARY_FLAGS=0 - CC can be icx, icc, gcc, clang - CALL_BY_REF, GLOBAL_RND, GLOBAL_FLAGS, UNCHANGED_BINARY_FLAGS can be any of 0000, 0001, ... , 1111 Big-endian builds are possible, but will require additional command line parameters In Windows** with icx (Intel(R) C++ Compiler 2025.0 or newer) or cl (Microsoft Visual C++ Compiler**): nmake clean nmake -fmakefile.mak CC=icx CALL_BY_REF=0 GLOBAL_RND=0 GLOBAL_FLAGS=0 UNCHANGED_BINARY_FLAGS=0 - CC can be cl, icx, icl - CALL_BY_REF, GLOBAL_RND, GLOBAL_FLAGS, UNCHANGED_BINARY_FLAGS can be any of 0000, 0001, ... , 1111 - [g]make, which stands for a GNU make-compatible make program (e.g. make from cygwin) may also be used Note: The scripts and makefiles provided here may need adjustments, depending on the environment in which they are used; for example if moving files from Windows to Linux, running dos2unix on the Linux script files may be necessary. The makefiles currently support these environments, but can be extended to support additional ones: Linux, Windows, MacOS. See makefile.iml_head for more information. Note: ===== For other operating systems and architecture combinations see for example the following command files (or other RUN* command files provided here), as well as any command files invoked from these ones: RUNLINUXINTEL64_ICX RUNWINDOWSINTEL64_CL.bat These command files build the Intel(R) Decimal Floating-Point Math Library. Changes may be necessary in certain environments. Note that all the necessary versions of the Intel(R) Decimal Floating-Point Math Library have to be built in this directory prior to executing the similar RUN* command in either of ../TESTS/ or ../EXAMPLES/. Check that all the expected *.a files (or *.lib in Windows) have been created prior to building and running the tests or examples from ../TESTS/ or ../EXAMPLES/. Note: ===== If the makefile provided here is not used, the parameter passing method and local/global rounding mode and status flags may be selected by editing bid_conf.h: Parameter passing is determined by an environment variable in bid_conf.h: - by value: #define DECIMAL_CALL_BY_REFERENCE 0 - by reference: #define DECIMAL_CALL_BY_REFERENCE 1 Global variables are determined by two environment variables in bid_conf.h: - rnd_mode passed as parameter #define DECIMAL_GLOBAL_ROUNDING 0 - rnd_mode global #define DECIMAL_GLOBAL_ROUNDING 1 - status flags *pfpsf passed as parameter #define DECIMAL_GLOBAL_EXCEPTION_FLAGS 0 - status flags *pfpsf global #define DECIMAL_GLOBAL_EXCEPTION_FLAGS 1 For more information see ../README * Other names and brands may be claimed as the property of others. ** Microsoft, Windows, and the Windows logo are trademarks, or registered trademarks of Microsoft Corporation in the United States and/or other countries IntelRDFPMathLib20U5/LIBRARY/RUNLINUXINTEL64_GCC0000755€­ Q00042560000000015315256550700020267 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN LINUX..." rm *.a ./linuxbuild_gcc echo "END BUILDING LIBRARY IN LINUX..." IntelRDFPMathLib20U5/LIBRARY/RUNLINUXINTEL64_ICC0000755€­ Q00042560000000015315256550700020271 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN LINUX..." rm *.a ./linuxbuild_icc echo "END BUILDING LIBRARY IN LINUX..." IntelRDFPMathLib20U5/LIBRARY/RUNLINUXINTEL64_ICX0000755€­ Q00042560000000015315256550700020316 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN LINUX..." rm *.a ./linuxbuild_icx echo "END BUILDING LIBRARY IN LINUX..." IntelRDFPMathLib20U5/LIBRARY/RUNLINUXMACOSINTEL64_CLANG0000755€­ Q00042560000000015515256550700021304 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN LINUX..." rm *.a ./linuxbuild_clang echo "END BUILDING LIBRARY IN LINUX..." IntelRDFPMathLib20U5/LIBRARY/RUNWINDOWSINTEL64_CL.bat0000755€­ Q00042560000000017115256550700021171 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN WINDOWS..." del *.lib call windowsbuild_cl.bat echo "END BUILDING LIBRARY IN WINDOWS..." IntelRDFPMathLib20U5/LIBRARY/RUNWINDOWSINTEL64_CLANG.bat0000755€­ Q00042560000000017415256550700021522 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN WINDOWS..." del *.lib call windowsbuild_clang.bat echo "END BUILDING LIBRARY IN WINDOWS..." IntelRDFPMathLib20U5/LIBRARY/RUNWINDOWSINTEL64_ICL.bat0000755€­ Q00042560000000017215256550700021303 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN WINDOWS..." del *.lib call windowsbuild_icl.bat echo "END BUILDING LIBRARY IN WINDOWS..." IntelRDFPMathLib20U5/LIBRARY/RUNWINDOWSINTEL64_ICX.bat0000755€­ Q00042560000000017215256550700021317 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN WINDOWS..." del *.lib call windowsbuild_icx.bat echo "END BUILDING LIBRARY IN WINDOWS..." IntelRDFPMathLib20U5/LIBRARY/RUNWINDOWS_nmake.bat0000755€­ Q00042560000000022715256550700021022 0ustar aakkasintelallecho "BEGIN BUILDING LIBRARY IN WINDOWS..." del *.lib call windowsbuild_nmake.bat -fmakefile.mak echo "END BUILDING LIBRARY IN WINDOWS..." IntelRDFPMathLib20U5/LIBRARY/float128/0000755€­ Q00042560000000000015256550700016774 5ustar aakkasintelallIntelRDFPMathLib20U5/LIBRARY/float128/architecture.h0000644€­ Q00042560000004002615256550700021631 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ #ifndef ARCHITECTURE_H #define ARCHITECTURE_H /* ** for historic reasons, map ia64 architecture to merced and ct architecture to amd64 */ #if (defined(ia64) || defined(__ia64) || defined(__ia64__)) && !defined(HPUX_OS) # undef merced # define merced #endif #if defined(ct) || defined(efi2) # undef _M_AMD64 # define _M_AMD64 #endif #if defined(HPUX_OS) #define sparc #endif #if (defined(vax) || defined(VAX)) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define vax 1 # define ARCHITECTURE vax # undef LOCAL_DATA # undef STATIC_ROUNDING_MODES # undef DYNAMIC_ROUNDING_MODES # undef DENORMS_EMULATED # undef SEPARATE_FLOAT_REGS # undef MULTIPLE_ISSUE # undef UNSIGNED_TO_FLOAT # undef UNSIGNED_MULTIPLY # define ENDIANESS little_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_int # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # define BITS_PER_LONG 32 # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 128 # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # undef INT_64 # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # undef U_INT_64 # undef U_INT_128 # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 #elif (defined(mips) || defined(MIPS)) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define mips 2 # define ARCHITECTURE mips # define LOCAL_DATA 1 # undef STATIC_ROUNDING_MODES # define DYNAMIC_ROUNDING_MODES 1 # define DENORMS_EMULATED 1 # define SEPARATE_FLOAT_REGS 1 # undef MULTIPLE_ISSUE # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS little_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_flt # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # define BITS_PER_LONG 32 # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 64 # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # undef INT_64 # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # undef U_INT_64 # undef U_INT_128 # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 #elif (defined(hp_pa) || defined(HP_PA) || defined(__hppa) || defined(__HPPA)) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define hp_pa 3 # define ARCHITECTURE hp_pa # define LOCAL_DATA 1 # undef STATIC_ROUNDING_MODES # define DYNAMIC_ROUNDING_MODES 1 # define DENORMS_EMULATED 1 # define SEPARATE_FLOAT_REGS 1 # undef MULTIPLE_ISSUE # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS big_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_flt # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # define BITS_PER_LONG 32 # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 128 # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # undef INT_64 # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # undef U_INT_64 # undef U_INT_128 # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 #elif (defined(cray) || defined(CRAY)) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define cray 4 # define ARCHITECTURE cray # undef LOCAL_DATA 1 # undef STATIC_ROUNDING_MODES # undef DYNAMIC_ROUNDING_MODES # define DENORMS_EMULATED ??? # define SEPARATE_FLOAT_REGS 1 # undef MULTIPLE_ISSUE # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS big_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_int # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # define BITS_PER_LONG 64 # define BITS_PER_FLOAT 64 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 128 # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # define INT_64 signed long # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # define U_INT_64 unsigned long # undef U_INT_128 # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 #elif ( defined(alpha) || defined(ALPHA) \ || defined(__alpha) || defined(__ALPHA) \ || defined(_ALPHA_) || defined(__Alpha_AXP) ) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define alpha 5 # define ARCHITECTURE alpha # define LOCAL_DATA 1 # define STATIC_ROUNDING_MODES 1 # undef DYNAMIC_ROUNDING_MODES # define DENORMS_EMULATED 1 # define SEPARATE_FLOAT_REGS 1 # define MULTIPLE_ISSUE 1 # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS little_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_flt # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 128 # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # if defined(__32BITS) # define BITS_PER_LONG 32 # else # define BITS_PER_LONG 64 # endif # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # undef U_INT_128 # if ((OP_SYSTEM == osf) || (OP_SYSTEM == linux)) # define INT_64 signed long # define U_INT_64 unsigned long # else # define INT_64 signed __int64 # define U_INT_64 unsigned __int64 # endif # if defined(__32BITS) # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 # else # define WORD INT_64 # define U_WORD U_INT_64 # define BITS_PER_WORD 64 # define HALF_WORD INT_32 # define U_HALF_WORD U_INT_32 # define BITS_PER_HALF_WORD 32 # endif #elif (defined(_M_IX86) || defined(ix86) || defined(IX86) || defined(ia32) ) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define ix86 6 # define ARCHITECTURE ix86 # define LOCAL_DATA 1 # undef STATIC_ROUNDING_MODES # define DYNAMIC_ROUNDING_MODES 1 # define DENORMS_EMULATED 1 # define SEPARATE_FLOAT_REGS 1 # undef MULTIPLE_ISSUE # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS little_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_flt # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # define BITS_PER_LONG 32 # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # if !defined(LONG_DOUBLE_128) # define BITS_PER_LONG_DOUBLE 80 # else # define BITS_PER_LONG_DOUBLE 128 # define LONG_DOUBLE_128_TYPE _Quad # endif # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # define INT_64 long long # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # define U_INT_64 unsigned long long # undef U_INT_128 # if 0 # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # else # define WORD INT_64 # define U_WORD U_INT_64 # define BITS_PER_WORD 64 # endif # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 #elif ( defined(merced) || defined(MERCED)) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define merced 7 # define ARCHITECTURE merced # define LOCAL_DATA 1 # define STATIC_ROUNDING_MODES 1 # undef DYNAMIC_ROUNDING_MODES # define DENORMS_EMULATED 1 # define SEPARATE_FLOAT_REGS 1 # define MULTIPLE_ISSUE 1 # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS little_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_flt # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 128 # define LONG_DOUBLE_128_TYPE _Quad # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # define BITS_PER_LONG 64 # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # undef U_INT_128 # if ( COMPILER == gnu_cc ) # define INT_64 signed long # define U_INT_64 unsigned long # else # define INT_64 signed __int64 # define U_INT_64 unsigned __int64 # endif # define WORD INT_64 # define U_WORD U_INT_64 # define BITS_PER_WORD 64 # define HALF_WORD INT_32 # define U_HALF_WORD U_INT_32 # define BITS_PER_HALF_WORD 32 #elif (defined(__sparc) || defined(sparc)) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define sparc 9 # define ARCHITECTURE sparc # define LOCAL_DATA 1 # undef STATIC_ROUNDING_MODES # define DYNAMIC_ROUNDING_MODES 1 # define DENORMS_EMULATED 1 # define SEPARATE_FLOAT_REGS 1 # undef MULTIPLE_ISSUE # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS big_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_flt # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # define BITS_PER_LONG 32 # define BITS_PER_ADDRESS 32 # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 128 # define LONG_DOUBLE_128_TYPE _Quad # if ( COMPILER == gnu_cc ) # define __INT_64 long long # else # define __INT_64 __int64 # endif # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # define INT_64 signed __INT_64 # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # define U_INT_64 unsigned __INT_64 # undef U_INT_128 # if 0 /* Setup for 32-bits */ # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 # else /* Setup for 64 bits */ # define WORD INT_64 # define U_WORD U_INT_64 # define BITS_PER_WORD 64 # define HALF_WORD INT_32 # define U_HALF_WORD U_INT_32 # define BITS_PER_HALF_WORD 32 # endif #elif (defined(_M_AMD64)) # undef vax # undef mips # undef hp_pa # undef cray # undef alpha # undef ix86 # undef merced # undef amd64 # undef sparc # define amd64 8 # define ARCHITECTURE amd64 # define LOCAL_DATA 1 # undef STATIC_ROUNDING_MODES # define DYNAMIC_ROUNDING_MODES 1 # define DENORMS_EMULATED 1 # define SEPARATE_FLOAT_REGS 1 # undef MULTIPLE_ISSUE # undef UNSIGNED_TO_FLOAT # define UNSIGNED_MULTIPLY 1 # define ENDIANESS little_endian # define SCALE_METHOD by_int # define CVT_TO_HI_LO_METHOD by_flt # define BITS_PER_CHAR 8 # define BITS_PER_SHORT 16 # define BITS_PER_INT 32 # if (OP_SYSTEM == linux) # define BITS_PER_LONG 64 # else # define BITS_PER_LONG 32 # endif # define BITS_PER_ADDRESS 64 # define BITS_PER_FLOAT 32 # define BITS_PER_DOUBLE 64 # define BITS_PER_LONG_DOUBLE 128 # define LONG_DOUBLE_128_TYPE _Quad # if ( COMPILER == gnu_cc ) # define __INT_64 long long # else # define __INT_64 __int64 # endif # define INT_8 signed char # define INT_16 signed short # define INT_32 signed int # define INT_64 signed __INT_64 # undef INT_128 # define U_INT_8 unsigned char # define U_INT_16 unsigned short # define U_INT_32 unsigned int # define U_INT_64 unsigned __INT_64 # undef U_INT_128 # if 0 /* Setup for 32-bits */ # define WORD INT_32 # define U_WORD U_INT_32 # define BITS_PER_WORD 32 # define HALF_WORD INT_16 # define U_HALF_WORD U_INT_16 # define BITS_PER_HALF_WORD 16 # else /* Setup for 64 bits */ # define WORD INT_64 # define U_WORD U_INT_64 # define BITS_PER_WORD 64 # define HALF_WORD INT_32 # define U_HALF_WORD U_INT_32 # define BITS_PER_HALF_WORD 32 # endif #else # error Architecture must be specified. #endif #if !defined(BITS_PER_ADDRESS) # define BITS_PER_ADDRESS BITS_PER_LONG #endif #if !defined(ADDRESS) # define ADDRESS PASTE(U_INT_, BITS_PER_ADDRESS) #endif #undef little_endian #undef big_endian #define little_endian 0 #define big_endian 1 #undef by_int #undef by_flt #define by_int 0 #define by_flt 1 #if (ARCHITECTURE == vax) # define FLOAT_TYPES VAX_TYPES #elif ((ARCHITECTURE == alpha) || (ARCHITECTURE == merced)) && (OP_SYSTEM == vms) # define FLOAT_TYPES (VAX_TYPES + IEEE_TYPES) #else # define FLOAT_TYPES IEEE_TYPES #endif #endif /* ARCHITECTURE_H */ IntelRDFPMathLib20U5/LIBRARY/float128/assert.h0000644€­ Q00042560000000365115256550700020453 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ #ifndef ASSERT #if (DPML_DEBUG) #define ASSERT(x) { \ if (!(x)) { \ printf("Assertion %s failed: file %s line %d\n", \ STR(x), __FILE__, __LINE__); \ } \ } #else #define ASSERT(x) #endif /* DPML_DEBUG */ #endif /* defined ASSERT */ IntelRDFPMathLib20U5/LIBRARY/float128/build.h0000644€­ Q00042560000001431415256550700020247 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ #ifndef BUILD_H #define BUILD_H // ============================================================================= // The intel compiler defines __GNUC__ which causes incorrect type definitions. // to be chosen. Detect the situation here and correct so we get a consistent // set of type definitions // ============================================================================= #if defined(__GNUC__) && (defined(__ICC) || defined(__ECC)) # undef __GNUC__ #endif // ============================================================================= // Since Intel quad names have a leading '__', the default single precision // names are incorrect, so make sure the log2 function is correctly defined // for dpml_ux_bessel.c // ============================================================================= #define S_LOG2_NAME log2f // ============================================================================= // Select calling interface to the DPML routines // ============================================================================= #if !defined USE_NATIVE_QUAD_TYPE # define USE_NATIVE_QUAD_TYPE 0 #endif #ifdef T_FLOAT #define _Quad long double #else #if USE_NATIVE_QUAD_TYPE // ===================================================================== // On intel platforms, return quad values and arguments are "by-value" // ===================================================================== # define EMT64_LINUX_QUAD_INTERFACE #define ADD_BASE_NAME _add_ #define CMP_BASE_NAME _cmp_ #define DIV_BASE_NAME _div_ #define MUL_BASE_NAME _mul_ #define NEG_BASE_NAME _neg_ #define SUB_BASE_NAME _sub_ #define ITOF_BASE_NAME _itof_ // ===================================================================== // Intel quad precision names end in q rather than l and have a '__' // prefix // ===================================================================== #ifndef F_NAME_SUFFIX # define F_NAME_SUFFIX q #endif #ifndef F_NAME_PREFIX # define F_NAME_PREFIX __ #endif #else // ===================================================================== // Use the defualt "pass-by-reference" interface. But this case we need // to provide some type defintion for the _Quad type. // ===================================================================== #define _Quad long double #define __int64 long long #define HYPOT_BASE_NAME hypot #define NEXTAFTER_BASE_NAME nextafter #ifndef F_NAME_SUFFIX # define F_NAME_SUFFIX DPML_NULL_MACRO_TOKEN #endif #ifndef F_NAME_PREFIX # define F_NAME_PREFIX bid_f128_ #endif #ifndef INTERNAL_PREFIX # define INTERNAL_PREFIX __dpml_bid_ #endif #endif #endif #ifndef INTERNAL_PREFIX # define INTERNAL_PREFIX __dpml_bid_ #endif #ifndef TABLE_PREFIX # define TABLE_PREFIX __dpml_bid_ #endif // ============================================================================= // Set up the appropriate exception handling macros // ============================================================================= #define IEEE_FLOATING 1 #define COMPATIBILITY_MODE 1 #define EXCEPTION_INTERFACE_RECEIVE receive_exception_record #define EXCEPTION_INTERFACE_SEND send_exception_record #define __DPML_EXCPT_ENVIRONMENT ENABLE_NO_ERROR #define DPML_GET_FPCSR(fpcsr) fpcsr = 0 #define DPML_SET_FPCSR(fpcsr) #define FPCSR_STICKY_BITS(x) 0 // ============================================================================= // Force long double to be 128 bits // ============================================================================= #define LONG_DOUBLE_128 // ============================================================================= // Now generic system stuff // ============================================================================= #if defined(__linux__) && defined(__ICC) /* Linux, Proton compiler(i.e. IA32) */ #pragma const_seg(".rodata") #endif #if (defined(__ICC) || defined(__ICL) || defined(__ECC) || defined(__ECL)) && 0 # pragma warning( disable : 68 ) /* #68: integer conversion resulted in a change of sign */ # pragma warning( disable : 186 ) /* #186: pointless comparison of unsigned integer with zero */ # pragma warning( disable : 1572 ) /* #1572: floating-point equality and inequality comparisons are unreliable */ #endif #endif /* BUILD_H */ IntelRDFPMathLib20U5/LIBRARY/float128/compiler.h0000644€­ Q00042560000003455315256550700020771 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ #ifndef COMPILER_H #define COMPILER_H #undef INLINE #define INLINE_DIRECTIVE #if ((defined(epc_cc) || defined(EPC_CC)) || defined(ecc) || defined(__ECC) || \ defined(__ICC) || defined(icc) ) # define __ecc__ #endif #if (defined(dec_cc) || defined(DEC_CC) || defined(__DECC)) # define __xxx_dec_cc #elif (defined(mips_cc) || defined(MIPS_CC) || defined(_CFE) \ || (defined(host_mips) && !defined(__GNUC__)) ) # define __xxx_mips_cc #elif (defined(vax_cc) || defined(VAX_CC) \ || defined(vaxc) || defined(VAXC) || defined(__VAXC)) # define __xxx_vax_cc #elif (defined(msc_cc) || defined(MSC_CC) || defined(_MSC_VER)) && !defined(__ICL) # define __xxx_msc_cc #elif (defined(hp_cc) || defined(HP_CC)) # define __xxx_hp_cc #elif ((defined(gnu_cc) || defined(GNU_CC) || defined(__GNUC__)) \ && !defined(__ecc__)) # define __xxx_gnu_cc #elif defined(__ecc__) # define __xxx_intel_icc #elif ( defined(__ICL) || defined(icl) ) # define __xxx_intel_icl #else # define __xxx_just_cc #endif #undef dec_cc #undef gnu_cc #undef mips_cc #undef vax_cc #undef msc_cc #undef hp_cc #undef intel_icc #undef intel_icl #undef just_cc #if defined __xxx_dec_cc # undef __xxx_dec_cc 1 # define dec_cc 1 # define COMPILER dec_cc # define INLINE # undef INLINE_DIRECTIVE # define INLINE_DIRECTIVE static #elif defined __xxx_mips_cc # undef __xxx_mips_cc # define mips_cc 2 # define COMPILER mips_cc #elif defined __xxx_vax_cc # undef __xxx_vax_cc # define vax_cc 3 # define COMPILER vax_cc #elif defined __xxx_msc_cc # undef __xxx_msc_cc # define msc_cc 4 # define COMPILER msc_cc #elif defined __xxx_hp_cc # undef __xxx_hp_cc # define hp_cc 5 # define COMPILER hp_cc #elif defined __xxx_gnu_cc # define gnu_cc 6 # define COMPILER gnu_cc # define INLINE # undef INLINE_DIRECTIVE # define INLINE_DIRECTIVE static __inline__ #elif defined __xxx_intel_icc # undef __xxx_intel_icc # define intel_icc 7 # define COMPILER intel_icc #elif defined __xxx_intel_icl # undef __xxx_intel_icl # define intel_icl 8 # define COMPILER intel_icl #else # undef __xxx_just_cc # define just_cc 9 # define COMPILER just_cc #endif #define NULL_MACRO(a) a #define tmp_TRY 0 #define tmp_THIS + 0 #define tmp_TRYtmp_THIS 1 #ifndef GLUE # define GLUE(a,b) a/**/b # if (GLUE(tmp_TRY,tmp_THIS) != tmp_TRYtmp_THIS) # undef GLUE # endif #endif #ifndef GLUE # define GLUE(a,b) a ## b # if (GLUE(tmp_TRY,tmp_THIS) != tmp_TRYtmp_THIS) # undef GLUE # endif #endif #ifndef GLUE # define GLUE(a,b) NULL_MACRO(a)b # if (GLUE(tmp_TRY,tmp_THIS) != tmp_TRYtmp_THIS) # undef GLUE # endif #endif #ifndef GLUE # error GLUE macro not defined #endif #undef tmp_TRY #undef tmp_THIS #undef tmp_TRYtmp_THIS #define PASTE(a,b) GLUE(a,b) #define PASTE_2(a,b) PASTE(a,b) #define PASTE_3(a,b,c) PASTE(PASTE(a,b),c) #define PASTE_4(a,b,c,d) PASTE(PASTE(PASTE(a,b),c),d) #define PASTE_5(a,b,c,d,e) PASTE(PASTE(PASTE(PASTE(a,b),c),d),e) #define PASTE_6(a,b,c,d,e,f) PASTE(PASTE(PASTE(PASTE(PASTE(a,b),c),d),e),f) #define PASTE_7(a,b,c,d,e,f,g) PASTE(PASTE(PASTE(PASTE(PASTE(PASTE(a,b),c),d),e),f),g) #define QUOTE_IT(s) #s /* Defining QUOTE_IT(s) to be "s" might work with some compilers. */ #define STR(s) QUOTE_IT(s) // ============================================================================= // At higher optimization levels, some compilers will ignore parenthesis and // re-arrange floating point calculation. Doing so will break some of the // algorithms in the DPML (eg. divide). The intel compiler in particular has // this problem. However, the Intel compiler has an opperator to avoid // reassociations. // ============================================================================= #if COMPILER == intel_icc || COMPILER == intel_icl # define GROUP(x) __fence(x) #endif #if (COMPILER == dec_cc) /* Declare decc linkages for various platforms */ # if ((OP_SYSTEM == osf) || (OP_SYSTEM == linux)) # if ((OP_SYSTEM == linux) || ( __DECC_VER >= 60000000 )) # pragma message disable (nofntpdefdecl) # endif # if 0 /* * For reference, the Alpha AXP Calling Standard has: */ # pragma linkage standard_linkage = ( parameters( r16, r17, r18, r19, r20, r21, f16, f17, f18, f19, f20, f21 ), result( r0, f0, f1 ), /**/ nopreserve ( r0, r1, r2, r3, r4, r5, r6, r7, r8 ), preserved( r9, r10, r11, r12, r13, r14 ), preserved( r15 ), /* Frame Pointer */ nopreserve ( r16, r17, r18, r19, r20, r21 ), /* Parameters */ nopreserve ( r22, r23, r24, r25 ), preserved( r26 ), /* Return Address */ nopreserve ( r27 ), /* Bound Procedure Value */ nopreserve ( r28 ), /* Volatile Scratch */ nopreserve ( r29 ), /* Global Pointer */ preserved( r30 ), /* Stack Pointer */ /*preserved( r31 ),*/ /* Read as Zero */ nopreserve ( f0, f1 ), preserved( f2, f3, f4, f5, f6, f7, f8, f9 ), nopreserve ( f10, f11, f12, f13, f14, f15 ), nopreserve ( f16, f17, f18, f19, f20, f21 ), /* Parameters */ nopreserve ( f22, f23, f24, f25, f26, f27 ), nopreserve ( f28, f29, f30 ), /*preserved( f31 ),*/ /* Read as Zero */ notneeded(ai) ) # endif # pragma linkage complex_linkage = ( result (f0, f1) ) # pragma use_linkage complex_linkage ( \ F_sincosd, F_sincosdf, \ F_sincos, F_sincosf, ccos, ccosf, cdiv, cdivf, cexp, cexpf, clog, clogf, \ cmul, cmulf, cpow, cpowf, cpowi, cpowif, csin, csinf, csqrt, csqrtf, \ r_ccos, r_ccosf, r_cexp, r_cexpf, r_clog, r_clogf, r_cmplx, r_cmplxf, \ r_conjg, r_conjgf, r_csin, r_csinf, r_csqrt, r_csqrtf, sincos, sincos_vo, \ sincosd, sincosdf, sincosf, sincosf_vo, sinhcosh, sinhcoshf, \ csinh, ctan, ctanh, ccosh, catanh, catan, casin, casinh, cacos, \ cacosh, conj, cproj, ccoshf, catanf, csinhf,\ ctanf, ctanhf,catanhf, casinf, casinhf, cacosf, cacoshf, conjf, cprojf \ ) # pragma linkage res_vec_4_linkage = ( result (f20, f21, f22, f23) ) # pragma use_linkage res_vec_4_linkage ( \ __F_sqrt4, __F_sqrt4f, \ __rsqrt4, __rsqrt4f, \ __sqrt4, __sqrt4f \ ) /* ** The trig reduce functions can have a bad effect on routines ** that call them, because the DECC compiler saves registers ** for _any_ path through the routine, rather than deferring ** until it's known whether a call to a trig reduce function ** is actually needed. ** ** To avoid this problem (which is likely to be inherent in most ** compilers), we specify a linkage for the trig reduce functions ** that allows their callers (nearly) maximal freedom in register use. ** I.e., specify that they preserve (nearly) all registers. */ # pragma linkage trig_reduce_linkage = ( \ parameters (f0, r0, r1, r2), \ result (r0), \ preserved( r16, r17, r18, r19, r20, r21 ), /* Parameters */ \ preserved( f16, f17, f18, f19, f20, f21 ), /* Parameters */ \ preserved( f22, f23, f24, f25, f26, f27 ), \ preserved( f28, f29, f30 ), \ notneeded(ai) \ ) # pragma linkage trigd_reduce_linkage = ( \ parameters (f0, r0, r1), \ result (r0), \ preserved( r16, r17, r18, r19, r20, r21 ), /* Parameters */ \ preserved( f16, f17, f18, f19, f20, f21 ), /* Parameters */ \ preserved( f22, f23, f24, f25, f26, f27 ), \ preserved( f28, f29, f30 ), \ notneeded(ai) \ ) # pragma linkage trig_reduce_linkage_l = ( \ parameters (r3, r0, r1, r2), \ result (r0), \ preserved( r16, r17, r18, r19, r20, r21 ), /* Parameters */ \ preserved( f16, f17, f18, f19, f20, f21 ), /* Parameters */ \ preserved( f22, f23, f24, f25, f26, f27 ), \ preserved( f28, f29, f30 ), \ notneeded(ai) \ ) # pragma use_linkage trig_reduce_linkage ( \ __trig_reduce, \ __trig_reducef \ ) # pragma use_linkage trigd_reduce_linkage ( \ __trigd_reduce, \ __trigd_reducef \ ) /* some recent decc compilers can not do this */ /* # pragma use_linkage trig_reduce_linkage_l ( __trig_reducel, __trigd_reducel ) */ # endif /* OSF */ /* ** NOTE: the "&&" clause is to turn off the pragma definitions for iVMS when ** compiling f, g or d floating types because the compiler issues an error */ # if (OP_SYSTEM == vms) # if ( __DECC_VER >= 60260000 ) # pragma message disable (nofntpdefdecl) # endif # if ( __ia64__ ) # pragma message disable (showmaplinkage,mapregignored) # endif # if __ia64__ && !__IEEE_FLOAT # pragma linkage complex_linkage = ( result (r0, r1) ) # else # pragma linkage complex_linkage = ( result (f0, f1) ) # endif # pragma use_linkage complex_linkage ( \ math$cacos_f, math$cacos_g, math$cacos_s, math$cacos_t, \ math$cacosh_f, math$cacosh_g, math$cacosh_s, math$cacosh_t, \ math$casin_f, math$casin_g, math$casin_s, math$casin_t, \ math$casinh_f, math$casinh_g, math$casinh_s, math$casinh_t, \ math$catan_f, math$catan_g, math$catan_s, math$catan_t, \ math$catanh_f, math$catanh_g, math$catanh_s, math$catanh_t, \ math$ccosh_f, math$ccosh_g, math$ccosh_s, math$ccosh_t, \ math$ctanh_f, math$ctanh_g, math$ctanh_s, math$ctanh_t, \ math$csinh_f, math$csinh_g, math$csinh_s, math$csinh_t, \ math$ctan_f, math$ctan_g, math$ctan_s, math$ctan_t, \ math$conj_f, math$conj_g, math$conj_s, math$conj_t, \ math$cproj_f, math$cproj_g, math$cproj_s, math$cproj_t, \ math$F_sincosd_f, math$F_sincosd_g, math$F_sincosd_s, math$F_sincosd_t, \ math$F_sincos_f, math$F_sincos_g, math$F_sincos_s, math$F_sincos_t, \ math$ccos_f, math$ccos_g, math$ccos_s, math$ccos_t, math$cdiv_f, \ math$cdiv_g, math$cdiv_s, math$cdiv_t, math$cexp_f, math$cexp_g, \ math$cexp_s, math$cexp_t, math$clog_f, math$clog_g, math$clog_s, \ math$clog_t, math$cmul_f, math$cmul_g, math$cmul_s, math$cmul_t, \ math$cpow_f, math$cpow_g, math$cpow_s, math$cpow_t, math$cpow_fq, \ math$cpow_gq, math$cpow_sq, math$cpow_tq, math$cpowi_f, math$cpowi_g, \ math$cpowi_s, math$cpowi_t, math$csin_f, math$csin_g, math$csin_s, \ math$csin_t, math$csqrt_f, math$csqrt_g, math$csqrt_s, math$csqrt_t, \ math$sincos_f, math$sincos_g, math$sincos_s, math$sincos_t, \ math$sincos_vo_f, math$sincos_vo_g, math$sincos_vo_s, math$sincos_vo_t, \ math$sincosd_f, math$sincosd_g, math$sincosd_s, math$sincosd_t, \ math$sinhcosh_f, math$sinhcosh_g, math$sinhcosh_s, math$sinhcosh_t, \ mth$ccos, mth$cdcos, mth$cdexp, mth$cdlog, mth$cdsin, mth$cdsqrt, mth$cexp, \ mth$cgcos, mth$cgexp, mth$cglog, mth$cgsin, mth$cgsqrt, mth$clog, \ mth$cmplx, mth$conjg, mth$cscos, mth$csexp, mth$csin, mth$cslog, mth$csqrt, \ mth$cssin, mth$cssqrt, mth$ctcos, mth$ctexp, mth$ctlog, mth$ctsin, \ mth$ctsqrt, mth$dcmplx, mth$dconjg, mth$gcmplx, mth$gconjg, mth$scmplx, \ mth$sconjg, mth$tcmplx, mth$tconjg, ots$divc, ots$divcd_r3, ots$divcg_r3, \ ots$mulc, ots$mulcd_r3, ots$mulcg_r3, ots$powcc, ots$powcc_r3, \ ots$powcdcd_r3, ots$powcdj, ots$powcgcg_r3, ots$powcgj, ots$powcj \ ) # define PRESERVED_REGISTERS preserved( \ r1, \ r16, r17, r18, r19, r20, r21, r22, r23, r24, r25, \ f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, \ f20, f21, f22, f23, f24, f25, f26, f27, f28, f29, \ f30 \ ) # if !__ia64__ || __IEEE_FLOAT # pragma linkage trig_reduce_linkage = ( \ parameters (f0, r0, r1, r16), \ result (r0), \ PRESERVED_REGISTERS, \ notneeded(ai) \ ) # pragma use_linkage trig_reduce_linkage ( \ math$trig_reduce_f, \ math$trig_reduce_g, \ math$trig_reduce_s, \ math$trig_reduce_t \ ) # pragma linkage trigd_reduce_linkage = ( \ parameters (f0, r0, r1), \ result (r0), \ PRESERVED_REGISTERS, \ notneeded(ai) \ ) # pragma use_linkage trigd_reduce_linkage ( \ math$trigd_reduce_f, \ math$trigd_reduce_g, \ math$trigd_reduce_s, \ math$trigd_reduce_t \ ) # endif # endif /* VMS */ #endif /* (COMPILER == dec_cc) */ #endif /* COMPILER_H */ IntelRDFPMathLib20U5/LIBRARY/float128/dpml_acosh_t.h0000644€­ Q00042560000000475115256550700021610 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ #include "endian.h" static const TABLE_UNION max_direct_x[] = { DATA_1x2( 0x02ccc470, 0x400fe8cf ) }; static const TABLE_UNION max_asym_x[] = { DATA_1x2( 0xd1a81cd8, 0x41a46ac2 ) }; #define EVALUATE_ASYM_RANGE_POLYNOMIAL(x,c,y) \ POLY_9(x,c,y) static const TABLE_UNION asym_range_coef[] = { DATA_1x2( 0x00000000, 0x3fd00000 ), DATA_1x2( 0xffffff07, 0x3fb7ffff ), DATA_1x2( 0xaaaddfbf, 0x3faaaaaa ), DATA_1x2( 0xfdf6faba, 0x3fa17fff ), DATA_1x2( 0x7de0c4ff, 0x3f993334 ), DATA_1x2( 0x3680db02, 0x3f933fc5 ), DATA_1x2( 0xa311158b, 0x3f8eb0ca ), DATA_1x2( 0x0a8b1f0a, 0x3f88674b ), DATA_1x2( 0x0da7b094, 0x3f8b082b ), }; static const TABLE_UNION half_huge_x[] = { DATA_1x2( 0xffffffff, 0x7fdfffff ) }; static const TABLE_UNION log_2[] = { DATA_1x2( 0xfefa39ef, 0x3fe62e42 ) }; IntelRDFPMathLib20U5/LIBRARY/float128/dpml_asinh.c0000644€­ Q00042560000012772115256550700021270 0ustar aakkasintelall/****************************************************************************** Copyright (c) 2007-2026, Intel Corp. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************/ #include "dpml_private.h" #include "sqrt_macros.h" #undef MAKE_ASINH #undef MAKE_ACOSH #if defined(ASINH) # define MAKE_ASINH # define BASE_NAME ASINH_BASE_NAME # define _F_ENTRY_NAME F_ASINH_NAME #elif defined(ACOSH) # define BASE_NAME ACOSH_BASE_NAME # define _F_ENTRY_NAME F_ACOSH_NAME #else # error "Must have one of ASINH, ACOSH defined" #endif #if !defined(F_ENTRY_NAME) # define F_ENTRY_NAME _F_ENTRY_NAME #endif /* Arcsinh & Arccosh -------------------------------------- This source can be compiled into both Arcsine and Arccosine routines. The definitions necessary to create the function follow. Function Generation: Along with any standard compile time definitions required by the dpml the following items should be defined on the compilation command line to create the indicated routine. Arcsinh : ASINH Arccosh : ACOSH To create each routine's 'include' file an initial compilation should be done using the following definition in addition to those above. MAKE_INCLUDE Selectable Build-time Parameters: The definitions below define the minimum "overhang" limits for those ranges of the routine with adjustable accuracy bounds. The numbers specified in the definitions are the number of binary digits of overhang. A complete discussion of these values and their use is included in the individual routine documentation. */ #define POLY_RANGE_OVERHANG 5 #define REDUCE_RANGE_OVERHANG 5 #define ASYM_RANGE_OVERHANG 7 #define LARGE_RANGE_OVERHANG 7 #if !defined(MAKE_INCLUDE) #include STR(BUILD_FILE_NAME) #endif /* Arcsinh -------------------------- The Arcsinh designs described here are the result of an effort to create a fast Arcsinh routine with error bounds near 1/2 lsb. The inherent conflict is that, to create fast routines we generally need to give up some accuracy, and conversely, to increase accuracy we often must give up speed. As a result, the design we're presenting defines a user (builder) configureable routine. That is, it is set up such that the builder of a routine may choose, through the proper setting of parameters, the degree of accuracy of the generated routine and hence, indirectly, its speed. The Design: The overall domain of the Arcsinh function has been divided up into six regions or paths as follows: (1) (2) (3) (4) (5) (6) |--------|------------|-----------|-----------|-------|----------| 0 small polynomial reduction asymptotic large huge (Note: Although the domain of Arcsinh extends from -infinite to +infinite, the problem can be considered one of only positive arguments through the application of the identity asinh(-x) = - asinh(x). ) Within each region a unique approximation to the Arcsinh function is used. Each is chosen for its error characteristics, efficiency and the range over which it can be applied. 1. Small region: asinh(x) = x (x <= max_small) Within the "small" region the Arcsinh function is approximated as asinh(x) = x. This is a very quick approximation but it may only be applied to small input values. There is effectively no associated storage costs. By limiting the magnitude of x the error bound can be limited to <= 1/2 lsb. 2. Polynomial region: Within the "polynomial" region the function is approximated as asinh(x) = x (1 + x^2 P(x)) (max_small_x